Restore the 4.4lite version which apparently was clobbered by a repository
copy. The differences are trivial. I have no backups of the clobbered history.
This commit is contained in:
parent
1c0091e1f1
commit
5f09d26e4a
@ -1,4 +1,4 @@
|
||||
# @(#)Makefile 5.3 (Berkeley) 5/11/90
|
||||
# @(#)Makefile 8.1 (Berkeley) 6/4/93
|
||||
|
||||
PROG= makekey
|
||||
MAN8= makekey.8
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
|
||||
.\" All rights reserved.
|
||||
.\" Copyright (c) 1990, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
@ -29,9 +29,9 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)makekey.8 6.5 (Berkeley) 7/1/91
|
||||
.\" @(#)makekey.8 8.2 (Berkeley) 12/11/93
|
||||
.\"
|
||||
.Dd July 1, 1991
|
||||
.Dd December 11, 1993
|
||||
.Dt MAKEKEY 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -41,7 +41,7 @@
|
||||
.Nm makekey
|
||||
.Sh DESCRIPTION
|
||||
.Nm Makekey
|
||||
encypts a key and salt which it reads from the standard input
|
||||
encrypts a key and salt which it reads from the standard input
|
||||
and writes the result to the standard output.
|
||||
The key is expected to be
|
||||
ten bytes; the salt is expected to be two bytes.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -32,23 +32,27 @@
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
char copyright[] =
|
||||
"@(#) Copyright (c) 1990 The Regents of the University of California.\n\
|
||||
All rights reserved.\n";
|
||||
static char copyright[] =
|
||||
"@(#) Copyright (c) 1990, 1993\n\
|
||||
The Regents of the University of California. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)makekey.c 5.3 (Berkeley) 2/25/91";
|
||||
static char sccsid[] = "@(#)makekey.c 8.1 (Berkeley) 6/4/93";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static void error(), get();
|
||||
static void get __P((char *, int));
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
int len;
|
||||
@ -58,7 +62,7 @@ main()
|
||||
get(salt, sizeof(salt) - 1);
|
||||
len = strlen(r = crypt(key, salt));
|
||||
if (write(STDOUT_FILENO, r, len) != len)
|
||||
error();
|
||||
err(1, "stdout");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@ -74,12 +78,5 @@ get(bp, len)
|
||||
return;
|
||||
if (nr >= 0)
|
||||
errno = EFTYPE;
|
||||
error();
|
||||
}
|
||||
|
||||
static void
|
||||
error()
|
||||
{
|
||||
(void)fprintf(stderr, "makekey: %s\n", strerror(errno));
|
||||
exit(1);
|
||||
err(1, "stdin");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user