Bug 31796 - sudo breaks htpasswd from within perl scripts
sudo breaks htpasswd from within perl scripts
Product: Red Hat Linux
Classification: Retired
Component: apache (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-03-14 15:10 EST by Tom Wood
Modified: 2007-04-18 12:32 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-21 06:51:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tom Wood 2001-03-14 15:10:25 EST
The latest sudo picked up from up2date today (3/14/2001) causes "htpasswd -b" to empty the existing .htaccess file when called from a CGI perl script.  "rpm -e sudo" is a workaround.

I suspect the problem lies with the htaccess file being owned by root and the httpd server running as nobody, but this behavior still shouldn't occur.

There are no error messages in the error_log for httpd, nor in /var/log/messages.
Comment 1 Bernhard Rosenkraenzer 2001-03-16 06:18:11 EST
There is nothing whatsoever sudo does to the system... sudo doesn't even touch 
any of the files used by apache.
Either htpasswd is badly broken, or your script is.
Assigning to apache to verify if htpasswd might be the problem.
Comment 2 Bernhard Rosenkraenzer 2001-03-16 06:19:58 EST
From a very quick look at the htpasswd source (basically grepping it for 
sudo), I'd say your script is doing something odd.
Comment 3 Tom Wood 2001-03-16 10:37:39 EST
Script was working perfectly before up2date run, where only sudo was selected and upgraded.  Script worked perfectly after "rpm -e sudo" run.  I would suggest that htpasswd uses sudo when called through apache CGI, although chronic laziness precludes me digging through the source.

I'll get the script from the perl developer and attach it in a later message.
Comment 4 Joe Orton 2004-09-21 06:51:39 EDT
Thanks for the report.  This is a mass bug update; since this release
of Red Hat Linux is no longer supported, please either:

a) try and reproduce the bug with a supported version of Red Hat
Enterprise Linux or Fedora Core, and re-open this bug as appropriate
after changing the Product field, or,

b) if relevant, try and reproduce this bug using the current version
of the upstream package, and report the bug upstream.

Note You need to log in before you can comment on or make changes to this bug.