diff options
| author | Paul Traina <pst@FreeBSD.org> | 1997-03-08 06:22:51 +0000 |
|---|---|---|
| committer | Paul Traina <pst@FreeBSD.org> | 1997-03-08 06:22:51 +0000 |
| commit | 1a277b7ae953d189c146857f41a3b0fc9deab4d2 (patch) | |
| tree | 9d09de273472ca9b2fc15b07f216358dedf71636 /lib/libskey | |
| parent | eb2c768ebb95e3ac89792f73be081c0135bcae6d (diff) | |
Notes
Diffstat (limited to 'lib/libskey')
| -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 208d14d58b59..10cbebc372e2 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 79e56358141e..6ed6bdb154ae 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 9878a5e2d902..c3f5432d02ff 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 a90fac1a1cda..10af30b60869 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); |
