Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 8124

Summary: Apache ebuild fails with duplicate match in /etc/passwd
Product: Gentoo Linux Reporter: Malcolm Scott <m>
Component: New packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: VERIFIED FIXED    
Severity: normal    
Priority: High    
Version: 1.2   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Malcolm Scott 2002-09-19 15:43:38 UTC
If there are multiple lines in /etc/passwd containing the string "apache" (e.g.
if another username or someone's home directory contains that string) then the
line in the apache-1.3.x ebuilds which detects Apache's home dir fails.

The line that causes the fault is:
DATA_DIR=`grep apache /etc/passwd | cut -d: -f6`

If there are multiple matches, DATA_DIR gets set to the home directory of each
line, causing 'configure' to complain about invalid options.

The line could be fixed by changing it to:

DATA_DIR=`grep "^apache:" /etc/passwd | cut -d: -f6`

...i.e. only detect "apache:" at the beginning of a line.
Comment 1 SpanKY gentoo-dev 2002-09-19 15:57:41 UTC
commited to cvs
Comment 2 Malcolm Scott 2002-09-19 17:33:29 UTC
Thanks. Verifying fixed.