const poisoning.

This commit is contained in:
mycroft 1998-07-26 21:58:46 +00:00
parent f56c79f70c
commit 55ac0c2da3
13 changed files with 72 additions and 70 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: util.h,v 1.11 1998/06/08 03:05:14 lukem Exp $ */ /* $NetBSD: util.h,v 1.12 1998/07/26 22:01:48 mycroft Exp $ */
/*- /*-
* Copyright (c) 1995 * Copyright (c) 1995
@ -77,7 +77,7 @@ int opendisk __P((const char *, int, char *, size_t, int));
int pidlock __P((const char *, int, pid_t *, const char *)); int pidlock __P((const char *, int, pid_t *, const char *));
int ttylock __P((const char *, int, pid_t *)); int ttylock __P((const char *, int, pid_t *));
int ttyunlock __P((const char *)); int ttyunlock __P((const char *));
int ttyaction __P((char *tty, char *act, char *user)); int ttyaction __P((const char *, const char *, const char *));
struct iovec; struct iovec;
char *ttymsg __P((struct iovec *, int, const char *, int)); char *ttymsg __P((struct iovec *, int, const char *, int));
__END_DECLS __END_DECLS

View File

@ -1,4 +1,4 @@
/* $NetBSD: put.c,v 1.5 1998/02/03 19:12:47 perry Exp $ */ /* $NetBSD: put.c,v 1.6 1998/07/26 21:58:46 mycroft Exp $ */
/* S/KEY v1.1b (put.c) /* S/KEY v1.1b (put.c)
* *
@ -2079,7 +2079,8 @@ char Wp[2048][4] = {
*/ */
char * char *
btoe (engout, c) btoe (engout, c)
char *c, *engout; char *engout;
const char *c;
{ {
char cp[9]; /* add in room for the parity 2 bits */ char cp[9]; /* add in room for the parity 2 bits */
int p, i; int p, i;
@ -2119,7 +2120,7 @@ char *
int int
etob (out, e) etob (out, e)
char *out; char *out;
char *e; const char *e;
{ {
char *word; char *word;
int i, p, v, l, low, high; int i, p, v, l, low, high;
@ -2174,7 +2175,7 @@ int
char * char *
put8 (out, s) put8 (out, s)
char *out; char *out;
char *s; const char *s;
{ {
sprintf (out, "%02X%02X %02X%02X %02X%02X %02X%02X", /* XXX: sprintf (put8()) appears to be unused */ sprintf (out, "%02X%02X %02X%02X %02X%02X %02X%02X", /* XXX: sprintf (put8()) appears to be unused */
s[0] & 0xff, s[1] & 0xff, s[2] & 0xff, s[0] & 0xff, s[1] & 0xff, s[2] & 0xff,

View File

@ -1,4 +1,4 @@
/* $NetBSD: skey.h,v 1.4 1997/01/23 14:03:08 mrg Exp $ */ /* $NetBSD: skey.h,v 1.5 1998/07/26 21:58:46 mycroft Exp $ */
/* /*
* S/KEY v1.1b (skey.h) * S/KEY v1.1b (skey.h)
@ -53,25 +53,25 @@ struct mc
}; };
void f __ARGS ((char *x)); void f __ARGS ((char *x));
int keycrunch __ARGS ((char *result, char *seed, char *passwd)); int keycrunch __ARGS ((char *result, const char *seed, const char *passwd));
char *btoe __ARGS ((char *engout, char *c)); char *btoe __ARGS ((char *engout, const char *c));
char *put8 __ARGS ((char *out, char *s)); char *put8 __ARGS ((char *out, const char *s));
int etob __ARGS ((char *out, char *e)); int etob __ARGS ((char *out, const char *e));
void rip __ARGS ((char *buf)); void rip __ARGS ((char *buf));
int skeychallenge __ARGS ((struct skey * mp, char *name, char *ss, int sslen)); int skeychallenge __ARGS ((struct skey * mp, const char *name, char *ss, int sslen));
int skeylookup __ARGS ((struct skey * mp, char *name)); int skeylookup __ARGS ((struct skey * mp, const char *name));
int skeyverify __ARGS ((struct skey * mp, char *response)); int skeyverify __ARGS ((struct skey * mp, char *response));
void sevenbit __ARGS ((char *s)); void sevenbit __ARGS ((char *s));
void backspace __ARGS ((char *s)); void backspace __ARGS ((char *s));
char *skipspace __ARGS ((char *s)); const char *skipspace __ARGS ((const char *s));
char *readpass __ARGS ((char *buf, int n)); char *readpass __ARGS ((char *buf, int n));
char *readskey __ARGS ((char *buf, int n)); char *readskey __ARGS ((char *buf, int n));
int skey_authenticate __ARGS ((char *)); int skey_authenticate __ARGS ((const char *));
int skey_passcheck __ARGS ((char *, char *)); int skey_passcheck __ARGS ((const char *, char *));
char *skey_keyinfo __ARGS ((char *)); char *skey_keyinfo __ARGS ((const char *));
int skey_haskey __ARGS ((char *)); int skey_haskey __ARGS ((const char *));
int getskeyprompt __ARGS ((struct skey *, char *, char *)); int getskeyprompt __ARGS ((struct skey *, char *, char *));
int atob8 __ARGS((char *, char *)); int atob8 __ARGS((char *, const char *));
int btoa8 __ARGS((char *, char *)); int btoa8 __ARGS((char *, const char *));
int htoi __ARGS((char)); int htoi __ARGS((char));

View File

@ -1,4 +1,4 @@
/* $NetBSD: skeylogin.c,v 1.8 1997/06/18 19:18:30 christos Exp $ */ /* $NetBSD: skeylogin.c,v 1.9 1998/07/26 21:58:46 mycroft Exp $ */
/* S/KEY v1.1b (skeylogin.c) /* S/KEY v1.1b (skeylogin.c)
* *
@ -33,9 +33,6 @@
#define _PATH_KEYFILE "/etc/skeykeys" #define _PATH_KEYFILE "/etc/skeykeys"
char *skipspace __ARGS((char *));
int skeylookup __ARGS((struct skey *, char *));
/* Issue a skey challenge for user 'name'. If successful, /* Issue a skey challenge for user 'name'. If successful,
* fill in the caller's skey structure and return 0. If unsuccessful * fill in the caller's skey structure and return 0. If unsuccessful
* (e.g., if name is unknown) return -1. * (e.g., if name is unknown) return -1.
@ -79,7 +76,7 @@ getskeyprompt(mp,name,prompt)
int int
skeychallenge(mp,name, ss, sslen) skeychallenge(mp,name, ss, sslen)
struct skey *mp; struct skey *mp;
char *name; const char *name;
char *ss; char *ss;
int sslen; int sslen;
{ {
@ -108,7 +105,7 @@ skeychallenge(mp,name, ss, sslen)
int int
skeylookup(mp,name) skeylookup(mp,name)
struct skey *mp; struct skey *mp;
char *name; const char *name;
{ {
int found; int found;
int len; int len;
@ -269,7 +266,7 @@ skeyverify(mp,response)
int int
skey_haskey (username) skey_haskey (username)
char *username; const char *username;
{ {
struct skey skey; struct skey skey;
@ -285,7 +282,7 @@ skey_haskey (username)
*/ */
char * char *
skey_keyinfo (username) skey_keyinfo (username)
char *username; const char *username;
{ {
int i; int i;
static char str [50]; static char str [50];
@ -310,7 +307,8 @@ skey_keyinfo (username)
int int
skey_passcheck (username, passwd) skey_passcheck (username, passwd)
char *username, *passwd; const char *username;
char *passwd;
{ {
int i; int i;
struct skey skey; struct skey skey;
@ -337,7 +335,7 @@ skey_passcheck (username, passwd)
int int
skey_authenticate (username) skey_authenticate (username)
char *username; const char *username;
{ {
int i; int i;
char pbuf[256], skeyprompt[50]; char pbuf[256], skeyprompt[50];

View File

@ -1,4 +1,4 @@
/* $NetBSD: skeysubr.c,v 1.12 1998/03/18 19:22:12 christos Exp $ */ /* $NetBSD: skeysubr.c,v 1.13 1998/07/26 21:58:46 mycroft Exp $ */
/* S/KEY v1.1b (skeysubr.c) /* S/KEY v1.1b (skeysubr.c)
* *
@ -36,8 +36,8 @@ static void echo_off __ARGS((void));
int int
keycrunch(result,seed,passwd) keycrunch(result,seed,passwd)
char *result; /* 8-byte result */ char *result; /* 8-byte result */
char *seed; /* Seed, any length */ const char *seed; /* Seed, any length */
char *passwd; /* Password, any length */ const char *passwd; /* Password, any length */
{ {
char *buf; char *buf;
MD4_CTX md; MD4_CTX md;
@ -176,7 +176,8 @@ trapped(sig)
*/ */
int int
atob8(out, in) atob8(out, in)
char *out, *in; char *out;
const char *in;
{ {
int i; int i;
int val; int val;
@ -203,7 +204,8 @@ atob8(out, in)
/* Convert 8-byte binary array to hex-ascii string */ /* Convert 8-byte binary array to hex-ascii string */
int int
btoa8(out, in) btoa8(out, in)
char *out, *in; char *out;
const char *in;
{ {
int i; int i;
@ -232,9 +234,9 @@ htoi(c)
return -1; return -1;
} }
char * const char *
skipspace(cp) skipspace(cp)
char *cp; const char *cp;
{ {
while (*cp == ' ' || *cp == '\t') while (*cp == ' ' || *cp == '\t')
cp++; cp++;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ttyaction.c,v 1.8 1997/07/31 00:02:52 jtc Exp $ */ /* $NetBSD: ttyaction.c,v 1.9 1998/07/26 22:02:38 mycroft Exp $ */
/*- /*-
* Copyright (c) 1996 The NetBSD Foundation, Inc. * Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -65,9 +65,9 @@ static char *pathenv = __CONCAT("PATH=",_PATH_STDPATH);
int int
ttyaction(tty, act, user) ttyaction(tty, act, user)
char *tty; const char *tty;
char *act; const char *act;
char *user; const char *user;
{ {
FILE *fp; FILE *fp;
char *p1, *p2; char *p1, *p2;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.c,v 1.14 1998/07/26 15:23:39 mycroft Exp $ */ /* $NetBSD: lock.c,v 1.15 1998/07/26 22:00:24 mycroft Exp $ */
/* /*
* Copyright (c) 1980, 1987, 1993 * Copyright (c) 1980, 1987, 1993
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1987, 1993\n\
#if 0 #if 0
static char sccsid[] = "@(#)lock.c 8.1 (Berkeley) 6/6/93"; static char sccsid[] = "@(#)lock.c 8.1 (Berkeley) 6/6/93";
#endif #endif
__RCSID("$NetBSD: lock.c,v 1.14 1998/07/26 15:23:39 mycroft Exp $"); __RCSID("$NetBSD: lock.c,v 1.15 1998/07/26 22:00:24 mycroft Exp $");
#endif /* not lint */ #endif /* not lint */
/* /*
@ -82,7 +82,7 @@ void hi __P((int));
int main __P((int, char **)); int main __P((int, char **));
void quit __P((int)); void quit __P((int));
#ifdef SKEY #ifdef SKEY
int skey_auth __P((char *)); int skey_auth __P((const char *));
#endif #endif
struct timeval timeout; struct timeval timeout;
@ -224,9 +224,9 @@ main(argc, argv)
*/ */
int int
skey_auth(user) skey_auth(user)
char *user; const char *user;
{ {
char s[128], *ask, *skey_keyinfo __P((char *name)); char s[128], *ask;
int ret = 0; int ret = 0;
if (!skey_haskey(user) && (ask = skey_keyinfo(user))) { if (!skey_haskey(user) && (ask = skey_keyinfo(user))) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: login.c,v 1.38 1998/07/11 08:12:51 mrg Exp $ */ /* $NetBSD: login.c,v 1.39 1998/07/26 22:04:37 mycroft Exp $ */
/*- /*-
* Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994 * Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994
@ -44,7 +44,7 @@ __COPYRIGHT(
#if 0 #if 0
static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94"; static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94";
#endif #endif
__RCSID("$NetBSD: login.c,v 1.38 1998/07/11 08:12:51 mrg Exp $"); __RCSID("$NetBSD: login.c,v 1.39 1998/07/26 22:04:37 mycroft Exp $");
#endif /* not lint */ #endif /* not lint */
/* /*
@ -94,7 +94,7 @@ void motd __P((void));
int rootterm __P((char *)); int rootterm __P((char *));
void sigint __P((int)); void sigint __P((int));
void sleepexit __P((int)); void sleepexit __P((int));
char *stypeof __P((char *)); const char *stypeof __P((const char *));
void timedout __P((int)); void timedout __P((int));
#if defined(KERBEROS) || defined(KERBEROS5) #if defined(KERBEROS) || defined(KERBEROS5)
int klogin __P((struct passwd *, char *, char *, char *)); int klogin __P((struct passwd *, char *, char *, char *));
@ -145,7 +145,8 @@ main(argc, argv)
uid_t uid, saved_uid; uid_t uid, saved_uid;
gid_t saved_gid, saved_gids[NGROUPS_MAX]; gid_t saved_gid, saved_gids[NGROUPS_MAX];
int nsaved_gids; int nsaved_gids;
char *domain, *p, *salt, *ttyn, *pwprompt; char *domain, *p, *ttyn, *pwprompt;
const char *salt;
char tbuf[MAXPATHLEN + 2], tname[sizeof(_PATH_TTY) + 10]; char tbuf[MAXPATHLEN + 2], tname[sizeof(_PATH_TTY) + 10];
char localhost[MAXHOSTNAMELEN + 1]; char localhost[MAXHOSTNAMELEN + 1];
int need_chpass, require_chpass; int need_chpass, require_chpass;
@ -754,9 +755,9 @@ badlogin(name)
#undef UNKNOWN #undef UNKNOWN
#define UNKNOWN "su" #define UNKNOWN "su"
char * const char *
stypeof(ttyid) stypeof(ttyid)
char *ttyid; const char *ttyid;
{ {
struct ttyent *t; struct ttyent *t;

View File

@ -1,4 +1,4 @@
/* $NetBSD: aux.c,v 1.8 1997/10/19 19:27:40 mycroft Exp $ */ /* $NetBSD: aux.c,v 1.9 1998/07/26 22:07:26 mycroft Exp $ */
/* /*
* Copyright (c) 1980, 1993 * Copyright (c) 1980, 1993
@ -38,7 +38,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)aux.c 8.1 (Berkeley) 6/6/93"; static char sccsid[] = "@(#)aux.c 8.1 (Berkeley) 6/6/93";
#else #else
__RCSID("$NetBSD: aux.c,v 1.8 1997/10/19 19:27:40 mycroft Exp $"); __RCSID("$NetBSD: aux.c,v 1.9 1998/07/26 22:07:26 mycroft Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -57,7 +57,7 @@ static char *save2str __P((char *, char *));
*/ */
char * char *
savestr(str) savestr(str)
char *str; const char *str;
{ {
char *new; char *new;
int size = strlen(str) + 1; int size = strlen(str) + 1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: extern.h,v 1.8 1997/10/19 05:03:20 lukem Exp $ */ /* $NetBSD: extern.h,v 1.9 1998/07/26 22:07:27 mycroft Exp $ */
/*- /*-
* Copyright (c) 1992, 1993 * Copyright (c) 1992, 1993
@ -33,7 +33,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* @(#)extern.h 8.2 (Berkeley) 4/20/95 * @(#)extern.h 8.2 (Berkeley) 4/20/95
* $NetBSD: extern.h,v 1.8 1997/10/19 05:03:20 lukem Exp $ * $NetBSD: extern.h,v 1.9 1998/07/26 22:07:27 mycroft Exp $
*/ */
struct name; struct name;
@ -58,7 +58,7 @@ char *copyin __P((char *, char **));
char *detract __P((struct name *, int)); char *detract __P((struct name *, int));
char *expand __P((char *)); char *expand __P((char *));
char *getdeadletter __P((void)); char *getdeadletter __P((void));
char *getname __P((int)); const char *getname __P((int));
struct message; struct message;
char *hfield __P((char [], struct message *)); char *hfield __P((char [], struct message *));
FILE *infix __P((struct header *, FILE *)); FILE *infix __P((struct header *, FILE *));
@ -70,12 +70,12 @@ char *readtty __P((char [], char []));
char *reedit __P((char *)); char *reedit __P((char *));
FILE *run_editor __P((FILE *, off_t, int, int)); FILE *run_editor __P((FILE *, off_t, int, int));
char *salloc __P((int)); char *salloc __P((int));
char *savestr __P((char *)); char *savestr __P((const char *));
FILE *setinput __P((struct message *)); FILE *setinput __P((struct message *));
char *skin __P((char *)); char *skin __P((char *));
char *skip_comment __P((char *)); char *skip_comment __P((char *));
char *snarf __P((char [], int *)); char *snarf __P((char [], int *));
char *username __P((void)); const char *username __P((void));
char *value __P((char [])); char *value __P((char []));
char *vcopy __P((char [])); char *vcopy __P((char []));
char *yankword __P((char *, char [])); char *yankword __P((char *, char []));

View File

@ -1,4 +1,4 @@
/* $NetBSD: getname.c,v 1.5 1997/10/19 05:03:24 lukem Exp $ */ /* $NetBSD: getname.c,v 1.6 1998/07/26 22:07:27 mycroft Exp $ */
/* /*
* Copyright (c) 1980, 1993 * Copyright (c) 1980, 1993
@ -38,7 +38,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)getname.c 8.1 (Berkeley) 6/6/93"; static char sccsid[] = "@(#)getname.c 8.1 (Berkeley) 6/6/93";
#else #else
__RCSID("$NetBSD: getname.c,v 1.5 1997/10/19 05:03:24 lukem Exp $"); __RCSID("$NetBSD: getname.c,v 1.6 1998/07/26 22:07:27 mycroft Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -50,7 +50,7 @@ __RCSID("$NetBSD: getname.c,v 1.5 1997/10/19 05:03:24 lukem Exp $");
/* /*
* Search the passwd file for a uid. Return name on success, NOSTR on failure * Search the passwd file for a uid. Return name on success, NOSTR on failure
*/ */
char * const char *
getname(uid) getname(uid)
int uid; int uid;
{ {

View File

@ -1,4 +1,4 @@
/* $NetBSD: temp.c,v 1.6 1997/10/19 05:03:57 lukem Exp $ */ /* $NetBSD: temp.c,v 1.7 1998/07/26 22:07:27 mycroft Exp $ */
/* /*
* Copyright (c) 1980, 1993 * Copyright (c) 1980, 1993
@ -38,7 +38,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)temp.c 8.1 (Berkeley) 6/6/93"; static char sccsid[] = "@(#)temp.c 8.1 (Berkeley) 6/6/93";
#else #else
__RCSID("$NetBSD: temp.c,v 1.6 1997/10/19 05:03:57 lukem Exp $"); __RCSID("$NetBSD: temp.c,v 1.7 1998/07/26 22:07:27 mycroft Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -61,7 +61,7 @@ char *tmpdir;
void void
tinit() tinit()
{ {
char *cp; const char *cp;
if ((tmpdir = getenv("TMPDIR")) == NULL) { if ((tmpdir = getenv("TMPDIR")) == NULL) {
tmpdir = _PATH_TMP; tmpdir = _PATH_TMP;

View File

@ -1,4 +1,4 @@
/* $NetBSD: v7.local.c,v 1.9 1997/10/19 05:04:02 lukem Exp $ */ /* $NetBSD: v7.local.c,v 1.10 1998/07/26 22:07:27 mycroft Exp $ */
/* /*
* Copyright (c) 1980, 1993 * Copyright (c) 1980, 1993
@ -38,7 +38,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)v7.local.c 8.1 (Berkeley) 6/6/93"; static char sccsid[] = "@(#)v7.local.c 8.1 (Berkeley) 6/6/93";
#else #else
__RCSID("$NetBSD: v7.local.c,v 1.9 1997/10/19 05:04:02 lukem Exp $"); __RCSID("$NetBSD: v7.local.c,v 1.10 1998/07/26 22:07:27 mycroft Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -85,10 +85,10 @@ demail()
/* /*
* Discover user login name. * Discover user login name.
*/ */
char * const char *
username() username()
{ {
char *np; const char *np;
uid_t uid; uid_t uid;
if ((np = getenv("USER")) != NOSTR) if ((np = getenv("USER")) != NOSTR)