diff options
-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 | 6 | ||||
-rw-r--r-- | lib/libskey/skeysubr.c | 4 |
6 files changed, 27 insertions, 23 deletions
diff --git a/lib/libskey/put.c b/lib/libskey/put.c index fd262a4..e57d9ca 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,p,11); + insert(b,v,(int)p,11); } /* now check the parity of what we got */ diff --git a/lib/libskey/skey.h b/lib/libskey/skey.h index 6dc564b..e62d507 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)); -char *skey_crypt __P((char *pp, char *salt, struct passwd *pwd, int pwok)); +const 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 6ed6bdb..4e3a141 100644 --- a/lib/libskey/skey_crypt.c +++ b/lib/libskey/skey_crypt.c @@ -3,12 +3,13 @@ #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 */ -char *skey_crypt(pp, salt, pwd, pwok) +const char *skey_crypt(pp, salt, pwd, pwok) char *pp; char *salt; struct passwd *pwd; @@ -16,7 +17,6 @@ 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 5a6e2d3..b5796ab 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(); +static char *first_token __P((char *, int, FILE *)); static int line_number; -static void unget_token(); -static char *get_token(); -static char *need_token(); -static char *need_internet_addr(); +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)); /* * Various forms of token matching. @@ -58,12 +58,13 @@ static char *need_internet_addr(); #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) -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(); +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 *)); #define MAX_ADDR 32 #define PERMIT 1 @@ -83,7 +84,8 @@ struct login_info { char *port; /* login port */ }; -static int _skeyaccess __P(( FILE *, struct login_info * )); +static int _skeyaccess __P((FILE *, struct login_info *)); +int skeyaccess __P((char *, char *, char *, char *)); /* skeyaccess - find out if UNIX passwords are permitted */ @@ -408,7 +410,7 @@ char *host; for (i = 0; i < MAX_ADDR && hp->h_addr_list[i]; i++) memcpy((char *) &list[i], - hp->h_addr_list[i], hp->h_length); + hp->h_addr_list[i], (size_t)hp->h_length); list[i].s_addr = 0; strncpy(buf, hp->h_name, MAXHOSTNAMELEN); @@ -427,12 +429,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 = -1; + list[i].s_addr = (u_int32_t) -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 = -1; + list[i].s_addr = (u_int32_t) -1; } } return (list); diff --git a/lib/libskey/skeylogin.c b/lib/libskey/skeylogin.c index 96de96f..52be8ea 100644 --- a/lib/libskey/skeylogin.c +++ b/lib/libskey/skeylogin.c @@ -1,4 +1,4 @@ -/* Login code for S/KEY Authentication. S/KEY is a trademark +* Login code for S/KEY Authentication. S/KEY is a trademark * of Bellcore. * * Mink is the former name of the S/KEY authentication system. @@ -22,11 +22,11 @@ #include "skey.h" #include "pathnames.h" -static char *skipspace(); +static char *skipspace __P((char *)); #define setpriority(x,y,z) /* nothing */ -static char *month[12] = { +static const 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 ba88d8c..8128444 100644 --- a/lib/libskey/skeysubr.c +++ b/lib/libskey/skeysubr.c @@ -73,6 +73,8 @@ char *buf; static struct termios saved_ttymode; +static void interrupt __P((int)); + static void interrupt(sig) int sig; { @@ -86,7 +88,7 @@ char *buf; int n; { struct termios noecho_ttymode; - void (*oldsig)(); + void (*oldsig) __P((int)); /* Save normal line editing modes */ tcgetattr(0, &saved_ttymode); |