Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 8124 - Apache ebuild fails with duplicate match in /etc/passwd
Summary: Apache ebuild fails with duplicate match in /etc/passwd
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-19 15:43 UTC by Malcolm Scott
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.