diff options
| author | Enji Cooper <ngie@FreeBSD.org> | 2015-01-24 21:21:39 +0000 |
|---|---|---|
| committer | Enji Cooper <ngie@FreeBSD.org> | 2015-01-24 21:21:39 +0000 |
| commit | 9497907bbe0d16a4799edb187d0c7709ff63c6fa (patch) | |
| tree | f71f92f914ca8bb490ff0c9a7db9c78426deb3bd /pw/pw_group.c | |
| parent | b2b8eaf4b2d8e78c7ff8837fd7f9d58b4e431b1c (diff) | |
| parent | 781a5b787624a2cd0208bf63bc1c0572e182a306 (diff) | |
| download | pw-darwin-9497907bbe0d16a4799edb187d0c7709ff63c6fa.tar.gz pw-darwin-9497907bbe0d16a4799edb187d0c7709ff63c6fa.zip | |
MFhead @ r277659
Diffstat (limited to 'pw/pw_group.c')
| -rw-r--r-- | pw/pw_group.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pw/pw_group.c b/pw/pw_group.c index b20ce88..51166cd 100644 --- a/pw/pw_group.c +++ b/pw/pw_group.c @@ -68,7 +68,11 @@ pw_group(struct userconf * cnf, int mode, struct cargs * args) }; if (a_gid != NULL) { - if (strspn(a_gid->val, "0123456789") != strlen(a_gid->val)) + const char *teststr; + teststr = a_gid->val; + if (*teststr == '-') + teststr++; + if (strspn(teststr, "0123456789") != strlen(teststr)) errx(EX_USAGE, "-g expects a number"); } |
