pw_group.c (273772) | pw_group.c (273782) |
---|---|
1/*- 2 * Copyright (C) 1996 3 * David L. Nugent. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#ifndef lint 28static const char rcsid[] = | 1/*- 2 * Copyright (C) 1996 3 * David L. Nugent. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#ifndef lint 28static const char rcsid[] = |
29 "$FreeBSD: head/usr.sbin/pw/pw_group.c 273772 2014-10-28 11:20:30Z bapt $"; | 29 "$FreeBSD: head/usr.sbin/pw/pw_group.c 273782 2014-10-28 14:54:04Z bapt $"; |
30#endif /* not lint */ 31 32#include <ctype.h> 33#include <err.h> 34#include <termios.h> 35#include <stdbool.h> 36#include <unistd.h> 37#include <grp.h> --- 24 unchanged lines hidden (view full) --- 62 static struct group fakegroup = 63 { 64 "nogroup", 65 "*", 66 -1, 67 NULL 68 }; 69 | 30#endif /* not lint */ 31 32#include <ctype.h> 33#include <err.h> 34#include <termios.h> 35#include <stdbool.h> 36#include <unistd.h> 37#include <grp.h> --- 24 unchanged lines hidden (view full) --- 62 static struct group fakegroup = 63 { 64 "nogroup", 65 "*", 66 -1, 67 NULL 68 }; 69 |
70 if (a_gid != NULL) { 71 if (strspn(a_gid->val, "0123456789") != strlen(a_gid->val)) 72 errx(EX_USAGE, "-g expects a number"); 73 } 74 |
|
70 if (mode == M_LOCK || mode == M_UNLOCK) 71 errx(EX_USAGE, "'lock' command is not available for groups"); 72 73 /* 74 * With M_NEXT, we only need to return the 75 * next gid to stdout 76 */ 77 if (mode == M_NEXT) { --- 356 unchanged lines hidden --- | 75 if (mode == M_LOCK || mode == M_UNLOCK) 76 errx(EX_USAGE, "'lock' command is not available for groups"); 77 78 /* 79 * With M_NEXT, we only need to return the 80 * next gid to stdout 81 */ 82 if (mode == M_NEXT) { --- 356 unchanged lines hidden --- |