diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-07-28 12:20:57 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-07-28 12:20:57 +0000 |
commit | d2d684f5597f30a1cc8efa767281ed1c7c9eff45 (patch) | |
tree | 73b15bec7b6de093a2fdcd2e3f0239930ae1a0be /pw/pw.c | |
parent | a8e235f6926f727fd30a1fc881bda8f39c16ac1b (diff) | |
download | pw-darwin-d2d684f5597f30a1cc8efa767281ed1c7c9eff45.tar.gz pw-darwin-d2d684f5597f30a1cc8efa767281ed1c7c9eff45.tar.zst pw-darwin-d2d684f5597f30a1cc8efa767281ed1c7c9eff45.zip |
when -n is passed to any pw subcommand it is always expected to be considered as
a name so do not try to convert it to an id if it is a numeric value
PR: 31933
Reported by: ted@impulse.net
Sponsored by: gandi.net
Diffstat (limited to 'pw/pw.c')
-rw-r--r-- | pw/pw.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -287,14 +287,7 @@ main(int argc, char *argv[]) errstr); break; case 'n': - if (strspn(optarg, "0123456789") != strlen(optarg)) { - name = optarg; - break; - } - id = strtonum(optarg, 0, LONG_MAX, &errstr); - if (errstr != NULL) - errx(EX_USAGE, "Bad id '%s': %s", optarg, - errstr); + name = optarg; break; case 'H': if (conf.fd != -1) |