diff options
| author | cvs2svn <cvs2svn@FreeBSD.org> | 1999-01-21 00:55:32 +0000 |
|---|---|---|
| committer | cvs2svn <cvs2svn@FreeBSD.org> | 1999-01-21 00:55:32 +0000 |
| commit | 76b5366091f76c9bc73570149ef5055648fc2c39 (patch) | |
| tree | 590d020e0f2a5bea6e09d66d951a674443b21d67 /lib/libskey | |
| parent | 4b4d01da6f07f7754ff6a6e4f5223e9f0984d1a6 (diff) | |
Diffstat (limited to 'lib/libskey')
| -rw-r--r-- | lib/libskey/Makefile | 2 | ||||
| -rw-r--r-- | lib/libskey/put.c | 2 | ||||
| -rw-r--r-- | lib/libskey/skey.h | 2 | ||||
| -rw-r--r-- | lib/libskey/skey_crypt.c | 4 | ||||
| -rw-r--r-- | lib/libskey/skeyaccess.c | 32 | ||||
| -rw-r--r-- | lib/libskey/skeylogin.c | 4 | ||||
| -rw-r--r-- | lib/libskey/skeysubr.c | 4 |
7 files changed, 24 insertions, 26 deletions
diff --git a/lib/libskey/Makefile b/lib/libskey/Makefile index 4ad0fe344735d..25f99fe8bc19b 100644 --- a/lib/libskey/Makefile +++ b/lib/libskey/Makefile @@ -15,8 +15,10 @@ CFLAGS+=-W -Wall CFLAGS+=-Werror .endif +.if ${OBJFORMAT} == elf DPADD+= ${LIBCRYPT} ${LIBMD} LDADD+= -lcrypt -lmd +.endif beforeinstall: ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/skey.h \ diff --git a/lib/libskey/put.c b/lib/libskey/put.c index e57d9ca9ce4cf..fd262a4d3db73 100644 --- a/lib/libskey/put.c +++ b/lib/libskey/put.c @@ -2137,7 +2137,7 @@ char *e; standard(word); if( (v = wsrch(word,low,high)) < 0 ) return 0; - insert(b,v,(int)p,11); + insert(b,v,p,11); } /* now check the parity of what we got */ diff --git a/lib/libskey/skey.h b/lib/libskey/skey.h index e62d507e0c8e4..6dc564bd4e40d 100644 --- a/lib/libskey/skey.h +++ b/lib/libskey/skey.h @@ -55,6 +55,6 @@ int skeychallenge __P((struct skey *mp, const char *name, char *challenge)); int skeyinfo __P((struct skey *mp, const char* name, char *ss)); int skeyaccess __P((char *user, const char *port, const char *host, const char *addr)); char *skey_getpass __P((const char *prompt, struct passwd * pwd, int pwok)); -const char *skey_crypt __P((char *pp, char *salt, struct passwd *pwd, int pwok)); +char *skey_crypt __P((char *pp, char *salt, struct passwd *pwd, int pwok)); #endif /* _SKEY_H_ */ diff --git a/lib/libskey/skey_crypt.c b/lib/libskey/skey_crypt.c index 4e3a141333a56..6ed6bdb154ae1 100644 --- a/lib/libskey/skey_crypt.c +++ b/lib/libskey/skey_crypt.c @@ -3,13 +3,12 @@ #include <string.h> #include <stdio.h> #include <pwd.h> -#include <unistd.h> #include "skey.h" /* skey_crypt - return encrypted UNIX passwd if s/key or regular password ok */ -const char *skey_crypt(pp, salt, pwd, pwok) +char *skey_crypt(pp, salt, pwd, pwok) char *pp; char *salt; struct passwd *pwd; @@ -17,6 +16,7 @@ int pwok; { struct skey skey; char *p; + char *crypt(); /* Try s/key authentication even when the UNIX password is permitted. */ diff --git a/lib/libskey/skeyaccess.c b/lib/libskey/skeyaccess.c index b5796abe0b0b8..5a6e2d3a29633 100644 --- a/lib/libskey/skeyaccess.c +++ b/lib/libskey/skeyaccess.c @@ -45,12 +45,12 @@ */ static char *prev_token = 0; /* push-back buffer */ static char *line_pointer = NULL; -static char *first_token __P((char *, int, FILE *)); +static char *first_token(); static int line_number; -static void unget_token __P((char *)); -static char *get_token __P((void)); -static char *need_token __P((void)); -static char *need_internet_addr __P((void)); +static void unget_token(); +static char *get_token(); +static char *need_token(); +static char *need_internet_addr(); /* * Various forms of token matching. @@ -58,13 +58,12 @@ static char *need_internet_addr __P((void)); #define match_host_name(l) match_token((l)->host_name) #define match_port(l) match_token((l)->port) #define match_user(l) match_token((l)->user) -struct login_info; -static int match_internet_addr __P((struct login_info *)); -static int match_group __P((struct login_info *)); -static int match_token __P((char *)); -static int is_internet_addr __P((char *)); -static struct in_addr *convert_internet_addr __P((char *)); -static struct in_addr *lookup_internet_addr __P((char *)); +static int match_internet_addr(); +static int match_group(); +static int match_token(); +static int is_internet_addr(); +static struct in_addr *convert_internet_addr(); +static struct in_addr *lookup_internet_addr(); #define MAX_ADDR 32 #define PERMIT 1 @@ -84,8 +83,7 @@ struct login_info { char *port; /* login port */ }; -static int _skeyaccess __P((FILE *, struct login_info *)); -int skeyaccess __P((char *, char *, char *, char *)); +static int _skeyaccess __P(( FILE *, struct login_info * )); /* skeyaccess - find out if UNIX passwords are permitted */ @@ -410,7 +408,7 @@ char *host; for (i = 0; i < MAX_ADDR && hp->h_addr_list[i]; i++) memcpy((char *) &list[i], - hp->h_addr_list[i], (size_t)hp->h_length); + hp->h_addr_list[i], hp->h_length); list[i].s_addr = 0; strncpy(buf, hp->h_name, MAXHOSTNAMELEN); @@ -429,12 +427,12 @@ char *host; if ((hp = gethostbyaddr((char *) &list[i], length, AF_INET)) == 0) { syslog(LOG_ERR, "address %s not registered for host %s", inet_ntoa(list[i]), buf); - list[i].s_addr = (u_int32_t) -1; + list[i].s_addr = -1; } if (NEQ(buf, hp->h_name) && NEQ3(buf, "localhost.", 10)) { syslog(LOG_ERR, "address %s registered for host %s and %s", inet_ntoa(list[i]), hp->h_name, buf); - list[i].s_addr = (u_int32_t) -1; + list[i].s_addr = -1; } } return (list); diff --git a/lib/libskey/skeylogin.c b/lib/libskey/skeylogin.c index 75e62458bc3a8..96de96feacb51 100644 --- a/lib/libskey/skeylogin.c +++ b/lib/libskey/skeylogin.c @@ -22,11 +22,11 @@ #include "skey.h" #include "pathnames.h" -static char *skipspace __P((char *)); +static char *skipspace(); #define setpriority(x,y,z) /* nothing */ -static const char *month[12] = { +static char *month[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; diff --git a/lib/libskey/skeysubr.c b/lib/libskey/skeysubr.c index 81284443e7a7c..ba88d8c8370b4 100644 --- a/lib/libskey/skeysubr.c +++ b/lib/libskey/skeysubr.c @@ -73,8 +73,6 @@ char *buf; static struct termios saved_ttymode; -static void interrupt __P((int)); - static void interrupt(sig) int sig; { @@ -88,7 +86,7 @@ char *buf; int n; { struct termios noecho_ttymode; - void (*oldsig) __P((int)); + void (*oldsig)(); /* Save normal line editing modes */ tcgetattr(0, &saved_ttymode); |
