Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/usr.sbin/user Pullup 1.30 and 1.32 [simonb]:
details: https://anonhg.NetBSD.org/src/rev/e9b0ea9d03ea
branches: netbsd-1-5
changeset: 490130:e9b0ea9d03ea
user: tv <tv%NetBSD.org@localhost>
date: Fri Nov 03 20:56:38 2000 +0000
description:
Pullup 1.30 and 1.32 [simonb]:
Don't let usage messages wrap around on an 80 column terminal.
Problem noted by Hubert Feyrer in private mail.
=====
Remove some debugging cruft in the removal of user home directories
accidently left in from revision 1.25.
diffstat:
usr.sbin/user/user.c | 37 ++++++++++++++++---------------------
1 files changed, 16 insertions(+), 21 deletions(-)
diffs (88 lines):
diff -r 810ea47caa2c -r e9b0ea9d03ea usr.sbin/user/user.c
--- a/usr.sbin/user/user.c Fri Nov 03 20:53:53 2000 +0000
+++ b/usr.sbin/user/user.c Fri Nov 03 20:56:38 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: user.c,v 1.20.4.2 2000/10/20 20:00:18 tv Exp $ */
+/* $NetBSD: user.c,v 1.20.4.3 2000/11/03 20:56:38 tv Exp $ */
/*
* Copyright (c) 1999 Alistair G. Crooks. All rights reserved.
@@ -35,7 +35,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1999 \
The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: user.c,v 1.20.4.2 2000/10/20 20:00:18 tv Exp $");
+__RCSID("$NetBSD: user.c,v 1.20.4.3 2000/11/03 20:56:38 tv Exp $");
#endif
#include <sys/types.h>
@@ -242,16 +242,12 @@
(void) seteuid(uid);
/* we add the "|| true" to keep asystem() quiet if there is a non-zero exit status. */
-#if 1
-printf("XXX: %s -rf %s > /dev/null 2>&1 || true", RM, dir);
-#else
(void) asystem("%s -rf %s > /dev/null 2>&1 || true", RM, dir);
(void) seteuid(0);
if (rmdir(dir) < 0) {
warnx("Unable to remove all files in `%s'\n", dir);
return 0;
}
-#endif
return 1;
}
@@ -1189,38 +1185,37 @@
{
if (strcmp(prog, "useradd") == 0) {
(void) fprintf(stderr, "Usage: %s -D [-b basedir] [-e expiry] "
- "[-f inactive] [-g group] [-r lowuid..highuid] [-s shell]"
- "\n", prog);
+ "[-f inactive] [-g group]\n\t[-r lowuid..highuid] "
+ "[-s shell]\n", prog);
(void) fprintf(stderr, "Usage: %s [-G group] [-b basedir] "
- "[-c comment] [-d homedir] [-e expiry] [-f inactive]\n"
- "\t[-g group] [-k skeletondir] [-m] [-o] [-p password] "
- "[-r lowuid..highuid] [-s shell]\n\t[-u uid] [-v] user\n",
+ "[-c comment] [-d homedir] [-e expiry]\n\t[-f inactive] "
+ "[-g group] [-k skeletondir] [-m] [-o] [-p password]\n"
+ "\t[-r lowuid..highuid] [-s shell]\n\t[-u uid] [-v] user\n",
prog);
} else if (strcmp(prog, "usermod") == 0) {
(void) fprintf(stderr, "Usage: %s [-G group] [-c comment] "
- "[-d homedir] [-e expire] [-f inactive] [-g group] "
- "[-l newname] [-m] [-o] [-p password] [-s shell] [-u uid] "
- "[-v] user\n", prog);
+ "[-d homedir] [-e expire] [-f inactive]\n\t[-g group] "
+ "[-l newname] [-m] [-o] [-p password] [-s shell] [-u uid]\n"
+ "\t[-v] user\n", prog);
} else if (strcmp(prog, "userdel") == 0) {
(void) fprintf(stderr, "Usage: %s -D [-p preserve]\n", prog);
- (void) fprintf(stderr, "Usage: %s [-p preserve] [-r] [-v] "
- "user\n", prog);
+ (void) fprintf(stderr,
+ "Usage: %s [-p preserve] [-r] [-v] user\n", prog);
#ifdef EXTENSIONS
} else if (strcmp(prog, "userinfo") == 0) {
(void) fprintf(stderr, "Usage: %s [-e] [-v] user\n", prog);
#endif
} else if (strcmp(prog, "groupadd") == 0) {
(void) fprintf(stderr, "Usage: %s [-g gid] [-o] [-v] group\n",
- prog);
+ prog);
} else if (strcmp(prog, "groupdel") == 0) {
(void) fprintf(stderr, "Usage: %s [-v] group\n", prog);
} else if (strcmp(prog, "groupmod") == 0) {
- (void) fprintf(stderr, "Usage: %s [-g gid] [-o] [-n newname] "
- "[-v] group\n", prog);
+ (void) fprintf(stderr,
+ "Usage: %s [-g gid] [-o] [-n newname] [-v] group\n", prog);
} else if (strcmp(prog, "user") == 0 || strcmp(prog, "group") == 0) {
(void) fprintf(stderr,
- "Usage: %s ( add | del | mod | info ) ...\n",
- prog);
+ "Usage: %s ( add | del | mod | info ) ...\n", prog);
#ifdef EXTENSIONS
} else if (strcmp(prog, "groupinfo") == 0) {
(void) fprintf(stderr, "Usage: %s [-e] [-v] group\n", prog);
Home |
Main Index |
Thread Index |
Old Index