=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/su/su.c,v retrieving revision 1.21 retrieving revision 1.22 diff -c -r1.21 -r1.22 *** src/usr.bin/su/su.c 1997/02/18 20:07:56 1.21 --- src/usr.bin/su/su.c 1997/06/20 02:12:40 1.22 *************** *** 1,4 **** ! /* $OpenBSD: su.c,v 1.21 1997/02/18 20:07:56 tholo Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. --- 1,4 ---- ! /* $OpenBSD: su.c,v 1.22 1997/06/20 02:12:40 deraadt Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. *************** *** 41,47 **** #ifndef lint /*static char sccsid[] = "from: @(#)su.c 5.26 (Berkeley) 7/6/91";*/ ! static char rcsid[] = "$OpenBSD: su.c,v 1.21 1997/02/18 20:07:56 tholo Exp $"; #endif /* not lint */ #include --- 41,47 ---- #ifndef lint /*static char sccsid[] = "from: @(#)su.c 5.26 (Berkeley) 7/6/91";*/ ! static char rcsid[] = "$OpenBSD: su.c,v 1.22 1997/06/20 02:12:40 deraadt Exp $"; #endif /* not lint */ #include *************** *** 90,96 **** uid_t ruid; int asme, ch, asthem, fastlogin, prio; enum { UNSET, YES, NO } iscsh = UNSET; ! char *user, *shell, *avshell, *username, *cleanenv[10], **np; char shellbuf[MAXPATHLEN], avshellbuf[MAXPATHLEN]; asme = asthem = fastlogin = 0; --- 90,96 ---- uid_t ruid; int asme, ch, asthem, fastlogin, prio; enum { UNSET, YES, NO } iscsh = UNSET; ! char *user, *shell, *avshell, *username, **cleanenv, **np; char shellbuf[MAXPATHLEN], avshellbuf[MAXPATHLEN]; asme = asthem = fastlogin = 0; *************** *** 234,240 **** if (!asme) { if (asthem) { p = getenv("TERM"); ! cleanenv[0] = NULL; environ = cleanenv; (void)setenv("PATH", _PATH_DEFPATH, 1); if (p) --- 234,241 ---- if (!asme) { if (asthem) { p = getenv("TERM"); ! if ((cleanenv = calloc(1, sizeof (char *))) == NULL) ! errx(1, "calloc"); environ = cleanenv; (void)setenv("PATH", _PATH_DEFPATH, 1); if (p)