summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_trap.c
diff options
context:
space:
mode:
authorrse <rse@FreeBSD.org>2005-10-14 11:21:21 +0000
committerrse <rse@FreeBSD.org>2005-10-14 11:21:21 +0000
commit6b2407fb7677ef2b8cef5c0925b3fe88a6ec7ca4 (patch)
tree6482fdfe267f5072d7ca11677dc08fc06890fa04 /sys/kern/subr_trap.c
parent128747ab0bc149174ba589e08ed1040963a16ad4 (diff)
downloadFreeBSD-src-6b2407fb7677ef2b8cef5c0925b3fe88a6ec7ca4.zip
FreeBSD-src-6b2407fb7677ef2b8cef5c0925b3fe88a6ec7ca4.tar.gz
Fix parsing of mdmfs(8) option "-w <user>:<group>" in case <user> or
<group> is a numeric user/group ID instead of a user/group name (as explicitly intended to be allowed by both the manual page and the implementation). Before this fix, mdmfs(8) aborted: | # mdmfs -s 32m -w 0:0 md /var/tmp/foo | Assertion failed: (mip->mi_have_uid), function extract_ugid, file /usr/src/sbin/mdmfs/mdmfs.c, line 555. | Abort trap (core dumped) The "mi_have_[ug]id" fields were only set in case a name lookup was successful. Instead they also have to be set in case the string to integer conversion was successful. Additionally, as a result of this fix, two assertions at the end of the function are now always true and hence can be just be removed. It is guarrantied that both the UID and the GID are set when the function returns regularily, else it would have been already bailed out with usage()/exit(3) or errx(3) before. Spotted by: Christoph Schug <chris@schug.net> MFC after: 3 days
Diffstat (limited to 'sys/kern/subr_trap.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud