mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-23 01:49:53 +03:00
Cleanup check of blank realm name
Store realm name in hub struct using a preallocated string instead of a pointer
This commit is contained in:
parent
e29a83ea61
commit
9f83dc0ba2
@ -424,7 +424,7 @@ struct HUB
|
|||||||
UINT RadiusRetryInterval; // Radius retry interval
|
UINT RadiusRetryInterval; // Radius retry interval
|
||||||
BUF *RadiusSecret; // Radius shared key
|
BUF *RadiusSecret; // Radius shared key
|
||||||
char RadiusSuffixFilter[MAX_SIZE]; // Radius suffix filter
|
char RadiusSuffixFilter[MAX_SIZE]; // Radius suffix filter
|
||||||
char *RadiusRealm; // Radius realm (optional)
|
char RadiusRealm[MAX_SIZE]; // Radius realm (optional)
|
||||||
volatile bool Halt; // Halting flag
|
volatile bool Halt; // Halting flag
|
||||||
bool Offline; // Offline
|
bool Offline; // Offline
|
||||||
bool BeingOffline; // Be Doing Offline
|
bool BeingOffline; // Be Doing Offline
|
||||||
|
@ -211,7 +211,7 @@ bool SamAuthUserByPlainPassword(CONNECTION *c, HUB *hub, char *username, char *p
|
|||||||
AUTHRADIUS *auth = (AUTHRADIUS *)u->AuthData;
|
AUTHRADIUS *auth = (AUTHRADIUS *)u->AuthData;
|
||||||
if (ast || auth->RadiusUsername == NULL || UniStrLen(auth->RadiusUsername) == 0)
|
if (ast || auth->RadiusUsername == NULL || UniStrLen(auth->RadiusUsername) == 0)
|
||||||
{
|
{
|
||||||
if( h->RadiusRealm && (StrLen(h->RadiusRealm) > 0) )
|
if( IsEmptyStr(h->RadiusRealm) == false )
|
||||||
{
|
{
|
||||||
char name_and_realm[MAX_SIZE];
|
char name_and_realm[MAX_SIZE];
|
||||||
StrCpy(name_and_realm, MAX_SIZE, username);
|
StrCpy(name_and_realm, MAX_SIZE, username);
|
||||||
|
Loading…
Reference in New Issue
Block a user