From: Amos Jeffries Date: Fri, 25 Sep 2015 10:57:18 +0000 (-0700) Subject: Add virtual destructors to Auth::User hierarchy X-Git-Tag: SQUID_4_0_1~21^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=39bfd3eb3359d6b8f2e4264e38460a32dc921078;p=thirdparty%2Fsquid.git Add virtual destructors to Auth::User hierarchy --- diff --git a/src/auth/User.h b/src/auth/User.h index a2645245e2..e051892c27 100644 --- a/src/auth/User.h +++ b/src/auth/User.h @@ -29,7 +29,6 @@ class Config; class CredentialsCache; /** - * \ingroup AuthAPI * This is the main user related structure. It stores user-related data, * and is persistent across requests. It can even persist across * multiple external authentications. One major benefit of preserving this @@ -41,10 +40,12 @@ class User : public RefCountable public: typedef RefCount Pointer; +protected: + User(Auth::Config *, const char *requestRealm); +public: + virtual ~User(); + /* extra fields for proxy_auth */ - /* auth_type and auth_module are deprecated. Do Not add new users of these fields. - * Aim to remove shortly - */ /** \deprecated this determines what scheme owns the user data. */ Auth::Type auth_type; /** the config for this user */ @@ -60,7 +61,6 @@ public: static SBuf BuildUserKey(const char *username, const char *realm); void absorb(Auth::User::Pointer from); - virtual ~User(); char const *username() const { return username_; } void username(char const *); ///< set stored username and userKey @@ -100,9 +100,6 @@ private: */ CredentialState credentials_state; -protected: - User(Auth::Config *, const char *requestRealm); - private: /** * DPW 2007-05-08 diff --git a/src/auth/basic/User.h b/src/auth/basic/User.h index 340e7c8f31..74f893f9f5 100644 --- a/src/auth/basic/User.h +++ b/src/auth/basic/User.h @@ -28,7 +28,7 @@ class User : public Auth::User public: User(Auth::Config *, const char *requestRealm); - ~User(); + virtual ~User(); bool authenticated() const; bool valid() const; diff --git a/src/auth/digest/User.h b/src/auth/digest/User.h index f823bb5256..fc37110f9f 100644 --- a/src/auth/digest/User.h +++ b/src/auth/digest/User.h @@ -25,7 +25,7 @@ class User : public Auth::User public: User(Auth::Config *, const char *requestRealm); - ~User(); + virtual ~User(); int authenticated() const; virtual int32_t ttl() const; diff --git a/src/auth/negotiate/User.h b/src/auth/negotiate/User.h index 3df41a4eb9..3764cbd06b 100644 --- a/src/auth/negotiate/User.h +++ b/src/auth/negotiate/User.h @@ -26,7 +26,7 @@ class User : public Auth::User public: User(Auth::Config *, const char *requestRealm); - ~User(); + virtual ~User(); virtual int32_t ttl() const; /* Auth::User API */ diff --git a/src/auth/ntlm/User.h b/src/auth/ntlm/User.h index acb2cd724e..57552ac365 100644 --- a/src/auth/ntlm/User.h +++ b/src/auth/ntlm/User.h @@ -26,7 +26,7 @@ class User : public Auth::User public: User(Auth::Config *, const char *requestRealm); - ~User(); + virtual ~User(); virtual int32_t ttl() const; /* Auth::User API */