HomeFreeBSD

Do not delete the group wheel when bad argument is passed to pw groupdel -g

Description

Do not delete the group wheel when bad argument is passed to pw groupdel -g

Check that the -g argument is actually a number, if not report an error.
This argument is converted without checking with atoi(3) later so without this
check it converts any alpha entries into 0 meaning it deletes the group wheel

Add a regression test about it

PR: 90114
Reported by: bkoenig@cs.tu-berlin.de
MFC after: 1 week

Details

Provenance
baptAuthored on
Parents
rS273781: MFH
Branches
Unknown
Tags
Unknown

Event Timeline