]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Various auth_rewrite/splay_userauth fixes by Robert Collins
authorhno <>
Tue, 9 Jan 2001 02:36:26 +0000 (02:36 +0000)
committerhno <>
Tue, 9 Jan 2001 02:36:26 +0000 (02:36 +0000)
* auth_modules is no longer a top-level subdir. Don't try to reference
it from the makefile.

* more name changes from proxyauth to user, missed by Henrik

* corrected addition to a existing user list

* fixed a coredump on shutdown with empty user lists (i.e. only REQUIRED)

* fixed a reconfigure bug where the authentication shemes got somewhat trashed

* added a debug log message when a new scheme is added

src/acl.cc
src/auth/ntlm/auth_ntlm.cc
src/authenticate.cc
src/typedefs.h

index 9f7b317bc6571204ac4e6c64ca09cb5f17e49444..212ab5b0bbd3e77b2a8ca80462d113cce8ad51e1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: acl.cc,v 1.236 2001/01/07 23:36:37 hno Exp $
+ * $Id: acl.cc,v 1.237 2001/01/08 19:36:26 hno Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -641,12 +641,13 @@ aclParseUserList(void **current)
     acl_user_data *data;
     splayNode *Top = NULL;
 
-    debug(28, 2) ("aclParseUserList: parsing authlist\n");
+    debug(28, 2) ("aclParseUserList: parsing user list\n");
     if (*current == NULL) {
        debug(28, 3) ("aclParseUserList: current is null. Creating\n");
-       *current = memAllocate(MEM_ACL_USER_DATA);      /*we rely on mA. zeroing */
+       *current = memAllocate(MEM_ACL_USER_DATA);
     }
     data = *current;
+    Top = data->names;
     if ((t = strtokFile())) {
        debug(28, 5) ("aclParseUserList: First token is %s\n", t);
        if (strcmp("-i", t) == 0) {
@@ -665,7 +666,7 @@ aclParseUserList(void **current)
        data->flags.case_insensitive);
     /* we might inherit from a previous declaration */
 
-    debug(28, 4) ("aclParseUserList: parsing proxy-auth list\n");
+    debug(28, 4) ("aclParseUserList: parsing user list\n");
     while ((t = strtokFile())) {
        debug(28, 6) ("aclParseUserList: Got token: %s\n", t);
        if (data->flags.case_insensitive)
@@ -1977,7 +1978,8 @@ static void
 aclFreeUserData(void *data)
 {
     acl_user_data *d = data;
-    splay_destroy(d->names, xfree);
+    if (d->names)
+       splay_destroy(d->names, xfree);
     memFree(d, MEM_ACL_USER_DATA);
 }
 
@@ -2802,4 +2804,4 @@ aclDumpArpList(void *data)
 }
 
 /* ==== END ARP ACL SUPPORT =============================================== */
-#endif /* USE_ARP_ACL */
+#endif                         /* USE_ARP_ACL */
index ff439ef3d27a191aacd53dd9547564f4eeb10b61..ebd4aa3b15c1945480f41155663bc8cb268d33ea 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: auth_ntlm.cc,v 1.1 2001/01/07 23:36:48 hno Exp $
+ * $Id: auth_ntlm.cc,v 1.2 2001/01/08 19:36:27 hno Exp $
  *
  * DEBUG: section 29    NTLM Authenticator
  * AUTHOR: Robert Collins
@@ -235,10 +235,11 @@ authNTLMInit(authScheme * scheme)
 int
 authenticateNTLMActive()
 {
-    if (authntlm_initialised)
-       return 1;
-    else
-       return 0;
+    if ((ntlmConfig != NULL) && (ntlmConfig->authenticate != NULL) &&
+        (ntlmConfig->authenticateChildren != 0) && (ntlmConfig->challengeuses > -1) 
+        && (ntlmConfig->challengelifetime>-1))
+        return 1;
+    return 0;
 }
 
 /* NTLM Scheme */
index d03079626a6c09a0601a6478c2cd1919dfffe132..ed8d82bf59b4ca8855eb9e5662aa57b1ccf74b77 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: authenticate.cc,v 1.15 2001/01/07 23:36:37 hno Exp $
+ * $Id: authenticate.cc,v 1.16 2001/01/08 19:36:26 hno Exp $
  *
  * DEBUG: section 29    Authenticator
  * AUTHOR: Duane Wessels
@@ -370,7 +370,8 @@ authenticateShutdown(void)
            authscheme_list[i].donefunc();
        else
            debug(29, 2) ("authenticateShutdown: scheme %s has not registered a shutdown function.\n", authscheme_list[i].typestr);
-       authscheme_list[i].typestr = NULL;
+       if (!reconfiguring)
+           authscheme_list[i].typestr = NULL;
     }
 }
 
@@ -634,6 +635,7 @@ void
 authSchemeAdd(char *type, AUTHSSETUP * setup)
 {
     int i;
+    debug(29, 4) ("authSchemeAdd: adding %s", type);
     /* find the number of currently known authscheme types */
     for (i = 0; authscheme_list && authscheme_list[i].typestr; i++) {
        assert(strcmp(authscheme_list[i].typestr, type) != 0);
index f28297ed7d7f5c897f420feaff9eeef6062a4627..5d784b21f150e9e3eabdce6e5bb53d6dd9df2b70 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: typedefs.h,v 1.116 2001/01/07 23:36:41 hno Exp $
+ * $Id: typedefs.h,v 1.117 2001/01/08 19:36:27 hno Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -61,7 +61,6 @@ typedef struct _acl_ip_data acl_ip_data;
 typedef struct _acl_time_data acl_time_data;
 typedef struct _acl_name_list acl_name_list;
 typedef struct _acl_deny_info_list acl_deny_info_list;
-typedef struct _acl_proxy_auth acl_proxy_auth;
 typedef struct _auth_user_t auth_user_t;
 typedef struct _auth_user_request_t auth_user_request_t;
 typedef struct _auth_user_hash_pointer auth_user_hash_pointer;
@@ -353,4 +352,4 @@ typedef RemovalPolicy *REMOVALPOLICYCREATE(wordlist * args);
 
 typedef int STDIRSELECT(const StoreEntry *);
 
-#endif /* _TYPEDEFS_H_ */
+#endif                         /* _TYPEDEFS_H_ */