* Correct a few typos in Autz-Type
authorkkalev <kkalev>
Sat, 22 Jun 2002 17:41:46 +0000 (17:41 +0000)
committerkkalev <kkalev>
Sat, 22 Jun 2002 17:41:46 +0000 (17:41 +0000)
* Remember to free inst->atts in ldap_detach() in rlm_ldap.c

doc/Autz-Type
src/modules/rlm_ldap/rlm_ldap.c

index 4cca73e..a785895 100644 (file)
@@ -19,9 +19,10 @@ authorize{
        }
 }
 
-What happens is that the first time the authorize section is examined the suffix,preprocess and files module
-are executed. If Autz-Type is set after that the server core checks for any matching autztype subsection.
-If one is found it is called. The users file should look something like this:
+What happens is that the first time the authorize section is examined the suffix,preprocess
+and files modules are executed. If Autz-Type is set after that the server core checks for
+any matching autztype subsection. If one is found it is called. The users file should look
+something like this:
 
 DEFAULT        Called-Station-Id == "123456789", Autz-Type := Ldap
 
index 9436fad..f0ec1f2 100644 (file)
@@ -65,6 +65,7 @@
  *     - Add another configuration directive. access_attr_used_for_allow. If it is set to yes
  *       then the access_attr will be used to allow user access. If it is set to no then it will
  *       be used to deny user access.
+ *     - Remember to free inst->atts in ldap_detach()
  */
 static const char rcsid[] = "$Id$";
 
@@ -1355,6 +1356,14 @@ ldap_detach(void *instance)
                pair = nextpair;
        }
 
+       if (inst->atts){
+               int i = 0;
+
+               while(inst->atts[i])
+                       free(inst->atts[i++]);
+               free(inst->atts);
+       }
+
        paircompare_unregister(PW_LDAP_GROUP, ldap_groupcmp);
        xlat_unregister(inst->xlat_name,ldap_xlat);
        free(inst->xlat_name);