1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-09-18 01:33:00 +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:
Sacha J Bernstein 2014-07-25 14:06:51 -04:00
parent e29a83ea61
commit 9f83dc0ba2
2 changed files with 2 additions and 2 deletions

View File

@ -424,7 +424,7 @@ struct HUB
UINT RadiusRetryInterval; // Radius retry interval
BUF *RadiusSecret; // Radius shared key
char RadiusSuffixFilter[MAX_SIZE]; // Radius suffix filter
char *RadiusRealm; // Radius realm (optional)
char RadiusRealm[MAX_SIZE]; // Radius realm (optional)
volatile bool Halt; // Halting flag
bool Offline; // Offline
bool BeingOffline; // Be Doing Offline

View File

@ -211,7 +211,7 @@ bool SamAuthUserByPlainPassword(CONNECTION *c, HUB *hub, char *username, char *p
AUTHRADIUS *auth = (AUTHRADIUS *)u->AuthData;
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];
StrCpy(name_and_realm, MAX_SIZE, username);