HomeFreeBSD

MFC r218019: Do not trip a KASSERT if /dev/null cannot be opened for a
rS219677Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

MFC r218019: Do not trip a KASSERT if /dev/null cannot be opened for a
setuid program.

The fdcheckstd() function makes sure fds 0, 1 and 2 are open by opening
/dev/null. If this fails (e.g. missing devfs or wrong permissions),
fdcheckstd() will return failure and the process will exit as if it received
SIGABRT. The KASSERT is only to check that kern_open() returns the expected
fd, given that it succeeded.

Tripping the KASSERT is most likely if fd 0 is open but fd 1 or 2 are not.

Details

Provenance
jillesAuthored on
Parents
rS219676: Do not let machdep.tsc_freq modify tsc_freq itself. It is bad for i386 as
Branches
Unknown
Tags
Unknown

Event Timeline