------------------------------------------------------------ revno: 13423 revision-id: squid3@treenet.co.nz-20140528113834-do5q31cu02nez5b8 parent: squid3@treenet.co.nz-20140528105023-biav3v65ucwn033d committer: Amos Jeffries branch nick: trunk timestamp: Wed 2014-05-28 04:38:34 -0700 message: Cleanup: de-duplicate handling of auth_param 'children' ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140528113834-do5q31cu02nez5b8 # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 5cffea38550b090a9a222cbb6edcac7c42ec918c # timestamp: 2014-05-28 11:53:54 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20140528105023-\ # biav3v65ucwn033d # # Begin patch === modified file 'src/auth/Config.cc' --- src/auth/Config.cc 2014-02-10 12:37:47 +0000 +++ src/auth/Config.cc 2014-05-28 11:38:34 +0000 @@ -94,7 +94,10 @@ void Auth::Config::parse(Auth::Config * scheme, int n_configured, char *param_str) { - if (strcmp(param_str, "key_extras") == 0) { + if (strcmp(param_str, "children") == 0) { + authenticateChildren.parseConfig(); + + } else if (strcmp(param_str, "key_extras") == 0) { keyExtrasLine = ConfigParser::NextQuotedToken(); Format::Format *nlf = new ::Format::Format(scheme->type()); if (!nlf->parse(keyExtrasLine.termedBuf())) { @@ -119,6 +122,11 @@ void Auth::Config::dump(StoreEntry *entry, const char *name, Auth::Config *scheme) { + storeAppendPrintf(entry, "%s %s children %d startup=%d idle=%d concurrency=%d\n", + name, scheme->type(), + authenticateChildren.n_max, authenticateChildren.n_startup, + authenticateChildren.n_idle, authenticateChildren.concurrency); + if (keyExtrasLine.size() > 0) storeAppendPrintf(entry, "%s %s key_extras \"%s\"\n", name, scheme->type(), keyExtrasLine.termedBuf()); } === modified file 'src/auth/basic/auth_basic.cc' --- src/auth/basic/auth_basic.cc 2014-02-10 11:08:58 +0000 +++ src/auth/basic/auth_basic.cc 2014-05-28 11:38:34 +0000 @@ -148,7 +148,6 @@ storeAppendPrintf(entry, "\n"); storeAppendPrintf(entry, "%s basic realm %s\n", name, basicAuthRealm); - storeAppendPrintf(entry, "%s basic children %d startup=%d idle=%d concurrency=%d\n", name, authenticateChildren.n_max, authenticateChildren.n_startup, authenticateChildren.n_idle, authenticateChildren.concurrency); storeAppendPrintf(entry, "%s basic credentialsttl %d seconds\n", name, (int) credentialsTTL); storeAppendPrintf(entry, "%s basic casesensitive %s\n", name, casesensitive ? "on" : "off"); Auth::Config::dump(entry, name, scheme); @@ -177,8 +176,6 @@ parse_wordlist(&authenticateProgram); requirePathnameExists("auth_param basic program", authenticateProgram->key); - } else if (strcmp(param_str, "children") == 0) { - authenticateChildren.parseConfig(); } else if (strcmp(param_str, "realm") == 0) { parse_eol(&basicAuthRealm); } else if (strcmp(param_str, "credentialsttl") == 0) { === modified file 'src/auth/digest/auth_digest.cc' --- src/auth/digest/auth_digest.cc 2014-02-21 02:19:52 +0000 +++ src/auth/digest/auth_digest.cc 2014-05-28 11:38:34 +0000 @@ -499,9 +499,8 @@ list = list->next; } - storeAppendPrintf(entry, "\n%s %s realm %s\n%s %s children %d startup=%d idle=%d concurrency=%d\n%s %s nonce_max_count %d\n%s %s nonce_max_duration %d seconds\n%s %s nonce_garbage_interval %d seconds\n", + storeAppendPrintf(entry, "\n%s %s realm %s\n%s %s nonce_max_count %d\n%s %s nonce_max_duration %d seconds\n%s %s nonce_garbage_interval %d seconds\n", name, "digest", digestAuthRealm, - name, "digest", authenticateChildren.n_max, authenticateChildren.n_startup, authenticateChildren.n_idle, authenticateChildren.concurrency, name, "digest", noncemaxuses, name, "digest", (int) noncemaxduration, name, "digest", (int) nonceGCInterval); @@ -639,8 +638,6 @@ parse_wordlist(&authenticateProgram); requirePathnameExists("auth_param digest program", authenticateProgram->key); - } else if (strcmp(param_str, "children") == 0) { - authenticateChildren.parseConfig(); } else if (strcmp(param_str, "realm") == 0) { parse_eol(&digestAuthRealm); } else if (strcmp(param_str, "nonce_garbage_interval") == 0) { === modified file 'src/auth/negotiate/auth_negotiate.cc' --- src/auth/negotiate/auth_negotiate.cc 2013-12-06 14:59:47 +0000 +++ src/auth/negotiate/auth_negotiate.cc 2014-05-28 11:38:34 +0000 @@ -119,9 +119,7 @@ list = list->next; } - storeAppendPrintf(entry, "\n%s negotiate children %d startup=%d idle=%d concurrency=%d\n", - name, authenticateChildren.n_max, authenticateChildren.n_startup, authenticateChildren.n_idle, authenticateChildren.concurrency); - storeAppendPrintf(entry, "%s %s keep_alive %s\n", name, "negotiate", keep_alive ? "on" : "off"); + storeAppendPrintf(entry, "\n%s %s keep_alive %s\n", name, "negotiate", keep_alive ? "on" : "off"); Auth::Config::dump(entry, name, scheme); } @@ -138,8 +136,6 @@ parse_wordlist(&authenticateProgram); requirePathnameExists("auth_param negotiate program", authenticateProgram->key); - } else if (strcmp(param_str, "children") == 0) { - authenticateChildren.parseConfig(); } else if (strcmp(param_str, "keep_alive") == 0) { parse_onoff(&keep_alive); } else === modified file 'src/auth/ntlm/auth_ntlm.cc' --- src/auth/ntlm/auth_ntlm.cc 2013-12-06 14:59:47 +0000 +++ src/auth/ntlm/auth_ntlm.cc 2014-05-28 11:38:34 +0000 @@ -111,9 +111,7 @@ list = list->next; } - storeAppendPrintf(entry, "\n%s ntlm children %d startup=%d idle=%d concurrency=%d\n", - name, authenticateChildren.n_max, authenticateChildren.n_startup, authenticateChildren.n_idle, authenticateChildren.concurrency); - storeAppendPrintf(entry, "%s %s keep_alive %s\n", name, "ntlm", keep_alive ? "on" : "off"); + storeAppendPrintf(entry, "\n%s %s keep_alive %s\n", name, "ntlm", keep_alive ? "on" : "off"); Auth::Config::dump(entry, name, scheme); } @@ -130,8 +128,6 @@ parse_wordlist(&authenticateProgram); requirePathnameExists("auth_param ntlm program", authenticateProgram->key); - } else if (strcmp(param_str, "children") == 0) { - authenticateChildren.parseConfig(); } else if (strcmp(param_str, "keep_alive") == 0) { parse_onoff(&keep_alive); } else