1
Description: Upstream changes introduced in version 1.7.4p6-1
2
This patch has been created by dpkg-source during the package build.
3
Here's the last changelog entry, hopefully it gives details on why
4
those changes were made:
6
sudo (1.7.4p6-1) unstable; urgency=low
9
* touch the right stamp name after configuring, closes: #611287
10
* patch from Svante Signell to fix build problem on Hurd, closes: #611290
12
The person named in the Author field signed this changelog entry.
13
Author: Bdale Garbee <bdale@gag.com>
14
Bug-Debian: http://bugs.debian.org/611287
15
Bug-Debian: http://bugs.debian.org/611290
18
The information above should follow the Patch Tagging Guidelines, please
19
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
20
are templates for supplementary fields that you might want to add:
22
Origin: <vendor|upstream|other>, <url of original patch>
23
Bug: <url in upstream bugtracker>
24
Bug-Debian: http://bugs.debian.org/<bugnumber>
25
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
26
Forwarded: <no|not-needed|url proving that it has been forwarded>
27
Reviewed-By: <name and email of someone who approved the patch>
28
Last-Update: <YYYY-MM-DD>
30
--- sudo-1.7.4p6.orig/env.c
31
+++ sudo-1.7.4p6/env.c
32
@@ -610,10 +610,16 @@ rebuild_env(noexec)
34
memset(env.envp, 0, env.env_size * sizeof(char *));
36
- if (def_env_reset || ISSET(sudo_mode, MODE_LOGIN_SHELL)) {
37
- /* Reset HOME based on target user unless keeping old value. */
40
+ /* Reset HOME based on target user if configured to. */
41
+ if (ISSET(sudo_mode, MODE_RUN)) {
42
+ if (def_always_set_home ||
43
+ ISSET(sudo_mode, MODE_RESET_HOME | MODE_LOGIN_SHELL) ||
44
+ (ISSET(sudo_mode, MODE_SHELL) && def_set_home))
48
+ if (def_env_reset || ISSET(sudo_mode, MODE_LOGIN_SHELL)) {
49
/* Pull in vars we want to keep from the old environment. */
50
for (ep = old_envp; *ep; ep++) {
52
@@ -709,6 +715,11 @@ rebuild_env(noexec)
53
if (!ISSET(didvar, DID_USERNAME))
54
sudo_setenv("USERNAME", user_name, FALSE);
57
+ /* If we didn't keep HOME, reset it based on target user. */
58
+ if (!ISSET(didvar, KEPT_HOME))
62
* Set MAIL to target user in -i mode or if MAIL is not preserved
63
* from user's environment.
64
@@ -722,13 +733,6 @@ rebuild_env(noexec)
65
sudo_putenv(cp, ISSET(didvar, DID_MAIL), TRUE);
68
- /* Reset HOME based on target user if configured to. */
69
- if (ISSET(sudo_mode, MODE_RUN)) {
70
- if (def_always_set_home || ISSET(sudo_mode, MODE_RESET_HOME) ||
71
- (ISSET(sudo_mode, MODE_SHELL) && def_set_home))
76
* Copy environ entries as long as they don't match env_delete or
78
@@ -778,7 +782,7 @@ rebuild_env(noexec)
81
/* Set $HOME to target user if not preserving user's value. */
82
- if (reset_home && !ISSET(didvar, KEPT_HOME))
84
sudo_setenv("HOME", runas_pw->pw_dir, TRUE);
86
/* Provide default values for $TERM and $PATH if they are not set. */