diff options
author | 1997-11-23 06:54:25 +0000 | |
---|---|---|
committer | 1997-11-23 06:54:25 +0000 | |
commit | 8ab65df4da632faa44b6f0c1b6d3f9a25a9bd3f7 (patch) | |
tree | 7bf8279fbdeace2ebde7b51367d857b64f17c597 | |
parent | use MI cdev_decl(ipl) (diff) | |
download | wireguard-openbsd-8ab65df4da632faa44b6f0c1b6d3f9a25a9bd3f7.tar.xz wireguard-openbsd-8ab65df4da632faa44b6f0c1b6d3f9a25a9bd3f7.zip |
define tty global to an initial value to avoid dumping core in logging
functions when passwd file is unavailable.
-rw-r--r-- | gnu/usr.bin/sudo/sudo/sudo.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gnu/usr.bin/sudo/sudo/sudo.c b/gnu/usr.bin/sudo/sudo/sudo.c index c1615a47469..75c8bde1059 100644 --- a/gnu/usr.bin/sudo/sudo/sudo.c +++ b/gnu/usr.bin/sudo/sudo/sudo.c @@ -51,7 +51,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sudo.c,v 1.3 1997/04/12 07:18:56 millert Exp $"; +static char rcsid[] = "$Id: sudo.c,v 1.4 1997/11/23 06:54:25 millert Exp $"; #endif /* lint */ #define MAIN @@ -144,7 +144,7 @@ struct passwd *user_pw_ent; char *runas_user = "root"; char *cmnd = NULL; char *cmnd_args = NULL; -char *tty = NULL; +char *tty = "unknown"; char *prompt; char host[MAXHOSTNAMELEN + 1]; char *shost; @@ -441,8 +441,7 @@ static void load_globals(sudo_mode) (void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]); exit(1); } - } else - tty = "none"; + } #ifdef UMASK (void) umask((mode_t)UMASK); |