API cleanups (use const char * where appropriate)

Cannidate for: 2.2 (please!)
This commit is contained in:
Paul Traina 1997-03-08 06:22:51 +00:00
parent eb2c768ebb
commit 1a277b7ae9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23503
4 changed files with 15 additions and 15 deletions

View File

@ -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_ */

View File

@ -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;
{

View File

@ -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;
{

View File

@ -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);