Bug 139148 - useradd seg faults where user home is /dev/null
Bug#: 139148 Product:  Gentoo Linux Version: 2006.0 Platform: All
OS/Version: Other Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: base-system@gentoo.org Reported By: gentoo-bugs@diroussel.xsmail.com
Component: baselayout
URL: 
Summary: useradd seg faults where user home is /dev/null
Keywords:  
Status Whiteboard: 
Opened: 2006-07-04 03:22 0000
Description:   Opened: 2006-07-04 03:22 0000
# 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 From SpanKY 2006-07-04 12:54:50 0000 -------
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