~ubuntu-branches/ubuntu/quantal/sudo/quantal

« back to all changes in this revision

Viewing changes to debian/patches/debian-changes-1.7.4p6-1

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2011-11-20 12:07:45 UTC
  • mfrom: (1.3.17 sid)
  • Revision ID: package-import@ubuntu.com-20111120120745-o3qpklobmygytndc
Tags: 1.8.3p1-1ubuntu1
* Merge from debian/testing, remaining changes:
  - debian/patches/keep_home_by_default.patch:
    + Set HOME in initial_keepenv_table. (rebased for 1.8.3p1)
  - debian/patches/enable_badpass.patch: turn on "mail_badpass" by default:
    + attempting sudo without knowing a login password is as bad as not
      being listed in the sudoers file, especially if getting the password
      wrong means doing the access-check-email-notification never happens
      (rebased for 1.8.3p1)
  - debian/rules:
    + compile with --without-lecture --with-tty-tickets (Ubuntu specific)
    + install man/man8/sudo_root.8 (Ubuntu specific)
    + install apport hooks
    + The ubuntu-sudo-as-admin-successful.patch was taken upstream by
      Debian however it requires a --enable-admin-flag configure flag to
      actually enable it.
  - debian/sudoers: 
    + grant admin group sudo access
  - debian/sudo-ldap.dirs, debian/sudo.dirs: 
    + add usr/share/apport/package-hooks
  - debian/sudo.preinst:
    + avoid conffile prompt by checking for known default /etc/sudoers
      and if found installing the correct default /etc/sudoers file

Show diffs side-by-side

added added

removed removed

Lines of Context:
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:
5
 
 .
6
 
 sudo (1.7.4p6-1) unstable; urgency=low
7
 
 .
8
 
   * new upstream version
9
 
   * touch the right stamp name after configuring, closes: #611287
10
 
   * patch from Svante Signell to fix build problem on Hurd, closes: #611290
11
 
 .
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
16
 
 
17
 
---
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:
21
 
 
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>
29
 
 
30
 
--- sudo-1.7.4p6.orig/env.c
31
 
+++ sudo-1.7.4p6/env.c
32
 
@@ -610,10 +610,16 @@ rebuild_env(noexec)
33
 
 #ifdef ENV_DEBUG
34
 
     memset(env.envp, 0, env.env_size * sizeof(char *));
35
 
 #endif
36
 
-    if (def_env_reset || ISSET(sudo_mode, MODE_LOGIN_SHELL)) {
37
 
-       /* Reset HOME based on target user unless keeping old value. */
38
 
-       reset_home = TRUE;
39
 
 
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))
45
 
+           reset_home = TRUE;
46
 
+    }
47
 
+
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++) {
51
 
            int keepit;
52
 
@@ -709,6 +715,11 @@ rebuild_env(noexec)
53
 
            if (!ISSET(didvar, DID_USERNAME))
54
 
                sudo_setenv("USERNAME", user_name, FALSE);
55
 
        }
56
 
+
57
 
+       /* If we didn't keep HOME, reset it based on target user. */
58
 
+       if (!ISSET(didvar, KEPT_HOME))
59
 
+           reset_home = TRUE;
60
 
+
61
 
        /*
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);
66
 
        }
67
 
     } else {
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))
72
 
-               reset_home = TRUE;
73
 
-       }
74
 
-
75
 
        /*
76
 
         * Copy environ entries as long as they don't match env_delete or
77
 
         * env_check.
78
 
@@ -778,7 +782,7 @@ rebuild_env(noexec)
79
 
     }
80
 
 
81
 
     /* Set $HOME to target user if not preserving user's value. */
82
 
-    if (reset_home && !ISSET(didvar, KEPT_HOME))
83
 
+    if (reset_home)
84
 
        sudo_setenv("HOME", runas_pw->pw_dir, TRUE);
85
 
 
86
 
     /* Provide default values for $TERM and $PATH if they are not set. */