]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove some cruft before audit
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 23 May 2010 12:40:04 +0000 (00:40 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 23 May 2010 12:40:04 +0000 (00:40 +1200)
src/auth/Scheme.cc
src/auth/basic/auth_basic.cc

index 0f695d3aa79eb04b1bfa48846e0562755474ba3c..b476636c18ff0157277888b8712679b2cedaeb30 100644 (file)
@@ -64,14 +64,6 @@ AuthScheme::Find(const char *typestr)
     return AuthScheme::Pointer(NULL);
 }
 
-#if 0 // with ref-counting we never have a constant version of *::Pointer
-Vector<AuthScheme::Pointer> const &
-AuthScheme::Schemes()
-{
-    return GetSchemes();
-}
-#endif
-
 Vector<AuthScheme::Pointer> &
 AuthScheme::GetSchemes()
 {
@@ -91,6 +83,8 @@ AuthScheme::GetSchemes()
 void
 AuthScheme::FreeAll()
 {
+//    assert(shutting_down);
+
     while (GetSchemes().size()) {
         AuthScheme::Pointer scheme = GetSchemes().back();
         GetSchemes().pop_back();
index 958be1995e4fff373293c4ec1e3feee505aee249..135c1c215748bcf3a4428c99a8522f8abbfd22fb 100644 (file)
@@ -434,34 +434,6 @@ BasicUser::makeLoggingInstance(AuthUserRequest::Pointer auth_user_request)
     }
 }
 
-#if 0
-/* TODO: instead of duplicating into the cache why not just add a ::Pointer to ourselves there? */
-AuthUser::Pointer
-BasicUser::makeCachedFrom()
-{
-    /* the user doesn't exist in the username cache yet */
-    debugs(29, 9, HERE << "Creating new user '" << username() << "'");
-    BasicUser *basic_user = new BasicUser(config);
-    /* save the credentials */
-    basic_user->username(username());
-    username(NULL);
-    basic_user->passwd = passwd;
-    passwd = NULL;
-    /* set the auth_user type */
-    basic_user->auth_type = AUTH_BASIC;
-    /* current time for timeouts */
-    basic_user->expiretime = current_time.tv_sec;
-
-    /* this basic_user struct is the 'lucky one' to get added to the username cache */
-    /* the requests after this link to the basic_user */
-    /* store user in hash */
-    basic_user->addToNameCache();
-
-    AuthUser::Pointer auth_user = dynamic_cast<AuthUser*>(basic_user);
-    return auth_user;
-}
-#endif
-
 void
 BasicUser::updateCached(BasicUser *from)
 {