Bug 59122 - rpm core dumps reading /etc/passwd file with NIS compat entries
Summary: rpm core dumps reading /etc/passwd file with NIS compat entries
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pam
Version: 7.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-01-31 11:40 UTC by Paul Wouters
Modified: 2013-07-02 22:55 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2004-10-03 15:41:25 UTC


Attachments (Terms of Use)

Description Paul Wouters 2002-01-31 11:40:26 UTC
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 14:33:46 UTC
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 15:07:20 UTC
I am not using LDAP.

Comment 3 Jeff Johnson 2002-01-31 15:28:54 UTC
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-08 00:11:29 UTC
Does turning nscd on cause this to stop happening?

Comment 5 Paul Wouters 2002-03-09 13:37:48 UTC
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.