]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs:
authorTomas Mraz <tm@t8m.info>
Thu, 18 Nov 2010 09:37:31 +0000 (09:37 +0000)
committerTomas Mraz <tm@t8m.info>
Thu, 18 Nov 2010 09:37:31 +0000 (09:37 +0000)
Purpose of commit: cleanup

Commit summary:
---------------
2010-11-18  Tomas Mraz  <tm@t8m.info>

        * modules/pam_limits/pam_limits.c (pam_parse,pam_sm_open_session):
        Drop obsolete and broken option change_uid.
        * modules/pam_limits/pam_limits.8.xml: Likewise.

ChangeLog
modules/pam_limits/pam_limits.8.xml
modules/pam_limits/pam_limits.c

index 41d782f2e5fda29c08178a4354c2472ca65b5073..b8cde26253f06e519445dcbc580607f6ee100557 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-18  Tomas Mraz  <tm@t8m.info>
+
+       * modules/pam_limits/pam_limits.c (pam_parse,pam_sm_open_session):
+       Drop obsolete and broken option change_uid.
+       * modules/pam_limits/pam_limits.8.xml: Likewise.
+
 2010-11-16  Tomas Mraz  <tm@t8m.info>
 
        * modules/pam_pwhistory/pam_pwhistory.c (pam_sm_chauthtok): Remove
index 0be7ef4ddec53e548f198ea1b52731fc60209df5..7b944f9e75e6e7a6508ff2925bc744cc81dc1b03 100644 (file)
@@ -22,9 +22,6 @@
   <refsynopsisdiv>
     <cmdsynopsis id="pam_limits-cmdsynopsis">
       <command>pam_limits.so</command>
-      <arg choice="opt">
-        change_uid
-      </arg>
       <arg choice="opt">
         conf=<replaceable>/path/to/limits.conf</replaceable>
       </arg>
   <refsect1 id="pam_limits-options">
     <title>OPTIONS</title>
     <variablelist>
-      <varlistentry>
-        <term>
-          <option>change_uid</option>
-        </term>
-        <listitem>
-          <para>
-            Change real uid to the user for who the limits are set up. Use this
-            option if you have problems like login not forking a shell for user
-            who has no processes. Be warned that something else may break when
-            you do this.
-          </para>
-        </listitem>
-      </varlistentry>
       <varlistentry>
         <term>
           <option>conf=<replaceable>/path/to/limits.conf</replaceable></option>
index f446f9e3f30e607bf0d9cdbafa939da46aeff75d..79cc717e5f9360f1854583783b973b95e82ca801 100644 (file)
@@ -103,7 +103,6 @@ struct pam_limit_s {
 /* argument parsing */
 
 #define PAM_DEBUG_ARG       0x0001
-#define PAM_DO_SETREUID     0x0002
 #define PAM_UTMP_EARLY      0x0004
 #define PAM_NO_AUDIT        0x0008
 
@@ -127,8 +126,6 @@ _pam_parse (const pam_handle_t *pamh, int argc, const char **argv,
            ctrl |= PAM_DEBUG_ARG;
        } else if (!strncmp(*argv,"conf=",5)) {
            pl->conf_file = *argv+5;
-       } else if (!strncmp(*argv,"change_uid",10)) {
-           ctrl |= PAM_DO_SETREUID;
        } else if (!strcmp(*argv,"utmp_early")) {
            ctrl |= PAM_UTMP_EARLY;
        } else if (!strcmp(*argv,"noaudit")) {
@@ -777,10 +774,6 @@ out:
        return retval;
     }
 
-    if (ctrl & PAM_DO_SETREUID) {
-       setreuid(pwd->pw_uid, -1);
-    }
-
     retval = setup_limits(pamh, pwd->pw_name, pwd->pw_uid, ctrl, pl);
     if (retval & LOGIN_ERR)
        pam_error(pamh, _("Too many logins for '%s'."), pwd->pw_name);