summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmc <jmc@openbsd.org>2007-03-15 22:31:14 +0000
committerjmc <jmc@openbsd.org>2007-03-15 22:31:14 +0000
commitd4acc1c4d3f902a3ce31808ba9c8b324e6781d97 (patch)
treefbe46b70fdfaf2e129ae6feecb7ab435766b7a41
parentsimplify synopsis/usage() and sort options. also fixes documentation/5411 (diff)
downloadwireguard-openbsd-d4acc1c4d3f902a3ce31808ba9c8b324e6781d97.tar.xz
wireguard-openbsd-d4acc1c4d3f902a3ce31808ba9c8b324e6781d97.zip
simplify synopsis/usage() and sort options;
from Igor Sobrado
-rw-r--r--usr.sbin/tokenadm/tokenadm.835
-rw-r--r--usr.sbin/tokenadm/tokenadm.c4
-rw-r--r--usr.sbin/tokeninit/tokeninit.811
-rw-r--r--usr.sbin/tokeninit/tokeninit.c4
4 files changed, 25 insertions, 29 deletions
diff --git a/usr.sbin/tokenadm/tokenadm.8 b/usr.sbin/tokenadm/tokenadm.8
index 439562b2e30..05eba6f8402 100644
--- a/usr.sbin/tokenadm/tokenadm.8
+++ b/usr.sbin/tokenadm/tokenadm.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tokenadm.8,v 1.4 2003/02/14 23:20:36 jmc Exp $
+.\" $OpenBSD: tokenadm.8,v 1.5 2007/03/15 22:31:14 jmc Exp $
.\"
.\" Copyright (c) 1996 Berkeley Software Design, Inc. All rights reserved.
.\"
@@ -42,12 +42,9 @@
.Nd manage the ActivCard, CRYPTOCard and SNK-004 token databases
.Sh SYNOPSIS
.Nm tokenadm
-.Op Fl 1BDERT
-.Op Fl d
-.Op Fl e
-.Op Fl m Ar [-]mode
-.Op Fl r
-.Op Ar user Op ...
+.Op Fl 1BDdEeRrT
+.Op Fl m Oo - Oc Ns Ar mode
+.Op Ar user ...
.Sh DESCRIPTION
The
.Nm tokenadm
@@ -65,15 +62,6 @@ Display users, one per line.
Display users with no banner.
.It Fl D
Display disabled users.
-.It Fl E
-Display enabled users.
-.It Fl R
-Display users in reverse order.
-.It Fl T
-Display users in terse format (only the user names).
-Unless
-.Fl 1
-is also specified, four users will be displayed per line.
.It Fl d
Disable users without removing them from the database.
This prevents the users from authenticating, but does not lose their
@@ -83,6 +71,8 @@ The
flag may also be used with the
.Fl d
flag.
+.It Fl E
+Display enabled users.
.It Fl e
Enable users.
This should be used to re-enable users who were disabled by the
@@ -93,7 +83,9 @@ The
flag may also be used with the
.Fl e
flag.
-.It Fl m
+.It Xo Fl m
+.Oo - Oc Ns Ar mode
+.Xc
Add
[or remove]
the specified mode of authentication for the user.
@@ -110,10 +102,17 @@ flags.
Whenever reduced-input mode is set the reduced-input state is reset.
This should be done if a paper copy of challenge/responses had been
produced and then misplaced.
+.It Fl R
+Display users in reverse order.
.It Fl r
Remove users from the database.
+.It Fl T
+Display users in terse format (only the user names).
+Unless
+.Fl 1
+is also specified, four users will be displayed per line.
.El
-.sp
+.Pp
Use of any of the
.Fl 1BDERT
flags precludes the use of any of the
diff --git a/usr.sbin/tokenadm/tokenadm.c b/usr.sbin/tokenadm/tokenadm.c
index f0e65d154d8..b8efbe3b30f 100644
--- a/usr.sbin/tokenadm/tokenadm.c
+++ b/usr.sbin/tokenadm/tokenadm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tokenadm.c,v 1.8 2004/06/21 15:27:19 avsm Exp $ */
+/* $OpenBSD: tokenadm.c,v 1.9 2007/03/15 22:31:14 jmc Exp $ */
/*-
* Copyright (c) 1995 Migration Associates Corp. All Rights Reserved
@@ -205,7 +205,7 @@ main(int argc, char **argv)
if (optind >= argc) {
usage:
fprintf(stderr,
- "Usage: %sadm [-BDERT1 | -d | -e | -r] [-m mode] user [...]\n",
+ "usage: %sadm [-1BDdEeRrT] [-m [-]mode] [user ...]\n",
tt->name);
exit(1);
}
diff --git a/usr.sbin/tokeninit/tokeninit.8 b/usr.sbin/tokeninit/tokeninit.8
index 33336f1d075..551e1bb0b29 100644
--- a/usr.sbin/tokeninit/tokeninit.8
+++ b/usr.sbin/tokeninit/tokeninit.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tokeninit.8,v 1.7 2003/11/26 20:25:27 jmc Exp $
+.\" $OpenBSD: tokeninit.8,v 1.8 2007/03/15 22:33:22 jmc Exp $
.\"
.\" Copyright (c) 1995 Migration Associates Corporation. All rights reserved.
.\"
@@ -42,12 +42,9 @@
.Nd "modify or add user in ActivCard, CRYPTOCard, or SNK-004 authentication system"
.Sh SYNOPSIS
.Nm tokeninit
-.Op Fl f
-.Op Fl h
+.Op Fl fhsv
.Op Fl m Ar mode
-.Op Fl s
-.Op Fl v
-.Ar user_ID
+.Ar user
.Op Ar ...
.Sh DESCRIPTION
The
@@ -99,7 +96,7 @@ Read the shared secret as a 16 digit hexadecimal integer rather than
a sequence of 8 octets.
This is not supported when invoked as
.Nm snkinit .
-.It Fl m
+.It Fl m Ar mode
Specify the input modes allowed for this user.
Possible modes are decimal (dec), hexadecimal (hex), phonebook (phone),
and reduced-input (rim).
diff --git a/usr.sbin/tokeninit/tokeninit.c b/usr.sbin/tokeninit/tokeninit.c
index 872cd63c921..ba8f490b798 100644
--- a/usr.sbin/tokeninit/tokeninit.c
+++ b/usr.sbin/tokeninit/tokeninit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tokeninit.c,v 1.5 2002/05/27 06:33:51 deraadt Exp $ */
+/* $OpenBSD: tokeninit.c,v 1.6 2007/03/15 22:33:22 jmc Exp $ */
/*-
* Copyright (c) 1995 Migration Associates Corp. All Rights Reserved
@@ -115,7 +115,7 @@ main(int argc, char **argv)
break;
default:
fprintf(stderr,
- "Usage: %sinit [-f%ssv] username [ username ... ]\n",
+ "usage: %sinit [-f%ssv] [-m mode] user [...]\n",
tt->name, (tt->options & TOKEN_HEXINIT) ? "h" : "");
exit(1);
}