summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-08-06 22:06:35 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-08-06 22:06:35 +0000
commitddfb1e3a892f450178093964f11cdc534340a56a (patch)
treebd4792fa1c6e3db400a59e629086fa1bb74a6c65
parente690121f0de556b0e4595630540ab0ae52115c0d (diff)
- jakob@cvs.openbsd.org 2001/08/03 10:31:30
[ssh-add.c ssh-agent.c ssh-keyscan.c] improve usage(). ok markus@
-rw-r--r--ChangeLog5
-rw-r--r--ssh-add.c21
-rw-r--r--ssh-agent.c12
-rw-r--r--ssh-keyscan.c10
4 files changed, 33 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index a5d05907..edd7662f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -135,6 +135,9 @@
- jakob@cvs.openbsd.org 2001/08/03 10:31:19
[ssh-add.1]
document smartcard options. ok markus@
+ - jakob@cvs.openbsd.org 2001/08/03 10:31:30
+ [ssh-add.c ssh-agent.c ssh-keyscan.c]
+ improve usage(). ok markus@
20010803
- (djm) Fix interrupted read in entropy gatherer. Spotted by markus@ on
@@ -6245,4 +6248,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.1461 2001/08/06 22:03:08 mouring Exp $
+$Id: ChangeLog,v 1.1462 2001/08/06 22:06:35 mouring Exp $
diff --git a/ssh-add.c b/ssh-add.c
index b44c306b..979164ca 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -35,7 +35,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-add.c,v 1.44 2001/08/01 22:03:33 markus Exp $");
+RCSID("$OpenBSD: ssh-add.c,v 1.45 2001/08/03 10:31:30 jakob Exp $");
#include <openssl/evp.h>
@@ -55,6 +55,9 @@ extern char *__progname;
char *__progname;
#endif
+/* argv0 */
+extern char *__progname;
+
/* we keep a cache of one passphrases */
static char *pass = NULL;
static void
@@ -195,12 +198,16 @@ list_identities(AuthenticationConnection *ac, int do_fp)
static void
usage(void)
{
- printf("Usage: ssh-add [options]\n");
- printf(" -l, -L : list identities\n");
- printf(" -d : delete identity\n");
- printf(" -D : delete all identities\n");
- printf(" -s reader_num : add key in the smartcard in reader_num.\n");
- printf(" -e reader_num : remove key in the smartcard in reader_num.\n");
+ fprintf(stderr, "Usage: %s [options]\n", __progname);
+ fprintf(stderr, "Options:\n");
+ fprintf(stderr, " -l List fingerprints of all identities.\n");
+ fprintf(stderr, " -L List public key parameters of all identities.\n");
+ fprintf(stderr, " -d Delete identity.\n");
+ fprintf(stderr, " -D Delete all identities.\n");
+#ifdef SMARTCARD
+ fprintf(stderr, " -s reader Add key in smartcard reader.\n");
+ fprintf(stderr, " -e reader Remove key in smartcard reader.\n");
+#endif
}
int
diff --git a/ssh-agent.c b/ssh-agent.c
index 3e8eb060..a004e324 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.71 2001/08/02 16:14:05 jakob Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.72 2001/08/03 10:31:30 jakob Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -36,7 +36,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-agent.c,v 1.71 2001/08/02 16:14:05 jakob Exp $");
+RCSID("$OpenBSD: ssh-agent.c,v 1.72 2001/08/03 10:31:30 jakob Exp $");
#include <openssl/evp.h>
#include <openssl/md5.h>
@@ -821,9 +821,13 @@ check_parent_exists(int sig)
static void
usage(void)
{
- fprintf(stderr, "ssh-agent version %s\n", SSH_VERSION);
- fprintf(stderr, "Usage: %s [-c | -s] [-k] [-d] [command [args...]]\n",
+ fprintf(stderr, "Usage: %s [options] [command [args ...]]\n",
__progname);
+ fprintf(stderr, "Options:\n");
+ fprintf(stderr, " -c Generate C-shell commands on stdout.\n");
+ fprintf(stderr, " -s Generate Bourne shell commands on stdout.\n");
+ fprintf(stderr, " -k Kill the current agent.\n");
+ fprintf(stderr, " -d Debug mode.\n");
exit(1);
}
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 9f7aa94a..9908baac 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -7,7 +7,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-keyscan.c,v 1.24 2001/06/23 15:12:20 itojun Exp $");
+RCSID("$OpenBSD: ssh-keyscan.c,v 1.25 2001/08/03 10:31:30 jakob Exp $");
#if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H)
#include <sys/queue.h>
@@ -582,8 +582,12 @@ nexthost(int argc, char **argv)
static void
usage(void)
{
- fatal("usage: %s [-t timeout] { [--] host | -f file } ...", __progname);
- return;
+ fprintf(stderr, "Usage: %s [options] [ host | addrlist namelist ]\n",
+ __progname);
+ fprintf(stderr, "Options:\n");
+ fprintf(stderr, " -t timeout Set connection timeout.\n");
+ fprintf(stderr, " -f file Read hosts or addresses from file.\n");
+ exit(1);
}
int