~ubuntu-branches/ubuntu/breezy/pam/breezy

« back to all changes in this revision

Viewing changes to debian/patches-applied/036_pam_wheel_getlogin_considered_harmful

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman
  • Date: 2004-06-28 14:28:08 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040628142808-adikk7vtfg3pzcjw
Tags: 0.76-22
* Add uploaders
* Document location of repository
* Fix options containing arguments in pam_unix, Closes: #254904

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: Linux-PAM/doc/modules/pam_wheel.sgml
 
2
===================================================================
 
3
RCS file: /afs/sipb/project/debian/cvs/pam/Linux-PAM/doc/modules/pam_wheel.sgml,v
 
4
retrieving revision 1.4
 
5
diff -u -r1.4 pam_wheel.sgml
 
6
--- Linux-PAM/doc/modules/pam_wheel.sgml        15 Sep 2002 20:44:05 -0000      1.4
 
7
+++ Linux-PAM/doc/modules/pam_wheel.sgml        15 Oct 2002 14:39:24 -0000
 
8
@@ -48,7 +48,6 @@
 
9
 
 
10
 <tag><bf>Recognized arguments:</bf></tag>
 
11
 <tt/debug/;
 
12
-<tt/use_uid/;
 
13
 <tt/trust/;
 
14
 <tt/deny/;
 
15
 <tt/group=XXXX/
 
16
@@ -68,13 +67,6 @@
 
17
 <item>
 
18
 <tt/debug/ -
 
19
 Supply more debugging information to <tt/syslog(3)/.
 
20
-
 
21
-<item>
 
22
-<tt/use_uid/ -
 
23
-This option modifies the behavior of the module by using the current
 
24
-<tt/uid/ of the process and not the <tt/getlogin(3)/ name of the user.
 
25
-This option is useful for being able to jump from one account to
 
26
-another, for example with 'su'.
 
27
 
 
28
 <item>
 
29
 <tt/trust/ -
 
30
Index: Linux-PAM/modules/pam_wheel/pam_wheel.c
 
31
===================================================================
 
32
RCS file: /afs/sipb/project/debian/cvs/pam/Linux-PAM/modules/pam_wheel/pam_wheel.c,v
 
33
retrieving revision 1.1.1.2
 
34
diff -u -r1.1.1.2 pam_wheel.c
 
35
--- Linux-PAM/modules/pam_wheel/pam_wheel.c     15 Sep 2002 20:09:04 -0000      1.1.1.2
 
36
+++ Linux-PAM/modules/pam_wheel/pam_wheel.c     15 Oct 2002 14:39:24 -0000
 
37
@@ -71,9 +71,8 @@
 
38
 /* argument parsing */
 
39
 
 
40
 #define PAM_DEBUG_ARG       0x0001
 
41
-#define PAM_USE_UID_ARG     0x0002
 
42
-#define PAM_TRUST_ARG       0x0004
 
43
-#define PAM_DENY_ARG        0x0010  
 
44
+#define PAM_TRUST_ARG       0x0002
 
45
+#define PAM_DENY_ARG        0x0004
 
46
 
 
47
 static int _pam_parse(int argc, const char **argv, char *use_group,
 
48
                      size_t group_length)
 
49
@@ -89,8 +88,7 @@
 
50
 
 
51
           if (!strcmp(*argv,"debug"))
 
52
                ctrl |= PAM_DEBUG_ARG;
 
53
-          else if (!strcmp(*argv,"use_uid"))
 
54
-               ctrl |= PAM_USE_UID_ARG;
 
55
+          else if (!strcmp(*argv,"use_uid")); /* ignored for compat. */
 
56
           else if (!strcmp(*argv,"trust"))
 
57
                ctrl |= PAM_TRUST_ARG;
 
58
           else if (!strcmp(*argv,"deny"))
 
59
@@ -151,22 +149,13 @@
 
60
         return PAM_IGNORE;
 
61
      }
 
62
      
 
63
-     if (ctrl & PAM_USE_UID_ARG) {
 
64
-         tpwd = getpwuid(getuid());
 
65
-         if (!tpwd) {
 
66
-            if (ctrl & PAM_DEBUG_ARG)
 
67
-                _pam_log(LOG_NOTICE,"who is running me ?!");
 
68
-            return PAM_SERVICE_ERR;
 
69
-         }
 
70
-         fromsu = tpwd->pw_name;
 
71
-     } else {
 
72
-         fromsu = getlogin();
 
73
-         if (!fromsu) {
 
74
-             if (ctrl & PAM_DEBUG_ARG)
 
75
-                _pam_log(LOG_NOTICE,"who is running me ?!");
 
76
-             return PAM_SERVICE_ERR;
 
77
-         }
 
78
+     tpwd = getpwuid(getuid());
 
79
+     if (!tpwd) {
 
80
+        if (ctrl & PAM_DEBUG_ARG)
 
81
+            _pam_log(LOG_NOTICE,"who is running me ?!");
 
82
+        return PAM_SERVICE_ERR;
 
83
      }
 
84
+     fromsu = tpwd->pw_name;
 
85
      
 
86
      if (!use_group[0]) {
 
87
         if ((grp = getgrnam("wheel")) == NULL) {