Bug 59122 - rpm core dumps reading /etc/passwd file with NIS compat entries
rpm core dumps reading /etc/passwd file with NIS compat entries
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: pam (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jindrich Novy
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-01-31 06:40 EST by Paul Wouters
Modified: 2013-07-02 18:55 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-03 11:41:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Paul Wouters 2002-01-31 06:40:26 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.5) Gecko/20011013

Description of problem:
rom core dumps when trying to manipulate /etc/passwd on a NIS system
with compat entries in the /etc/passwd file, such as +@nostaff::0:0:::

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.echo "+@staff::0:0:::" >> /etc/passwd
2.echo "+:x:0:0:::/bin/nologin" >> /etc/passwd
3.rpm -hiv any.rpm that tries to add a user (eg webalizer, apache)
	

Actual Results:  strace -v -f rpm -hiv webalizer-2.01.6-1.i386.rpm
[ snip ]

open("/etc/passwd", O_RDONLY)           = 13
fcntl64(0xd, 0x1, 0, 0x81d8904)         = 0
fcntl64(0xd, 0x2, 0x1, 0x81d8904)       = 0
fstat64(13, {st_dev=makedev(3, 5), st_ino=979, st_mode=S_IFREG|0644, st_nlink=1,
st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=1531,
st_atime=2002/01/31-12:36:32, st_mtime=2002/01/29-02:22:10,
st_ctime=2002/01/29-02:22:10}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x4041b000
_llseek(13, 0, [0], SEEK_CUR)           = 0
read(13, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 1531
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++


Expected Results:  The package should have installed fine? :)

Additional info:
Comment 1 Jeff Johnson 2002-01-31 09:33:46 EST
Are you using LDAP passwords? If so, then you will need to run
nscd. The problem is in LDAP, not rpm, but affects statically linked
programs like /bin/rpm. Running nscd works around a linkage
loop problem with LDAP deep in pam modules.

Reopen this bug if the above was not the problem.
Comment 2 Paul Wouters 2002-01-31 10:07:20 EST
I am not using LDAP.
Comment 3 Jeff Johnson 2002-01-31 10:28:54 EST
OK. This isn't an rpm problem however, but something in
user authentication modules.

Off to PAM for a 2nd opinion ...
Comment 4 Nalin Dahyabhai 2002-03-07 19:11:29 EST
Does turning nscd on cause this to stop happening?
Comment 5 Paul Wouters 2002-03-09 08:37:48 EST
Hmm,

Trying to reproduce the error for testing on two systems that had these 
symptoms before, but I no longer can reproduce the bug on systems with
pam-0.75-14 or pam-0.75-19, even without running nscd.

Guess something, somewhere, got fixed for this.

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