]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't check for array existence
authorAlan T. DeKok <aland@freeradius.org>
Sun, 17 Feb 2013 22:25:24 +0000 (17:25 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 17 Feb 2013 22:25:24 +0000 (17:25 -0500)
src/modules/rlm_ldap/rlm_ldap.c

index 1b7d1b53bda54a8e456ca7774924ce9e6f8b4ef2..7c62b133fa83111f69a13dd3924dda7002ebf59a 100644 (file)
@@ -1032,7 +1032,7 @@ static int ldap_groupcmp(void *instance, REQUEST *req,
 
        DEBUG("  [%s] Entering ldap_groupcmp()", inst->xlat_name);
 
-       if (check->vp_strvalue == NULL || check->length == 0){
+       if (check->length == 0){
                 DEBUG("rlm_ldap::ldap_groupcmp: Illegal group name");
                 return 1;
         }
@@ -1368,7 +1368,7 @@ static int ldap_authorize(void *instance, REQUEST * request)
        /*
         * Check for valid input, zero length names not permitted
         */
-       if (request->username->vp_strvalue == 0) {
+       if (request->username->length == 0) {
                DEBUG2("zero length username not permitted\n");
                return RLM_MODULE_INVALID;
        }