Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 139148 - useradd seg faults where user home is /dev/null
Summary: useradd seg faults where user home is /dev/null
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-04 03:22 UTC by David Roussel
Modified: 2006-07-04 12:54 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 David Roussel 2006-07-04 03:22:27 UTC
# userdel -fr guest
Segmentation fault
# userdel -f -r guest
Segmentation fault
# userdel -f guest

I think it was because guest had a home dir of /dev/null, so the -r option must have cause useradd to open /dev/null as a directory, and read null from it.

This is using the userdel from sys-apps/shadow-4.0.15-r2
Comment 1 SpanKY gentoo-dev 2006-07-04 12:54:50 UTC
yep ... there's some code which calls opendir(/dev/null) and then doesnt check the return value

fixed in 4.0.16-r1 and e-mailed upstream, thanks for the report