some fixes

Sat, 19 Jan 2013 20:51:16 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 19 Jan 2013 20:51:16 +0100
changeset 49
1fd94945796e
parent 48
37a512d7b8f6
child 50
4d39adda7a38

some fixes

src/server/daemon/httprequest.c file | annotate | diff | comparison | revisions
src/server/daemon/ldap_auth.c file | annotate | diff | comparison | revisions
src/server/safs/auth.c file | annotate | diff | comparison | revisions
--- a/src/server/daemon/httprequest.c	Sat Jan 19 20:13:07 2013 +0100
+++ b/src/server/daemon/httprequest.c	Sat Jan 19 20:51:16 2013 +0100
@@ -541,11 +541,6 @@
 
                     /* add +1 to start next round with next function */
                     rq->context.dtable_index = j + 1;
-                } else if(ret == REQ_ABORTED) {
-                    if(rq->rq.status_num == PROTOCOL_UNAUTHORIZED) {
-                        // TODO: unify error handling
-                        protocol_start_response((Session*)sn, (Request*)rq);
-                    }
                 }
 
                 return ret;
--- a/src/server/daemon/ldap_auth.c	Sat Jan 19 20:13:07 2013 +0100
+++ b/src/server/daemon/ldap_auth.c	Sat Jan 19 20:51:16 2013 +0100
@@ -57,6 +57,8 @@
         fprintf(stderr, "ldap_init failed\n");
         return NULL;
     }
+    int ldapv = 3;
+    ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &ldapv);
 
     int r = ldap_simple_bind_s(ld, config->binddn, config->bindpw);
     if (r != LDAP_SUCCESS) {
--- a/src/server/safs/auth.c	Sat Jan 19 20:13:07 2013 +0100
+++ b/src/server/safs/auth.c	Sat Jan 19 20:51:16 2013 +0100
@@ -279,6 +279,9 @@
     pblock_nvinsert("auth-db", db, rq->vars);
     
     free(user);
-    auth_user->free(auth_user);
+    if(auth_user) {
+        auth_user->free(auth_user);
+    }
+    
     return REQ_PROCEED;
 }

mercurial