diff options
author | pst <pst@FreeBSD.org> | 1994-10-19 00:03:45 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1994-10-19 00:03:45 +0000 |
commit | 3bbaa5903cdfa6d903256d9ad37d1d8c20c79437 (patch) | |
tree | 18581614639f8a987cdf2526bd645ecfdd38abd3 /usr.bin | |
parent | 1552617ffdcabd5ebae23058e72580c06f45e182 (diff) | |
download | FreeBSD-src-3bbaa5903cdfa6d903256d9ad37d1d8c20c79437.zip FreeBSD-src-3bbaa5903cdfa6d903256d9ad37d1d8c20c79437.tar.gz |
Include most of the logdaemon v4.4 S/key changes
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/key/Makefile | 18 | ||||
-rw-r--r-- | usr.bin/key/skey.c | 5 | ||||
-rw-r--r-- | usr.bin/keyinit/Makefile | 13 | ||||
-rw-r--r-- | usr.bin/keyinit/skeyinit.c | 11 | ||||
-rw-r--r-- | usr.bin/login/Makefile | 15 | ||||
-rw-r--r-- | usr.bin/login/login.c | 8 | ||||
-rw-r--r-- | usr.bin/su/Makefile | 8 | ||||
-rw-r--r-- | usr.bin/su/su.c | 8 |
8 files changed, 36 insertions, 50 deletions
diff --git a/usr.bin/key/Makefile b/usr.bin/key/Makefile index b8553ab..9612051 100644 --- a/usr.bin/key/Makefile +++ b/usr.bin/key/Makefile @@ -1,21 +1,11 @@ - # @(#)Makefile 5.6 (Berkeley) 3/5/91 # PROG= key -MAN1= key.1 skey.1 -CFLAGS+=-I${.CURDIR}/../../lib - - -DPADD= /usr/bin/libskey.a -LDADD= -lskey - -.if exists(/usr/lib/libcrypt.a) -DPADD+= ${LIBCRYPT} -LDADD+= -lcrypt -.endif - SRCS= skey.c +MAN1= key.1 -.include <bsd.prog.mk> +DPADD= ${LIBSKEY} ${LIBMD} +LDADD= -lskey -lmd +.include <bsd.prog.mk> diff --git a/usr.bin/key/skey.c b/usr.bin/key/skey.c index d1bc239..1e810e9 100644 --- a/usr.bin/key/skey.c +++ b/usr.bin/key/skey.c @@ -12,12 +12,13 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> + #ifdef __MSDOS__ #include <dos.h> #else /* Assume BSD unix */ #include <fcntl.h> #endif -#include "libskey/md4.h" + #include <skey.h> char *readpass(); @@ -119,10 +120,10 @@ char *argv[]; } return 0; } + void usage(s) char *s; { fprintf(stderr,"Usage: %s [-n count] <sequence #>[/] <key> \n",s); } - diff --git a/usr.bin/keyinit/Makefile b/usr.bin/keyinit/Makefile index a716f14..a9ed54e 100644 --- a/usr.bin/keyinit/Makefile +++ b/usr.bin/keyinit/Makefile @@ -1,20 +1,13 @@ - # @(#)Makefile 5.6 (Berkeley) 3/5/91 # - PROG= keyinit MAN1= keyinit.1 -DPADD= /usr/bin/libskey.a -LDADD= -lskey - -.if exists(/usr/lib/libcrypt.a) -DPADD+= ${LIBCRYPT} -LDADD+= -lcrypt -.endif - SRCS= skeyinit.c BINOWN= root BINMODE=4555 +DPADD= ${LIBSKEY} ${LIBMD} +LDADD= -lskey -lmd + .include <bsd.prog.mk> diff --git a/usr.bin/keyinit/skeyinit.c b/usr.bin/keyinit/skeyinit.c index 7c8e5d6..5dfd1b1 100644 --- a/usr.bin/keyinit/skeyinit.c +++ b/usr.bin/keyinit/skeyinit.c @@ -4,17 +4,15 @@ #include <stdio.h> #include <string.h> #include <pwd.h> -#include <skey.h> #include <time.h> +#include <skey.h> + extern int optind; extern char *optarg; -char * readpass(); - -int skeylookup __P((struct skey *mp,char *name)); - #define NAMELEN 2 + int main(argc,argv) int argc; @@ -103,7 +101,7 @@ char *argv[]; printf("Reminder you need the 6 english words from the skey command.\n"); for(i=0;;i++){ if(i >= 2) exit(1); - printf("Enter sequence count from 1 to 10000: "); + printf("Enter sequence count from 1 to 9999: "); fgets(tmp,sizeof(tmp),stdin); n = atoi(tmp); if(n > 0 && n < 10000) @@ -126,7 +124,6 @@ char *argv[]; printf("s/key %d %s\ns/key access password: ",n,seed); fgets(tmp,sizeof(tmp),stdin); rip(tmp); - backspace(tmp); if(tmp[0] == '?'){ printf("Enter 6 English words from secure S/Key calculation.\n"); continue; diff --git a/usr.bin/login/Makefile b/usr.bin/login/Makefile index bae657d..21131d9 100644 --- a/usr.bin/login/Makefile +++ b/usr.bin/login/Makefile @@ -1,16 +1,18 @@ # From: @(#)Makefile 8.1 (Berkeley) 7/19/93 -# $Id$ +# $Id: Makefile,v 1.8 1994/09/30 13:26:15 csgr Exp $ PROG= login MAN1= login.1 MAN5= login.access.5 -SRCS= login.c login_access.c login_skey.c login_fbtab.c -DPADD= ${LIBUTIL} ${LIBSKEY} -LDADD= -lutil -lcrypt -lskey +SRCS= login.c login_access.c login_fbtab.c + CFLAGS+=-DLOGIN_ACCESS -DSKEY -DLOGALL -.if exists(${DESTDIR}/usr/lib/libkrb.a) && (defined(MAKE_KERBEROS) \ - || defined(MAKE_EBONES)) +DPADD= ${LIBUTIL} ${LIBCRYPT} ${LIBSKEY} ${LIBMD} +LDADD= -lutil -lcrypt -lskey -lmd + +.if exists(${DESTDIR}/usr/lib/libkrb.a) && \ + (defined(MAKE_KERBEROS) || defined(MAKE_EBONES)) CFLAGS+=-DKERBEROS SRCS+= klogin.c DPADD+= ${LIBKRB} ${LIBDES} @@ -22,4 +24,3 @@ BINMODE=4555 INSTALLFLAGS=-fschg .include <bsd.prog.mk> - diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index f240b1b..a3b2683 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -68,6 +68,10 @@ static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94"; #include <unistd.h> #include <utmp.h> +#ifdef SKEY +#include <skey.h> +#endif + #include "pathnames.h" void badlogin __P((char *)); @@ -125,7 +129,6 @@ main(argc, argv) char full_hostname[MAXHOSTNAMELEN]; #ifdef SKEY int permit_passwd = 0; - char *skey_getpass(), *skey_crypt(); #endif (void)signal(SIGALRM, timedout); @@ -259,7 +262,8 @@ main(argc, argv) #ifdef SKEY permit_passwd = skeyaccess(username, tty, - hostname ? full_hostname : NULL); + hostname ? full_hostname : NULL, + NULL); p = skey_getpass("Password:", pwd, permit_passwd); ep = skey_crypt(p, salt, pwd, permit_passwd); #else diff --git a/usr.bin/su/Makefile b/usr.bin/su/Makefile index c353734..f9b61b1 100644 --- a/usr.bin/su/Makefile +++ b/usr.bin/su/Makefile @@ -1,12 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 7/19/93 PROG= su -LDADD= -lcrypt -lskey -DPADD= ${LIBCRYPT} ${LIBSKEY} -SRCS= su.c login_skey.c +SRCS= su.c + CFLAGS+=-DSKEY -.PATH: ${.CURDIR}/../login +LDADD= -lcrypt -lskey -lmd +DPADD= ${LIBCRYPT} ${LIBSKEY} ${LIBMD} .if exists(${DESTDIR}/usr/lib/libkrb.a) && (defined(MAKE_KERBEROS) \ || defined(MAKE_EBONES)) diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index 1928d1e..244a695 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -56,6 +56,10 @@ static char sccsid[] = "@(#)su.c 8.3 (Berkeley) 4/2/94"; #include <syslog.h> #include <unistd.h> +#ifdef SKEY +#include <skey.h> +#endif + #ifdef KERBEROS #include <kerberosIV/des.h> #include <kerberosIV/krb.h> @@ -68,10 +72,6 @@ int use_kerberos = 1; #define ARGSTR "-flm" #endif -#ifdef SKEY -char *skey_crypt(), *skey_getpass(); -#endif - char *ontty __P((void)); int chshell __P((char *)); |