Module Name: src
Committed By: dholland
Date: Sun Mar 16 01:07:46 UTC 2014
Modified Files:
src/usr.bin/su: su.c
Log Message:
Fix gcc48 build. No obvious reason why nobody else has hit this...
To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/usr.bin/su/su.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/su/su.c
diff -u src/usr.bin/su/su.c:1.70 src/usr.bin/su/su.c:1.71
--- src/usr.bin/su/su.c:1.70 Thu Apr 12 15:35:07 2012
+++ src/usr.bin/su/su.c Sun Mar 16 01:07:46 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: su.c,v 1.70 2012/04/12 15:35:07 christos Exp $ */
+/* $NetBSD: su.c,v 1.71 2014/03/16 01:07:46 dholland Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988\
#if 0
static char sccsid[] = "@(#)su.c 8.3 (Berkeley) 4/2/94";*/
#else
-__RCSID("$NetBSD: su.c,v 1.70 2012/04/12 15:35:07 christos Exp $");
+__RCSID("$NetBSD: su.c,v 1.71 2014/03/16 01:07:46 dholland Exp $");
#endif
#endif /* not lint */
@@ -112,7 +112,10 @@ main(int argc, char **argv)
enum { UNSET, YES, NO } iscsh = UNSET;
const char *user, *shell, *avshell;
char *username, **np;
- char *userpass, *class;
+#ifdef SU_ROOTAUTH
+ char *userpass;
+#endif
+ char *class;
char shellbuf[MAXPATHLEN], avshellbuf[MAXPATHLEN];
time_t pw_warntime = _PASSWORD_WARNDAYS * SECSPERDAY;
#ifdef LOGIN_CAP
@@ -186,7 +189,9 @@ main(int argc, char **argv)
if (pwd == NULL)
errx(EXIT_FAILURE, "who are you?");
username = estrdup(pwd->pw_name);
+#ifdef SU_ROOTAUTH
userpass = estrdup(pwd->pw_passwd);
+#endif
if (asme) {
if (pwd->pw_shell && *pwd->pw_shell) {