From: Amos Jeffries Date: Tue, 20 Dec 2016 10:55:45 +0000 (+1300) Subject: De-duplicate parsing of 'auth_param ... program' lines X-Git-Tag: M-staged-PR71~333^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97838141ea43e7b0a985bd6c3a63cc0936677c99;p=thirdparty%2Fsquid.git De-duplicate parsing of 'auth_param ... program' lines --- diff --git a/src/auth/digest/Config.cc b/src/auth/digest/Config.cc index 5c20ee4c0e..0d7e760137 100644 --- a/src/auth/digest/Config.cc +++ b/src/auth/digest/Config.cc @@ -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); diff --git a/src/auth/negotiate/Config.cc b/src/auth/negotiate/Config.cc index 4c92972875..9cf85f1165 100644 --- a/src/auth/negotiate/Config.cc +++ b/src/auth/negotiate/Config.cc @@ -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); diff --git a/src/auth/ntlm/Config.cc b/src/auth/ntlm/Config.cc index b723c01b1c..1bbf49d051 100644 --- a/src/auth/ntlm/Config.cc +++ b/src/auth/ntlm/Config.cc @@ -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);