From: Tianyin Xu Date: Sun, 3 Mar 2013 07:10:22 +0000 (-0700) Subject: Make all the parameter names and options case sensitive X-Git-Tag: SQUID_3_4_0_1~248 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a37d60704bcb4dd9af07b5de3dadd216667177a5;p=thirdparty%2Fsquid.git Make all the parameter names and options case sensitive Changes "strcasecmp" to "strcmp". This mainly deals with constant configuration options (e.g., enumerative options and boolean options). For directive names, it's already consistent (case sensitive), the parser functions are auto-generated. The case sensitivity of the following parameter values is not changed: - user and group names - host names - domain and realm names - ACL names - filesystem names - options in request/response/digest messages --- diff --git a/helpers/basic_auth/MSNT/confload.cc b/helpers/basic_auth/MSNT/confload.cc index eebf3001fe..7a0e1f04df 100644 --- a/helpers/basic_auth/MSNT/confload.cc +++ b/helpers/basic_auth/MSNT/confload.cc @@ -122,7 +122,7 @@ ProcessLine(char *Linebuf) return; /* Check for server line. Check for 3 parameters. */ - if (strcasecmp(Directive, "server") == 0) { + if (strcmp(Directive, "server") == 0) { Param1 = strtok(NULL, " \t\n"); if (NULL == Param1) { syslog(LOG_ERR, "ProcessLine: 'server' missing PDC parameter."); @@ -142,7 +142,7 @@ ProcessLine(char *Linebuf) return; } /* Check for denyusers line */ - if (strcasecmp(Directive, "denyusers") == 0) { + if (strcmp(Directive, "denyusers") == 0) { Param1 = strtok(NULL, " \t\n"); if (NULL == Param1) { @@ -154,7 +154,7 @@ ProcessLine(char *Linebuf) return; } /* Check for allowusers line */ - if (strcasecmp(Directive, "allowusers") == 0) { + if (strcmp(Directive, "allowusers") == 0) { Param1 = strtok(NULL, " \t\n"); if (NULL == Param1) { diff --git a/src/acl/Ip.cc b/src/acl/Ip.cc index 9d599ea5ad..ab0c808b04 100644 --- a/src/acl/Ip.cc +++ b/src/acl/Ip.cc @@ -260,7 +260,7 @@ acl_ip_data::FactoryParse(const char *t) debugs(28, 5, "aclIpParseIpData: " << t); /* Special ACL RHS "all" matches entire Internet */ - if (strcasecmp(t, "all") == 0) { + if (strcmp(t, "all") == 0) { debugs(28, 9, "aclIpParseIpData: magic 'all' found."); q->addr1.SetAnyAddr(); q->addr2.SetEmpty(); @@ -270,8 +270,8 @@ acl_ip_data::FactoryParse(const char *t) /* Detect some old broken strings equivalent to 'all'. * treat them nicely. But be loud until its fixed. */ - if (strcasecmp(t, "0/0") == 0 || strcasecmp(t, "0.0.0.0/0") == 0 || strcasecmp(t, "0.0.0.0/0.0.0.0") == 0 || - strcasecmp(t, "0.0.0.0-255.255.255.255") == 0 || strcasecmp(t, "0.0.0.0-0.0.0.0/0") == 0) { + if (strcmp(t, "0/0") == 0 || strcmp(t, "0.0.0.0/0") == 0 || strcmp(t, "0.0.0.0/0.0.0.0") == 0 || + strcmp(t, "0.0.0.0-255.255.255.255") == 0 || strcmp(t, "0.0.0.0-0.0.0.0/0") == 0) { debugs(28,DBG_CRITICAL, "ERROR: '" << t << "' needs to be replaced by the term 'all'."); debugs(28,DBG_CRITICAL, "SECURITY NOTICE: Overriding config setting. Using 'all' instead."); @@ -284,14 +284,14 @@ acl_ip_data::FactoryParse(const char *t) /* Special ACL RHS "ipv4" matches IPv4 Internet * A nod to IANA; we include the entire class space in case * they manage to find a way to recover and use it */ - if (strcasecmp(t, "ipv4") == 0) { + if (strcmp(t, "ipv4") == 0) { q->mask.SetNoAddr(); q->mask.ApplyMask(0, AF_INET); return q; } /* Special ACL RHS "ipv6" matches IPv6-Unicast Internet */ - if (strcasecmp(t, "ipv6") == 0) { + if (strcmp(t, "ipv6") == 0) { debugs(28, 9, "aclIpParseIpData: magic 'ipv6' found."); r = q; // save head of the list for result. diff --git a/src/adaptation/ServiceConfig.cc b/src/adaptation/ServiceConfig.cc index 6bc24cc137..cc73254dee 100644 --- a/src/adaptation/ServiceConfig.cc +++ b/src/adaptation/ServiceConfig.cc @@ -49,10 +49,10 @@ Adaptation::ServiceConfig::parseVectPoint(const char *service_configConfig) cons if (q) t = q + 1; - if (!strcasecmp(t, "precache")) + if (!strcmp(t, "precache")) return Adaptation::pointPreCache; - if (!strcasecmp(t, "postcache")) + if (!strcmp(t, "postcache")) return Adaptation::pointPostCache; return Adaptation::pointNone; diff --git a/src/auth/basic/auth_basic.cc b/src/auth/basic/auth_basic.cc index 7efbd0494a..71002efeab 100644 --- a/src/auth/basic/auth_basic.cc +++ b/src/auth/basic/auth_basic.cc @@ -167,22 +167,22 @@ Auth::Basic::Config::~Config() void Auth::Basic::Config::parse(Auth::Config * scheme, int n_configured, char *param_str) { - if (strcasecmp(param_str, "program") == 0) { + if (strcmp(param_str, "program") == 0) { if (authenticateProgram) wordlistDestroy(&authenticateProgram); parse_wordlist(&authenticateProgram); requirePathnameExists("auth_param basic program", authenticateProgram->key); - } else if (strcasecmp(param_str, "children") == 0) { + } else if (strcmp(param_str, "children") == 0) { authenticateChildren.parseConfig(); - } else if (strcasecmp(param_str, "realm") == 0) { + } else if (strcmp(param_str, "realm") == 0) { parse_eol(&basicAuthRealm); - } else if (strcasecmp(param_str, "credentialsttl") == 0) { + } else if (strcmp(param_str, "credentialsttl") == 0) { parse_time_t(&credentialsTTL); - } else if (strcasecmp(param_str, "casesensitive") == 0) { + } else if (strcmp(param_str, "casesensitive") == 0) { parse_onoff(&casesensitive); - } else if (strcasecmp(param_str, "utf8") == 0) { + } else if (strcmp(param_str, "utf8") == 0) { parse_onoff(&utf8); } else { debugs(29, DBG_CRITICAL, HERE << "unrecognised basic auth scheme parameter '" << param_str << "'"); diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/auth_digest.cc index 7f47df99b1..a51ff5b6d1 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -641,30 +641,30 @@ Auth::Digest::Config::Config() : void Auth::Digest::Config::parse(Auth::Config * scheme, int n_configured, char *param_str) { - if (strcasecmp(param_str, "program") == 0) { + if (strcmp(param_str, "program") == 0) { if (authenticateProgram) wordlistDestroy(&authenticateProgram); parse_wordlist(&authenticateProgram); requirePathnameExists("auth_param digest program", authenticateProgram->key); - } else if (strcasecmp(param_str, "children") == 0) { + } else if (strcmp(param_str, "children") == 0) { authenticateChildren.parseConfig(); - } else if (strcasecmp(param_str, "realm") == 0) { + } else if (strcmp(param_str, "realm") == 0) { parse_eol(&digestAuthRealm); - } else if (strcasecmp(param_str, "nonce_garbage_interval") == 0) { + } else if (strcmp(param_str, "nonce_garbage_interval") == 0) { parse_time_t(&nonceGCInterval); - } else if (strcasecmp(param_str, "nonce_max_duration") == 0) { + } else if (strcmp(param_str, "nonce_max_duration") == 0) { parse_time_t(&noncemaxduration); - } else if (strcasecmp(param_str, "nonce_max_count") == 0) { + } else if (strcmp(param_str, "nonce_max_count") == 0) { parse_int((int *) &noncemaxuses); - } else if (strcasecmp(param_str, "nonce_strictness") == 0) { + } else if (strcmp(param_str, "nonce_strictness") == 0) { parse_onoff(&NonceStrictness); - } else if (strcasecmp(param_str, "check_nonce_count") == 0) { + } else if (strcmp(param_str, "check_nonce_count") == 0) { parse_onoff(&CheckNonceCount); - } else if (strcasecmp(param_str, "post_workaround") == 0) { + } else if (strcmp(param_str, "post_workaround") == 0) { parse_onoff(&PostWorkaround); - } else if (strcasecmp(param_str, "utf8") == 0) { + } else if (strcmp(param_str, "utf8") == 0) { parse_onoff(&utf8); } else { debugs(29, DBG_CRITICAL, "unrecognised digest auth scheme parameter '" << param_str << "'"); diff --git a/src/auth/negotiate/auth_negotiate.cc b/src/auth/negotiate/auth_negotiate.cc index 7a8cc41e26..dd0b75f114 100644 --- a/src/auth/negotiate/auth_negotiate.cc +++ b/src/auth/negotiate/auth_negotiate.cc @@ -129,16 +129,16 @@ Auth::Negotiate::Config::Config() : keep_alive(1) void Auth::Negotiate::Config::parse(Auth::Config * scheme, int n_configured, char *param_str) { - if (strcasecmp(param_str, "program") == 0) { + if (strcmp(param_str, "program") == 0) { if (authenticateProgram) wordlistDestroy(&authenticateProgram); parse_wordlist(&authenticateProgram); requirePathnameExists("auth_param negotiate program", authenticateProgram->key); - } else if (strcasecmp(param_str, "children") == 0) { + } else if (strcmp(param_str, "children") == 0) { authenticateChildren.parseConfig(); - } else if (strcasecmp(param_str, "keep_alive") == 0) { + } else if (strcmp(param_str, "keep_alive") == 0) { parse_onoff(&keep_alive); } else { debugs(29, DBG_CRITICAL, "ERROR: unrecognised Negotiate auth scheme parameter '" << param_str << "'"); diff --git a/src/auth/ntlm/auth_ntlm.cc b/src/auth/ntlm/auth_ntlm.cc index bada7d0658..34b1478c81 100644 --- a/src/auth/ntlm/auth_ntlm.cc +++ b/src/auth/ntlm/auth_ntlm.cc @@ -121,16 +121,16 @@ Auth::Ntlm::Config::Config() : keep_alive(1) void Auth::Ntlm::Config::parse(Auth::Config * scheme, int n_configured, char *param_str) { - if (strcasecmp(param_str, "program") == 0) { + if (strcmp(param_str, "program") == 0) { if (authenticateProgram) wordlistDestroy(&authenticateProgram); parse_wordlist(&authenticateProgram); requirePathnameExists("auth_param ntlm program", authenticateProgram->key); - } else if (strcasecmp(param_str, "children") == 0) { + } else if (strcmp(param_str, "children") == 0) { authenticateChildren.parseConfig(); - } else if (strcasecmp(param_str, "keep_alive") == 0) { + } else if (strcmp(param_str, "keep_alive") == 0) { parse_onoff(&keep_alive); } else { debugs(29, DBG_CRITICAL, "ERROR unrecognised NTLM auth scheme parameter '" << param_str << "'"); diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 0d859973d8..da7e93d6b2 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -2138,29 +2138,29 @@ parse_peer(CachePeer ** head) p->connection_auth = 2; /* auto */ while ((token = strtok(NULL, w_space))) { - if (!strcasecmp(token, "proxy-only")) { + if (!strcmp(token, "proxy-only")) { p->options.proxy_only = true; - } else if (!strcasecmp(token, "no-query")) { + } else if (!strcmp(token, "no-query")) { p->options.no_query = true; - } else if (!strcasecmp(token, "background-ping")) { + } else if (!strcmp(token, "background-ping")) { p->options.background_ping = true; - } else if (!strcasecmp(token, "no-digest")) { + } else if (!strcmp(token, "no-digest")) { p->options.no_digest = true; - } else if (!strcasecmp(token, "no-tproxy")) { + } else if (!strcmp(token, "no-tproxy")) { p->options.no_tproxy = true; - } else if (!strcasecmp(token, "multicast-responder")) { + } else if (!strcmp(token, "multicast-responder")) { p->options.mcast_responder = true; #if PEER_MULTICAST_SIBLINGS - } else if (!strcasecmp(token, "multicast-siblings")) { + } else if (!strcmp(token, "multicast-siblings")) { p->options.mcast_siblings = true; #endif - } else if (!strncasecmp(token, "weight=", 7)) { + } else if (!strncmp(token, "weight=", 7)) { p->weight = xatoi(token + 7); - } else if (!strncasecmp(token, "basetime=", 9)) { + } else if (!strncmp(token, "basetime=", 9)) { p->basetime = xatoi(token + 9); - } else if (!strcasecmp(token, "closest-only")) { + } else if (!strcmp(token, "closest-only")) { p->options.closest_only = true; - } else if (!strncasecmp(token, "ttl=", 4)) { + } else if (!strncmp(token, "ttl=", 4)) { p->mcast.ttl = xatoi(token + 4); if (p->mcast.ttl < 0) @@ -2168,16 +2168,16 @@ parse_peer(CachePeer ** head) if (p->mcast.ttl > 128) p->mcast.ttl = 128; - } else if (!strcasecmp(token, "default")) { + } else if (!strcmp(token, "default")) { p->options.default_parent = true; - } else if (!strcasecmp(token, "round-robin")) { + } else if (!strcmp(token, "round-robin")) { p->options.roundrobin = true; - } else if (!strcasecmp(token, "weighted-round-robin")) { + } else if (!strcmp(token, "weighted-round-robin")) { p->options.weighted_roundrobin = true; #if USE_HTCP - } else if (!strcasecmp(token, "htcp")) { + } else if (!strcmp(token, "htcp")) { p->options.htcp = true; - } else if (!strncasecmp(token, "htcp=", 5) || !strncasecmp(token, "htcp-", 5)) { + } else if (!strncmp(token, "htcp=", 5) || !strncmp(token, "htcp-", 5)) { /* Note: The htcp- form is deprecated, replaced by htcp= */ p->options.htcp = true; char *tmp = xstrdup(token+5); @@ -2188,19 +2188,19 @@ parse_peer(CachePeer ** head) *nextmode = '\0'; ++nextmode; } - if (!strcasecmp(mode, "no-clr")) { + if (!strcmp(mode, "no-clr")) { if (p->options.htcp_only_clr) fatalf("parse_peer: can't set htcp-no-clr and htcp-only-clr simultaneously"); p->options.htcp_no_clr = true; - } else if (!strcasecmp(mode, "no-purge-clr")) { + } else if (!strcmp(mode, "no-purge-clr")) { p->options.htcp_no_purge_clr = true; - } else if (!strcasecmp(mode, "only-clr")) { + } else if (!strcmp(mode, "only-clr")) { if (p->options.htcp_no_clr) fatalf("parse_peer: can't set htcp no-clr and only-clr simultaneously"); p->options.htcp_only_clr = true; - } else if (!strcasecmp(mode, "forward-clr")) { + } else if (!strcmp(mode, "forward-clr")) { p->options.htcp_forward_clr = true; - } else if (!strcasecmp(mode, "oldsquid")) { + } else if (!strcmp(mode, "oldsquid")) { p->options.htcp_oldsquid = true; } else { fatalf("invalid HTCP mode '%s'", mode); @@ -2208,15 +2208,15 @@ parse_peer(CachePeer ** head) } safe_free(tmp); #endif - } else if (!strcasecmp(token, "no-netdb-exchange")) { + } else if (!strcmp(token, "no-netdb-exchange")) { p->options.no_netdb_exchange = true; - } else if (!strcasecmp(token, "carp")) { + } else if (!strcmp(token, "carp")) { if (p->type != PEER_PARENT) fatalf("parse_peer: non-parent carp peer %s/%d\n", p->host, p->http_port); p->options.carp = true; - } else if (!strncasecmp(token, "carp-key=", 9)) { + } else if (!strncmp(token, "carp-key=", 9)) { if (p->options.carp != true) fatalf("parse_peer: carp-key specified on non-carp peer %s/%d\n", p->host, p->http_port); p->options.carp_key.set = true; @@ -2224,21 +2224,21 @@ parse_peer(CachePeer ** head) for (; key; key = nextkey) { nextkey=strchr(key,','); if (nextkey) ++nextkey; // skip the comma, any - if (0==strncasecmp(key,"scheme",6)) { + if (0==strncmp(key,"scheme",6)) { p->options.carp_key.scheme = true; - } else if (0==strncasecmp(key,"host",4)) { + } else if (0==strncmp(key,"host",4)) { p->options.carp_key.host = true; - } else if (0==strncasecmp(key,"port",4)) { + } else if (0==strncmp(key,"port",4)) { p->options.carp_key.port = true; - } else if (0==strncasecmp(key,"path",4)) { + } else if (0==strncmp(key,"path",4)) { p->options.carp_key.path = true; - } else if (0==strncasecmp(key,"params",6)) { + } else if (0==strncmp(key,"params",6)) { p->options.carp_key.params = true; } else { fatalf("invalid carp-key '%s'",key); } } - } else if (!strcasecmp(token, "userhash")) { + } else if (!strcmp(token, "userhash")) { #if USE_AUTH if (p->type != PEER_PARENT) fatalf("parse_peer: non-parent userhash peer %s/%d\n", p->host, p->http_port); @@ -2247,42 +2247,42 @@ parse_peer(CachePeer ** head) #else fatalf("parse_peer: userhash requires authentication. peer %s/%d\n", p->host, p->http_port); #endif - } else if (!strcasecmp(token, "sourcehash")) { + } else if (!strcmp(token, "sourcehash")) { if (p->type != PEER_PARENT) fatalf("parse_peer: non-parent sourcehash peer %s/%d\n", p->host, p->http_port); p->options.sourcehash = true; - } else if (!strcasecmp(token, "no-delay")) { + } else if (!strcmp(token, "no-delay")) { #if USE_DELAY_POOLS p->options.no_delay = true; #else debugs(0, DBG_CRITICAL, "WARNING: cache_peer option 'no-delay' requires --enable-delay-pools"); #endif - } else if (!strncasecmp(token, "login=", 6)) { + } else if (!strncmp(token, "login=", 6)) { p->login = xstrdup(token + 6); rfc1738_unescape(p->login); - } else if (!strncasecmp(token, "connect-timeout=", 16)) { + } else if (!strncmp(token, "connect-timeout=", 16)) { p->connect_timeout = xatoi(token + 16); - } else if (!strncasecmp(token, "connect-fail-limit=", 19)) { + } else if (!strncmp(token, "connect-fail-limit=", 19)) { p->connect_fail_limit = xatoi(token + 19); #if USE_CACHE_DIGESTS - } else if (!strncasecmp(token, "digest-url=", 11)) { + } else if (!strncmp(token, "digest-url=", 11)) { p->digest_url = xstrdup(token + 11); #endif - } else if (!strcasecmp(token, "allow-miss")) { + } else if (!strcmp(token, "allow-miss")) { p->options.allow_miss = true; - } else if (!strncasecmp(token, "max-conn=", 9)) { + } else if (!strncmp(token, "max-conn=", 9)) { p->max_conn = xatoi(token + 9); - } else if (!strcasecmp(token, "originserver")) { + } else if (!strcmp(token, "originserver")) { p->options.originserver = true; - } else if (!strncasecmp(token, "name=", 5)) { + } else if (!strncmp(token, "name=", 5)) { safe_free(p->name); if (token[5]) p->name = xstrdup(token + 5); - } else if (!strncasecmp(token, "forceddomain=", 13)) { + } else if (!strncmp(token, "forceddomain=", 13)) { safe_free(p->domain); if (token[13]) @@ -2630,14 +2630,14 @@ parse_onoff(int *var) if (token == NULL) self_destruct(); - if (!strcasecmp(token, "on")) { + if (!strcmp(token, "on")) { *var = 1; - } else if (!strcasecmp(token, "enable")) { + } else if (!strcmp(token, "enable")) { debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'enable' is deprecated. Please update to use 'on'."); *var = 1; - } else if (!strcasecmp(token, "off")) { + } else if (!strcmp(token, "off")) { *var = 0; - } else if (!strcasecmp(token, "disable")) { + } else if (!strcmp(token, "disable")) { debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'disable' is deprecated. Please update to use 'off'."); *var = 0; } else { @@ -2671,16 +2671,16 @@ parse_tristate(int *var) if (token == NULL) self_destruct(); - if (!strcasecmp(token, "on")) { + if (!strcmp(token, "on")) { *var = 1; - } else if (!strcasecmp(token, "enable")) { + } else if (!strcmp(token, "enable")) { debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'enable' is deprecated. Please update to use value 'on'."); *var = 1; - } else if (!strcasecmp(token, "warn")) { + } else if (!strcmp(token, "warn")) { *var = -1; - } else if (!strcasecmp(token, "off")) { + } else if (!strcmp(token, "off")) { *var = 0; - } else if (!strcasecmp(token, "disable")) { + } else if (!strcmp(token, "disable")) { debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'disable' is deprecated. Please update to use value 'off'."); *var = 0; } else { @@ -3266,15 +3266,15 @@ parse_uri_whitespace(int *var) if (token == NULL) self_destruct(); - if (!strcasecmp(token, "strip")) + if (!strcmp(token, "strip")) *var = URI_WHITESPACE_STRIP; - else if (!strcasecmp(token, "deny")) + else if (!strcmp(token, "deny")) *var = URI_WHITESPACE_DENY; - else if (!strcasecmp(token, "allow")) + else if (!strcmp(token, "allow")) *var = URI_WHITESPACE_ALLOW; - else if (!strcasecmp(token, "encode")) + else if (!strcmp(token, "encode")) *var = URI_WHITESPACE_ENCODE; - else if (!strcasecmp(token, "chop")) + else if (!strcmp(token, "chop")) *var = URI_WHITESPACE_CHOP; else { debugs(0, DBG_PARSE_NOTE(2), "ERROR: Invalid option '" << token << "': 'uri_whitespace' accepts 'strip', 'deny', 'allow', 'encode', and 'chop'."); @@ -3416,19 +3416,19 @@ dump_memcachemode(StoreEntry * entry, const char *name, SquidConfig &config) peer_t parseNeighborType(const char *s) { - if (!strcasecmp(s, "parent")) + if (!strcmp(s, "parent")) return PEER_PARENT; - if (!strcasecmp(s, "neighbor")) + if (!strcmp(s, "neighbor")) return PEER_SIBLING; - if (!strcasecmp(s, "neighbour")) + if (!strcmp(s, "neighbour")) return PEER_SIBLING; - if (!strcasecmp(s, "sibling")) + if (!strcmp(s, "sibling")) return PEER_SIBLING; - if (!strcasecmp(s, "multicast")) + if (!strcmp(s, "multicast")) return PEER_MULTICAST; debugs(15, DBG_CRITICAL, "WARNING: Unknown neighbor type: " << s); @@ -3680,11 +3680,11 @@ parse_port_option(AnyP::PortCfg * s, char *token) } else if (strcmp(token, "connection-auth=on") == 0) { s->connection_auth_disabled = false; } else if (strncmp(token, "disable-pmtu-discovery=", 23) == 0) { - if (!strcasecmp(token + 23, "off")) + if (!strcmp(token + 23, "off")) s->disable_pmtu_discovery = DISABLE_PMTU_OFF; - else if (!strcasecmp(token + 23, "transparent")) + else if (!strcmp(token + 23, "transparent")) s->disable_pmtu_discovery = DISABLE_PMTU_TRANSPARENT; - else if (!strcasecmp(token + 23, "always")) + else if (!strcmp(token + 23, "always")) s->disable_pmtu_discovery = DISABLE_PMTU_ALWAYS; else self_destruct(); @@ -3711,7 +3711,7 @@ parse_port_option(AnyP::PortCfg * s, char *token) // t = strchr(t, ','); // not really needed, left in as documentation } #if USE_SSL - } else if (strcasecmp(token, "sslBump") == 0) { + } else if (strcmp(token, "sslBump") == 0) { debugs(3, DBG_CRITICAL, "WARNING: '" << token << "' is deprecated " << "in http_port. Use 'ssl-bump' instead."); s->flags.tunnelSslBumping = true; @@ -3811,7 +3811,7 @@ parsePortCfg(AnyP::PortCfg ** head, const char *optionName) } #if USE_SSL - if (strcasecmp(protocol, "https") == 0) { + if (strcmp(protocol, "https") == 0) { /* ssl-bump on https_port configuration requires either tproxy or intercept, and vice versa */ const bool hijacked = s->flags.isIntercepted(); if (s->flags.tunnelSslBumping && !hijacked) { diff --git a/src/dns_internal.cc b/src/dns_internal.cc index fdf5846aed..39a13d1827 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -388,7 +388,7 @@ idnsParseResolvConf(void) if (NULL == t) { continue; - } else if (strcasecmp(t, "nameserver") == 0) { + } else if (strcmp(t, "nameserver") == 0) { t = strtok(NULL, w_space); if (NULL == t) @@ -397,7 +397,7 @@ idnsParseResolvConf(void) debugs(78, DBG_IMPORTANT, "Adding nameserver " << t << " from " << _PATH_RESCONF); idnsAddNameserver(t); - } else if (strcasecmp(t, "domain") == 0) { + } else if (strcmp(t, "domain") == 0) { idnsFreeSearchpath(); t = strtok(NULL, w_space); @@ -407,7 +407,7 @@ idnsParseResolvConf(void) debugs(78, DBG_IMPORTANT, "Adding domain " << t << " from " << _PATH_RESCONF); idnsAddPathComponent(t); - } else if (strcasecmp(t, "search") == 0) { + } else if (strcmp(t, "search") == 0) { idnsFreeSearchpath(); while (NULL != t) { t = strtok(NULL, w_space); @@ -419,7 +419,7 @@ idnsParseResolvConf(void) idnsAddPathComponent(t); } - } else if (strcasecmp(t, "options") == 0) { + } else if (strcmp(t, "options") == 0) { while (NULL != t) { t = strtok(NULL, w_space); diff --git a/tools/cachemgr.cc b/tools/cachemgr.cc index a5d700f723..7d7faf191c 100644 --- a/tools/cachemgr.cc +++ b/tools/cachemgr.cc @@ -1054,23 +1054,23 @@ read_request(void) rfc1738_unescape(q); - if (0 == strcasecmp(t, "server") && strlen(q)) + if (0 == strcmp(t, "server") && strlen(q)) req->server = xstrdup(q); - else if (0 == strcasecmp(t, "host") && strlen(q)) + else if (0 == strcmp(t, "host") && strlen(q)) req->hostname = xstrdup(q); - else if (0 == strcasecmp(t, "port") && strlen(q)) + else if (0 == strcmp(t, "port") && strlen(q)) req->port = atoi(q); - else if (0 == strcasecmp(t, "user_name") && strlen(q)) + else if (0 == strcmp(t, "user_name") && strlen(q)) req->user_name = xstrdup(q); - else if (0 == strcasecmp(t, "passwd") && strlen(q)) + else if (0 == strcmp(t, "passwd") && strlen(q)) req->passwd = xstrdup(q); - else if (0 == strcasecmp(t, "auth") && strlen(q)) + else if (0 == strcmp(t, "auth") && strlen(q)) req->pub_auth = xstrdup(q), decode_pub_auth(req); - else if (0 == strcasecmp(t, "operation")) + else if (0 == strcmp(t, "operation")) req->action = xstrdup(q); - else if (0 == strcasecmp(t, "workers") && strlen(q)) + else if (0 == strcmp(t, "workers") && strlen(q)) req->workers = xstrdup(q); - else if (0 == strcasecmp(t, "processes") && strlen(q)) + else if (0 == strcmp(t, "processes") && strlen(q)) req->processes = xstrdup(q); } @@ -1289,7 +1289,7 @@ check_target_acl(const char *hostname, int port) if (strcmp(token, "*") == 0) ; /* Wildcard port specification */ - else if (strcasecmp(token, "any") == 0) + else if (strcmp(token, "any") == 0) ; /* Wildcard port specification */ else if (sscanf(token, "%d", &i) != 1)