diff options
-rw-r--r-- | lib/libskey/skey.h | 12 | ||||
-rw-r--r-- | lib/libskey/skey_crypt.c | 6 | ||||
-rw-r--r-- | lib/libskey/skey_getpass.c | 4 | ||||
-rw-r--r-- | lib/libskey/skeylogin.c | 8 |
4 files changed, 15 insertions, 15 deletions
diff --git a/lib/libskey/skey.h b/lib/libskey/skey.h index 208d14d..10cbebc 100644 --- a/lib/libskey/skey.h +++ b/lib/libskey/skey.h @@ -49,12 +49,12 @@ void rip __P((char *buf)); /* Simplified application programming interface. */ #include <pwd.h> -int skeylookup __P((struct skey *mp,char *name)); -int skeyverify __P((struct skey *mp,char *response)); -int skeychallenge __P((struct skey *mp,char *name, char *challenge)); -int skeyinfo __P((struct skey *mp, char* name, char *ss)); -int skeyaccess __P((char *user, char *port, char *host, char *addr)); -char *skey_getpass __P((char *prompt, struct passwd *pwd, int pwok)); +int skeylookup __P((struct skey *mp, const char *name)); +int skeyverify __P((struct skey *mp, char *response)); +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)); #endif /* _SKEY_H_ */ diff --git a/lib/libskey/skey_crypt.c b/lib/libskey/skey_crypt.c index 79e5635..6ed6bdb 100644 --- a/lib/libskey/skey_crypt.c +++ b/lib/libskey/skey_crypt.c @@ -8,9 +8,9 @@ /* skey_crypt - return encrypted UNIX passwd if s/key or regular password ok */ -char *skey_crypt(pp, salt, pwd, pwok) -char *pp; -char *salt; +char *skey_crypt(pp, salt, pwd, pwok) +char *pp; +char *salt; struct passwd *pwd; int pwok; { diff --git a/lib/libskey/skey_getpass.c b/lib/libskey/skey_getpass.c index 9878a5e..c3f5432 100644 --- a/lib/libskey/skey_getpass.c +++ b/lib/libskey/skey_getpass.c @@ -4,8 +4,8 @@ /* skey_getpass - read regular or s/key password */ -char *skey_getpass(prompt, pwd, pwok) -char *prompt; +char *skey_getpass(prompt, pwd, pwok) +const char *prompt; struct passwd *pwd; int pwok; { diff --git a/lib/libskey/skeylogin.c b/lib/libskey/skeylogin.c index a90fac1..10af30b 100644 --- a/lib/libskey/skeylogin.c +++ b/lib/libskey/skeylogin.c @@ -41,7 +41,7 @@ static char *month[12] = { int skeyinfo(mp,name,ss) struct skey *mp; -char *name; +const char *name; char *ss; { int rval; @@ -73,7 +73,7 @@ char *ss; int skeychallenge(mp,name, ss) struct skey *mp; -char *name; +const char *name; char *ss; { int rval; @@ -101,7 +101,7 @@ char *ss; int skeylookup(mp,name) struct skey *mp; -char *name; +const char *name; { int found; int len; @@ -191,7 +191,7 @@ char *response; tm = localtime(&now); /* can't use %b here, because it can be in national form */ strftime(fbuf, sizeof(fbuf), "%d,%Y %T", tm); - sprintf(tbuf, " %s %s", month[tm->tm_mon], fbuf); + snprintf(tbuf, sizeof(tbuf), " %s %s", month[tm->tm_mon], fbuf); if(response == NULL){ fclose(mp->keyfile); |