File squid_ldapauth-1.3.dif of Package squid

--- Makefile
+++ Makefile
@@ -20,7 +20,7 @@
           EXEC = squid_ldapauth
 
 
-all: $(EXEC) strip
+all: $(EXEC)
 
 $(EXEC): $(OBJS)
 	$(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $@
--- squid_ldapauth.c
+++ squid_ldapauth.c
@@ -294,14 +294,16 @@
   BerElement     *ber;
   char           *a = 0;
   int            i, rc= 0;
+  int lderrno;
 
   snprintf(query, sizeof(query), filter, user);
   if(-1 == ldap_search(ldap, suffix, LDAP_SCOPE_SUBTREE, query, attrs, 0)) {
+    ldap_get_option(ldap,LDAP_OPT_ERROR_NUMBER,&lderrno);
     if(use_syslog) {
-      syslog(LOG_ERR, "ldap search: %d", ldap->ld_errno);
+      syslog(LOG_ERR, "ldap search: %d", lderrno);
     } else {
       fprintf(stderr, "%s[%d]: ldap search: %d\n",
-                      appname, getpid(), ldap->ld_errno);
+                      appname, getpid(), lderrno);
     }
     return -1;
   }
openSUSE Build Service is sponsored by