summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-11-13 22:44:35 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-11-13 22:44:35 +0000
commitb9c9192bbcbb1aff224b304e4cf6b20f63ce6a8a (patch)
treee1a1dc7138c1baa98c4d5c78b1c98b4ec863fb19 /gnu/usr.bin
parentd81050bb21ce5f6af3540aaba79bfba85fd13949 (diff)
update to sudo 1.5.6p6
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/sudo/sudo/check.c7
-rw-r--r--gnu/usr.bin/sudo/sudo/find_path.c12
-rw-r--r--gnu/usr.bin/sudo/sudo/getspwuid.c4
-rw-r--r--gnu/usr.bin/sudo/sudo/tgetpass.c10
-rw-r--r--gnu/usr.bin/sudo/sudo/version.h4
5 files changed, 17 insertions, 20 deletions
diff --git a/gnu/usr.bin/sudo/sudo/check.c b/gnu/usr.bin/sudo/sudo/check.c
index eef379b8bfa..0c72fc2a070 100644
--- a/gnu/usr.bin/sudo/sudo/check.c
+++ b/gnu/usr.bin/sudo/sudo/check.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: check.c,v 1.11 1998/09/17 16:14:18 millert Exp $ */
+/* $OpenBSD: check.c,v 1.12 1998/11/13 22:44:33 millert Exp $ */
/*
* CU sudo version 1.5.6 (based on Root Group sudo version 1.1)
@@ -38,7 +38,7 @@
*/
#ifndef lint
-static char rcsid[] = "$From: check.c,v 1.142 1998/09/17 16:13:05 millert Exp $";
+static char rcsid[] = "$From: check.c,v 1.144 1998/09/18 05:29:26 millert Exp $";
#endif /* lint */
#include "config.h"
@@ -308,6 +308,7 @@ static int check_timestamp()
timestamp_is_old = 2; /* bogus time value */
log_error(BAD_STAMPFILE);
inform_user(BAD_STAMPFILE);
+ remove_timestamp();
} else {
timestamp_is_old = 0; /* time value is reasonable */
}
@@ -748,7 +749,7 @@ static void pam_attempt_auth()
int retval;
register int counter = TRIES_FOR_PASSWORD;
- /* printf("PAM Authentication\n"); */
+ set_perms(PERM_ROOT, 0);
retval = pam_start("sudo", user_name, &conv, &pamh);
if (retval != PAM_SUCCESS) {
pam_end(pamh, retval);
diff --git a/gnu/usr.bin/sudo/sudo/find_path.c b/gnu/usr.bin/sudo/sudo/find_path.c
index 285166fc18e..159edff7756 100644
--- a/gnu/usr.bin/sudo/sudo/find_path.c
+++ b/gnu/usr.bin/sudo/sudo/find_path.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: find_path.c,v 1.6 1998/09/15 02:42:44 millert Exp $ */
+/* $OpenBSD: find_path.c,v 1.7 1998/11/13 22:44:34 millert Exp $ */
/*
* CU sudo version 1.5.6
@@ -116,18 +116,10 @@ char * find_path(file)
/*
* If we were given a fully qualified or relative path
* there is no need to look at PATH.
- * We really want to fall back if !sudo_goodpath() but then
- * the error is "not found" -- this way we get the correct error.
*/
if (strchr(file, '/')) {
(void) strcpy(command, file);
- if (sudo_goodpath(command)) {
- return(command);
- } else {
- (void) fprintf(stderr, "%s: %s: ", Argv[0], command);
- perror("");
- exit(1);
- }
+ return(sudo_goodpath(command));
}
/*
diff --git a/gnu/usr.bin/sudo/sudo/getspwuid.c b/gnu/usr.bin/sudo/sudo/getspwuid.c
index 49032f0725e..156af87f8bd 100644
--- a/gnu/usr.bin/sudo/sudo/getspwuid.c
+++ b/gnu/usr.bin/sudo/sudo/getspwuid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getspwuid.c,v 1.6 1998/09/15 02:42:44 millert Exp $ */
+/* $OpenBSD: getspwuid.c,v 1.7 1998/11/13 22:44:34 millert Exp $ */
/*
* CU sudo version 1.5.6
@@ -184,7 +184,7 @@ static char *sudo_getspwd(pw_ent)
{
struct pr_passwd *spw_ent;
- if ((spw_ent = getprpwuid(pw_ent->pw_uid)) && spw_ent->ufld.fd_encrypt) {
+ if ((spw_ent = getprpwnam(pw_ent->pw_name)) && spw_ent->ufld.fd_encrypt) {
# ifdef __alpha
crypt_type = spw_ent -> ufld.fd_oldcrypt;
# ifdef AUTH_CRYPT_C1CRYPT
diff --git a/gnu/usr.bin/sudo/sudo/tgetpass.c b/gnu/usr.bin/sudo/sudo/tgetpass.c
index bd6aacd8d09..706abf6e89e 100644
--- a/gnu/usr.bin/sudo/sudo/tgetpass.c
+++ b/gnu/usr.bin/sudo/sudo/tgetpass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tgetpass.c,v 1.10 1998/09/15 02:42:45 millert Exp $ */
+/* $OpenBSD: tgetpass.c,v 1.11 1998/11/13 22:44:34 millert Exp $ */
/*
* CU sudo version 1.5.6
@@ -58,6 +58,7 @@ static char rcsid[] = "$From: tgetpass.c,v 1.63 1998/09/09 00:43:49 millert Exp
#include <sys/select.h>
#endif /* HAVE_SYS_SELECT_H */
#include <sys/time.h>
+#include <errno.h>
#include <signal.h>
#include <fcntl.h>
#ifdef HAVE_TERMIOS_H
@@ -145,6 +146,7 @@ char * tgetpass(prompt, timeout, user, host)
output = stderr;
} else {
output = input;
+ setbuf(output, NULL);
}
/*
@@ -223,8 +225,10 @@ char * tgetpass(prompt, timeout, user, host)
* get password or return empty string if nothing to read by timeout
*/
buf[0] = '\0';
- if (select(fileno(input) + 1, readfds, 0, 0, &tv) > 0 &&
- fgets(buf, sizeof(buf), input)) {
+ while ((n = select(fileno(input) + 1, readfds, 0, 0, &tv)) == -1 &&
+ errno == EINTR)
+ ;
+ if (n != 0 && fgets(buf, sizeof(buf), input)) {
n = strlen(buf);
if (buf[n - 1] == '\n')
buf[n - 1] = '\0';
diff --git a/gnu/usr.bin/sudo/sudo/version.h b/gnu/usr.bin/sudo/sudo/version.h
index 127bf5a4ade..1766c5c5acb 100644
--- a/gnu/usr.bin/sudo/sudo/version.h
+++ b/gnu/usr.bin/sudo/sudo/version.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: version.h,v 1.6 1998/09/15 02:42:45 millert Exp $ */
+/* $OpenBSD: version.h,v 1.7 1998/11/13 22:44:34 millert Exp $ */
/*
* CU sudo version 1.5.6
@@ -25,6 +25,6 @@
#ifndef _SUDO_VERSION_H
#define _SUDO_VERSION_H
-static char version[] = "1.5.6";
+static char version[] = "1.5.6p6";
#endif /* _SUDO_VERSION_H */