summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pw/pw_user.c
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-06-07 21:57:20 +0000
committerbapt <bapt@FreeBSD.org>2015-06-07 21:57:20 +0000
commit65b30fab70c3b273f9797608833f522b5a12f43d (patch)
treeb96a72037293bea2a3f88582050e19a741969d24 /usr.sbin/pw/pw_user.c
parentb0235ac2ee534e2b1b0cf6d6bfb141458d57690a (diff)
downloadFreeBSD-src-65b30fab70c3b273f9797608833f522b5a12f43d.zip
FreeBSD-src-65b30fab70c3b273f9797608833f522b5a12f43d.tar.gz
Remove '-q' support for pw [user|group] next
the intent of -q in this command is to return as exit status the value of the next group/user id, which does not make sense given exit status are limited to values between 0 and 255.
Diffstat (limited to 'usr.sbin/pw/pw_user.c')
-rw-r--r--usr.sbin/pw/pw_user.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c
index c3b2751..ea3cb3d 100644
--- a/usr.sbin/pw/pw_user.c
+++ b/usr.sbin/pw/pw_user.c
@@ -158,14 +158,10 @@ pw_user(int mode, char *name, long id, struct cargs * args)
* With M_NEXT, we only need to return the
* next uid to stdout
*/
- if (mode == M_NEXT)
- {
- uid_t next = pw_uidpolicy(cnf, id);
- if (getarg(args, 'q'))
- return next;
- printf("%u:", next);
+ if (mode == M_NEXT) {
+ printf("%u:", pw_uidpolicy(cnf, id));
pw_group(mode, name, -1, args);
- return EXIT_SUCCESS;
+ return (EXIT_SUCCESS);
}
/*
OpenPOWER on IntegriCloud