summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1995-12-29 09:49:56 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1995-12-29 09:49:56 +0000
commit1dbb88c3e1927c167025f809e14908da18ffe9c1 (patch)
tree10c7dba9f5383f4322ab0cac520091d5fe997c3b
parent3f1d7ac8801963474e795f067e6283c3afe99313 (diff)
Write generated key in current directory
-rw-r--r--kerberosIV/make_keypair/make_keypair.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kerberosIV/make_keypair/make_keypair.c b/kerberosIV/make_keypair/make_keypair.c
index 7f37ff5730c..b25f1545f43 100644
--- a/kerberosIV/make_keypair/make_keypair.c
+++ b/kerberosIV/make_keypair/make_keypair.c
@@ -1,4 +1,4 @@
-/* $Id: make_keypair.c,v 1.1 1995/12/14 06:52:53 tholo Exp $ */
+/* $Id: make_keypair.c,v 1.2 1995/12/29 09:49:55 tholo Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -56,6 +56,8 @@ static char sccsid[] = "@(#)make_keypair.c 8.1 (Berkeley) 6/1/93";
#include "pathnames.h"
#include "register_proto.h"
+char *progname;
+
extern void herror();
void make_key(), usage();
@@ -68,6 +70,7 @@ main(argc, argv)
int i;
struct sockaddr_in sin;
+ progname = (addr = strrchr(*argv, '/')) ? addr + 1 : *argv;
if (argc != 2) {
usage(argv[0]);
exit(1);
@@ -106,8 +109,7 @@ make_key(addr)
char namebuf[255];
int fd;
- (void)sprintf(namebuf, ".%s%s",
- CLIENT_KEYFILE,
+ (void)sprintf(namebuf, "%s",
inet_ntoa(addr));
fd = open(namebuf, O_WRONLY|O_CREAT, 0600);
if (fd < 0) {