]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
De-duplicate parsing of 'auth_param ... program' lines
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 20 Dec 2016 10:55:45 +0000 (23:55 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 20 Dec 2016 10:55:45 +0000 (23:55 +1300)
src/auth/digest/Config.cc
src/auth/negotiate/Config.cc
src/auth/ntlm/Config.cc

index 5c20ee4c0e0e538fb3b1723752c04f23d50dcc9b..0d7e7601379364707613f6260f78f23516e03ba3 100644 (file)
@@ -607,14 +607,7 @@ Auth::Digest::Config::Config() :
 void
 Auth::Digest::Config::parse(Auth::SchemeConfig * scheme, int n_configured, char *param_str)
 {
-    if (strcmp(param_str, "program") == 0) {
-        if (authenticateProgram)
-            wordlistDestroy(&authenticateProgram);
-
-        parse_wordlist(&authenticateProgram);
-
-        requirePathnameExists("auth_param digest program", authenticateProgram->key);
-    } else if (strcmp(param_str, "nonce_garbage_interval") == 0) {
+    if (strcmp(param_str, "nonce_garbage_interval") == 0) {
         parse_time_t(&nonceGCInterval);
     } else if (strcmp(param_str, "nonce_max_duration") == 0) {
         parse_time_t(&noncemaxduration);
index 4c92972875c3787212f9c86aed75b737c1873895..9cf85f1165cf6cbc4f29c1ae2c39ff0d44ecd083 100644 (file)
@@ -89,14 +89,7 @@ Auth::Negotiate::Config::Config() : keep_alive(1)
 void
 Auth::Negotiate::Config::parse(Auth::SchemeConfig * scheme, int n_configured, char *param_str)
 {
-    if (strcmp(param_str, "program") == 0) {
-        if (authenticateProgram)
-            wordlistDestroy(&authenticateProgram);
-
-        parse_wordlist(&authenticateProgram);
-
-        requirePathnameExists("auth_param negotiate program", authenticateProgram->key);
-    } else if (strcmp(param_str, "keep_alive") == 0) {
+    if (strcmp(param_str, "keep_alive") == 0) {
         parse_onoff(&keep_alive);
     } else
         Auth::SchemeConfig::parse(scheme, n_configured, param_str);
index b723c01b1c89b2f483eb10864dc8e886bd12178f..1bbf49d051dd7bc43173b563c3531ee13848c83a 100644 (file)
@@ -90,14 +90,7 @@ Auth::Ntlm::Config::Config() : keep_alive(1)
 void
 Auth::Ntlm::Config::parse(Auth::SchemeConfig * scheme, int n_configured, char *param_str)
 {
-    if (strcmp(param_str, "program") == 0) {
-        if (authenticateProgram)
-            wordlistDestroy(&authenticateProgram);
-
-        parse_wordlist(&authenticateProgram);
-
-        requirePathnameExists("auth_param ntlm program", authenticateProgram->key);
-    } else if (strcmp(param_str, "keep_alive") == 0) {
+    if (strcmp(param_str, "keep_alive") == 0) {
         parse_onoff(&keep_alive);
     } else
         Auth::SchemeConfig::parse(scheme, n_configured, param_str);