diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-11-12 16:37:39 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-11-12 16:37:39 +0000 |
commit | c1174506bc3ee3effa47838f01cc324ed29b6137 (patch) | |
tree | 9669dc42302cd425d596aba390cacd0d150cf2ec /usr.bin | |
parent | 189d0c72d6db3612d8f2b37d09c9ea3102ae0e2b (diff) |
Update to sudo 1.6.8p2
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/sudo/CHANGES | 7 | ||||
-rw-r--r-- | usr.bin/sudo/Makefile.in | 2 | ||||
-rw-r--r-- | usr.bin/sudo/env.c | 13 | ||||
-rw-r--r-- | usr.bin/sudo/sudo.8 | 8 | ||||
-rw-r--r-- | usr.bin/sudo/sudoers.5 | 2 | ||||
-rw-r--r-- | usr.bin/sudo/version.h | 2 | ||||
-rw-r--r-- | usr.bin/sudo/visudo.8 | 2 |
7 files changed, 29 insertions, 7 deletions
diff --git a/usr.bin/sudo/CHANGES b/usr.bin/sudo/CHANGES index c9bb15fbd56..eb3edc5bef3 100644 --- a/usr.bin/sudo/CHANGES +++ b/usr.bin/sudo/CHANGES @@ -1731,3 +1731,10 @@ Sudo 1.6.8 released. 547) Updated sample.pam to a current version. 548) Better detection of unchanged files in sudoedit. + +Sudo 1.6.8p1 released. + +549) Bash exported functions and the CDPATH variable are now stripped from + the environment passed to the program to be executed. + +Sudo 1.6.8p2 released. diff --git a/usr.bin/sudo/Makefile.in b/usr.bin/sudo/Makefile.in index 64aae1827c0..c456a75e818 100644 --- a/usr.bin/sudo/Makefile.in +++ b/usr.bin/sudo/Makefile.in @@ -130,7 +130,7 @@ TESTOBJS = interfaces.o testsudoers.o $(PARSEOBJS) LIBOBJS = @LIBOBJS@ @ALLOCA@ -VERSION = 1.6.8p1 +VERSION = 1.6.8p2 DISTFILES = $(SRCS) $(HDRS) BUGS CHANGES HISTORY INSTALL INSTALL.configure \ LICENSE Makefile.in PORTING README README.LDAP RUNSON TODO \ diff --git a/usr.bin/sudo/env.c b/usr.bin/sudo/env.c index 3cf1444fcee..5a05a4516ee 100644 --- a/usr.bin/sudo/env.c +++ b/usr.bin/sudo/env.c @@ -323,6 +323,13 @@ rebuild_env(envp, sudo_mode, noexec) /* Pull in vars we want to keep from the old environment. */ for (ep = envp; *ep; ep++) { keepit = 0; + + /* Skip variables with values beginning with () (bash functions) */ + if ((cp = strchr(*ep, '=')) != NULL) { + if (strncmp(cp, "=() ", 3) == 0) + continue; + } + for (cur = def_env_keep; cur; cur = cur->next) { len = strlen(cur->value); /* Deal with '*' wildcard */ @@ -405,6 +412,12 @@ rebuild_env(envp, sudo_mode, noexec) for (ep = envp; *ep; ep++) { okvar = 1; + /* Skip variables with values beginning with () (bash functions) */ + if ((cp = strchr(*ep, '=')) != NULL) { + if (strncmp(cp, "=() ", 3) == 0) + continue; + } + /* Skip anything listed in env_delete. */ for (cur = def_env_delete; cur && okvar; cur = cur->next) { len = strlen(cur->value); diff --git a/usr.bin/sudo/sudo.8 b/usr.bin/sudo/sudo.8 index 2640ee5600f..bf3592cc45c 100644 --- a/usr.bin/sudo/sudo.8 +++ b/usr.bin/sudo/sudo.8 @@ -149,7 +149,7 @@ .\" ======================================================================== .\" .IX Title "SUDO 8" -.TH SUDO 8 "September 8, 2004" "1.6.8" "MAINTENANCE COMMANDS" +.TH SUDO 8 "November 11, 2004" "1.6.8p2" "MAINTENANCE COMMANDS" .SH "NAME" sudo, sudoedit \- execute a command as another user .SH "SYNOPSIS" @@ -406,13 +406,15 @@ to subvert the program that \fBsudo\fR runs. To combat this the \&\f(CW\*(C`LD_*\*(C'\fR, \f(CW\*(C`_RLD_*\*(C'\fR, \f(CW\*(C`SHLIB_PATH\*(C'\fR (\s-1HP\-UX\s0 only), and \f(CW\*(C`LIBPATH\*(C'\fR (\s-1AIX\s0 only) environment variables are removed from the environment passed on to all commands executed. \fBsudo\fR will also remove the \f(CW\*(C`IFS\*(C'\fR, -\&\f(CW\*(C`ENV\*(C'\fR, \f(CW\*(C`BASH_ENV\*(C'\fR, \f(CW\*(C`KRB_CONF\*(C'\fR, \f(CW\*(C`KRBCONFDIR\*(C'\fR, \f(CW\*(C`KRBTKFILE\*(C'\fR, +\&\f(CW\*(C`CDPATH\*(C'\fR, \f(CW\*(C`ENV\*(C'\fR, \f(CW\*(C`BASH_ENV\*(C'\fR, \f(CW\*(C`KRB_CONF\*(C'\fR, \f(CW\*(C`KRBCONFDIR\*(C'\fR, \f(CW\*(C`KRBTKFILE\*(C'\fR, \&\f(CW\*(C`KRB5_CONFIG\*(C'\fR, \f(CW\*(C`LOCALDOMAIN\*(C'\fR, \f(CW\*(C`RES_OPTIONS\*(C'\fR, \f(CW\*(C`HOSTALIASES\*(C'\fR, \&\f(CW\*(C`NLSPATH\*(C'\fR, \f(CW\*(C`PATH_LOCALE\*(C'\fR, \f(CW\*(C`TERMINFO\*(C'\fR, \f(CW\*(C`TERMINFO_DIRS\*(C'\fR and \&\f(CW\*(C`TERMPATH\*(C'\fR variables as they too can pose a threat. If the \&\f(CW\*(C`TERMCAP\*(C'\fR variable is set and is a pathname, it too is ignored. Additionally, if the \f(CW\*(C`LC_*\*(C'\fR or \f(CW\*(C`LANGUAGE\*(C'\fR variables contain the -\&\f(CW\*(C`/\*(C'\fR or \f(CW\*(C`%\*(C'\fR characters, they are ignored. If \fBsudo\fR has been +\&\f(CW\*(C`/\*(C'\fR or \f(CW\*(C`%\*(C'\fR characters, they are ignored. Environment variables +with a value beginning with \f(CW\*(C`()\*(C'\fR are also removed as they could +be interpreted as \fBbash\fR functions. If \fBsudo\fR has been compiled with SecurID support, the \f(CW\*(C`VAR_ACE\*(C'\fR, \f(CW\*(C`USR_ACE\*(C'\fR and \&\f(CW\*(C`DLC_ACE\*(C'\fR variables are cleared as well. The list of environment variables that \fBsudo\fR clears is contained in the output of diff --git a/usr.bin/sudo/sudoers.5 b/usr.bin/sudo/sudoers.5 index ac731704e36..2e34c378887 100644 --- a/usr.bin/sudo/sudoers.5 +++ b/usr.bin/sudo/sudoers.5 @@ -149,7 +149,7 @@ .\" ======================================================================== .\" .IX Title "SUDOERS 5" -.TH SUDOERS 5 "September 6, 2004" "1.6.8" "MAINTENANCE COMMANDS" +.TH SUDOERS 5 "November 11, 2004" "1.6.8p2" "MAINTENANCE COMMANDS" .SH "NAME" sudoers \- list of which users may execute what .SH "DESCRIPTION" diff --git a/usr.bin/sudo/version.h b/usr.bin/sudo/version.h index 3d8296151cc..297445344ba 100644 --- a/usr.bin/sudo/version.h +++ b/usr.bin/sudo/version.h @@ -23,6 +23,6 @@ #ifndef _SUDO_VERSION_H #define _SUDO_VERSION_H -static const char version[] = "1.6.8p1"; +static const char version[] = "1.6.8p2"; #endif /* _SUDO_VERSION_H */ diff --git a/usr.bin/sudo/visudo.8 b/usr.bin/sudo/visudo.8 index 8581982ad9f..c04c5ce283e 100644 --- a/usr.bin/sudo/visudo.8 +++ b/usr.bin/sudo/visudo.8 @@ -149,7 +149,7 @@ .\" ======================================================================== .\" .IX Title "VISUDO 8" -.TH VISUDO 8 "September 6, 2004" "1.6.8" "MAINTENANCE COMMANDS" +.TH VISUDO 8 "November 11, 2004" "1.6.8p2" "MAINTENANCE COMMANDS" .SH "NAME" visudo \- edit the sudoers file .SH "SYNOPSIS" |