Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSacha J Bernstein <sacha@sjbcom.com>2014-07-25 22:06:51 +0400
committerSacha J Bernstein <sacha@sjbcom.com>2014-07-25 22:06:51 +0400
commit9f83dc0ba26665577f0c7add2d46048be8072214 (patch)
treea5ced4b06f102d762214f4e22c4b38fae0eced80
parente29a83ea6176104f8249b8ee5feb6e9fb48b3689 (diff)
Cleanup check of blank realm name
Store realm name in hub struct using a preallocated string instead of a pointer
-rw-r--r--src/Cedar/Hub.h2
-rw-r--r--src/Cedar/Sam.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Cedar/Hub.h b/src/Cedar/Hub.h
index 3a383d9c..69a7549a 100644
--- a/src/Cedar/Hub.h
+++ b/src/Cedar/Hub.h
@@ -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
diff --git a/src/Cedar/Sam.c b/src/Cedar/Sam.c
index 8aade7da..83afdfb1 100644
--- a/src/Cedar/Sam.c
+++ b/src/Cedar/Sam.c
@@ -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);