4 ms·
Hmm, there are two possible candidates in the init.d script for the RHEL 6 package of an older version of squid (doesn't look like bug submitter is using a curr
by thaumaturgy 12y ago
Hmm, there are two possible candidates in the init.d script for the RHEL 6 package of an older version of squid (doesn't look like bug submitter is using a current version).
In stop():
rm -rf $SQUID_PIDFILE_DIR/*
and in restart():
rm -rf $SQUID_PIDFILE_DIR/*
SQUID_PIDFILE_DIR is hardcoded to "/var/run/squid" at the top of my copy of the init script. But, neither of those rm commands check first to make sure that SQUID_PIDFILE_DIR isn't empty (or, better yet, is in /var and doesn't contain ".."), and either the submitter's copy of the script is mangled or something else somewhere is stomping on SQUID_PIDFILE_DIR in the shell environment.
...I should grep my init scripts for "rm".
- rachelbythebay 12y agosquid-3.1.10-29.el6.src.rpm (from ftp.redhat.com, buried where they keep SRPMs) has squid.init within, and that file has no mention of SQUID_PIDFILE_DIR. A few other spot-checked versions are the same way. https://github.com/mozilla-services/squid-rpm/blob/master/SOURCES/squid.init https://github.com/mozilla-services/squid-rpm/blob/master/SO... ... however ... whatever that is, does. Did they take this upstream init script somehow?
- ato 12y agoThis looks like it: https://bugzilla.redhat.com/show_bug.cgi?id=1102343 https://bugzilla.redhat.com/show_bug.cgi?id=1102343 I guess they applied that change which was obviously written against a very different init script where the variable is actually defined, got QA to test it and immediately backed it out.
- thaumaturgy 12y agoOh, good call. Yeah, you found it.
- thaumaturgy 12y agoThat would be my guess too, although the package maintainer confirmed it on (presumably) a fresh install. I can't find a candidate rm command anywhere in the SRPM, so maybe an upstream file got merged into distrib somehow? I don't have access to an RHEL system to try it out, and can't find the distrib RPM yet to check.