summaryrefslogtreecommitdiff
path: root/usr.bin/sudo/sudo.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2007-10-17 04:26:06 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2007-10-17 04:26:06 +0000
commitebdb26af86961f3b0bcce472302c01810af12155 (patch)
treeb0078ca6912ac548b07cfeb03aaed9d737f22aa9 /usr.bin/sudo/sudo.c
parentd8af0394f23725d01d6ee24975c1d089c023cd4e (diff)
Update to sudo 1.6.9p6
Diffstat (limited to 'usr.bin/sudo/sudo.c')
-rw-r--r--usr.bin/sudo/sudo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/sudo/sudo.c b/usr.bin/sudo/sudo.c
index 3e0f7a80b8a..4e201d11faf 100644
--- a/usr.bin/sudo/sudo.c
+++ b/usr.bin/sudo/sudo.c
@@ -102,7 +102,7 @@
#include "version.h"
#ifndef lint
-__unused __unused static const char rcsid[] = "$Sudo: sudo.c,v 1.369.2.30 2007/08/18 12:25:41 millert Exp $";
+__unused __unused static const char rcsid[] = "$Sudo: sudo.c,v 1.369.2.31 2007/09/13 23:06:51 millert Exp $";
#endif /* lint */
/*
@@ -540,9 +540,9 @@ init_vars(sudo_mode, envp)
}
if ((p = ttyname(STDIN_FILENO)) || (p = ttyname(STDOUT_FILENO))) {
- if (strncmp(p, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
- p += sizeof(_PATH_DEV) - 1;
- user_tty = estrdup(p);
+ user_tty = user_ttypath = estrdup(p);
+ if (strncmp(user_tty, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
+ user_tty += sizeof(_PATH_DEV) - 1;
} else
user_tty = "unknown";