[Date Prev][Date Next] [Chronological] [Thread] [Top]

slurpd is not initializing Ri (ITS#808)



The slurpd function Ri_init() in ri.c does not initialize some of the
fields in the passed Ri structure.  Noticed this when I found that the
slurpd was always trying to start TLS, and the config file only allows for
turning TLS on, not off. An uninitialized ri_tls was the culprit.
  Also initialize to NULL the two SASL fields added for authorization.

-Mark Adamson
 Carnegie Mellon






Index: ri.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slurpd/ri.c,v
retrieving revision 1.18
diff -u -r1.18 ri.c
--- ri.c        2000/10/03 16:50:42     1.18
+++ ri.c        2000/10/06 13:41:30
@@ -179,10 +179,13 @@
     /* Initialize private data */
     (*ri)->ri_hostname = NULL;
     (*ri)->ri_ldp = NULL;
+    (*ri)->ri_tls = TLS_OFF;
     (*ri)->ri_bind_dn = NULL;
     (*ri)->ri_password = NULL;
     (*ri)->ri_authcId = NULL;
+    (*ri)->ri_authzId = NULL;
     (*ri)->ri_srvtab = NULL;
+    (*ri)->ri_saslmech = NULL;
     (*ri)->ri_curr = NULL;
 
     return 0;