diff options
author | bapt <bapt@FreeBSD.org> | 2014-11-04 07:50:48 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2014-11-04 07:50:48 +0000 |
commit | 5daa84302ccbaf4981896584f5e074c393ea0e28 (patch) | |
tree | a8591c164d69b5435eb5642619084f0464a94143 /usr.sbin/pw/Makefile | |
parent | fa183f01741aa54ff3ba0fcf31b7b1404b7a7e53 (diff) | |
download | FreeBSD-src-5daa84302ccbaf4981896584f5e074c393ea0e28.zip FreeBSD-src-5daa84302ccbaf4981896584f5e074c393ea0e28.tar.gz |
MFC: 272445,272578,273772,273779,273782,273786,273787,273791
Add a test for bug 191427 where pw(8) will go into an infinite loop
Add some tests for modifying groups
When a group is renamed then the group has been invalidated for sure.
In that case get the group information using the new name.
Fix a regression in pw usermod -G list
The user was perperly adding the to different groups from "list" but was not
removed from the other groups it could have belong to.
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
Ensure pw userdel -u <invalid> do not try to remove root
Check the uid passed is actually a number as early as possible
Fix renaming a group via the gr_copy function
Add a regression test to pw(8) because the bug was discovered via using:
pw groupmod
PR: 193704 [1], 185666 [2], 90114 [3], 187189 [4]
Submitted by: Marc de la Gueronniere [4]
Reported by: az [1], sub.mesa@gmail.com [2], bkoenig@cs.tu-berlin.de [3],
mcdouga9@egr.msu.edu [4]
Diffstat (limited to 'usr.sbin/pw/Makefile')
-rw-r--r-- | usr.sbin/pw/Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/pw/Makefile b/usr.sbin/pw/Makefile index eae0b87..b3c8a39 100644 --- a/usr.sbin/pw/Makefile +++ b/usr.sbin/pw/Makefile @@ -1,14 +1,20 @@ # $FreeBSD$ +.include <bsd.own.mk> + PROG= pw MAN= pw.conf.5 pw.8 SRCS= pw.c pw_conf.c pw_user.c pw_group.c pw_log.c pw_nis.c pw_vpw.c \ grupd.c pwupd.c fileupd.c psdate.c \ bitmap.c cpdir.c rm_r.c -WARNS?= 2 +WARNS?= 3 DPADD= ${LIBCRYPT} ${LIBUTIL} LDADD= -lcrypt -lutil +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include <bsd.prog.mk> |