]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: 3004656
authorThorsten Kukuk <kukuk@thkukuk.de>
Tue, 22 Jun 2010 16:26:28 +0000 (16:26 +0000)
committerThorsten Kukuk <kukuk@thkukuk.de>
Tue, 22 Jun 2010 16:26:28 +0000 (16:26 +0000)
Purpose of commit: bugfix

Commit summary:
---------------

2010-06-22  Thorsten Kukuk  <kukuk@thkukuk.de>

        * modules/pam_umask/pam_umask.8.xml: Remove comparisation of
        gid and uid for usergroups.
        * modules/pam_umask/pam_umask.c (setup_limits_from_gecos): Likewise.
        Bug #3004656

ChangeLog
modules/pam_umask/pam_umask.8.xml
modules/pam_umask/pam_umask.c

index afbb367683647c12f7e08baddd159eb9b78ec93e..0016a2097c78151b37768bcfb83cb8adde06a17e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-06-22  Thorsten Kukuk  <kukuk@thkukuk.de>
 
+       * modules/pam_umask/pam_umask.8.xml: Remove comparisation of
+       gid and uid for usergroups.
+       * modules/pam_umask/pam_umask.c (setup_limits_from_gecos): Likewise.
+       Bug #3004656
+
        * configure.in: Don't check for libxcrypt if no xcrypt.h exists,
        fix typo introduced with 1.1.1.
        Reported by Diego Elio “Flameeyes” Pettenò.
index 09fc0e7c5b610c062c465272f11e0aaf50f8d755..3b7e197b90a6ea316ddd4aa17a5620c80cc06af4 100644 (file)
           </term>
           <listitem>
             <para>
-              If the user is not root, and the user ID is equal to the
-              group ID, and the username is the same as primary group name,
-              the umask group bits are set to be the same as
-              owner bits (examples: 022 -> 002, 077 -> 007).
+              If the user is not root and the username is the same as
+              primary group name, the umask group bits are set to be the
+              same as owner bits (examples: 022 -> 002, 077 -> 007).
             </para>
           </listitem>
         </varlistentry>
index eb88c1acfc40663ee0b188787b515747b67f5b49..6d2ec1ac23bf40400d61e4ea5c3253c1fd89f356 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, 2007 Thorsten Kukuk <kukuk@thkukuk.de>
+ * Copyright (c) 2005, 2006, 2007, 2010 Thorsten Kukuk <kukuk@thkukuk.de>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -197,10 +197,10 @@ setup_limits_from_gecos (pam_handle_t *pamh, options_t *options,
 
   if (options->usergroups)
     {
-      /* if not root, and UID == GID, and username is the same as
-        primary group name, set umask group bits to be the same as
-        owner bits (examples: 022 -> 002, 077 -> 007).  */
-      if (pw->pw_uid != 0 && pw->pw_uid == pw->pw_gid)
+      /* if not root and username is the same as primary group name,
+         set umask group bits to be the same as owner bits
+        (examples: 022 -> 002, 077 -> 007).  */
+      if (pw->pw_uid != 0)
        {
          struct group *grp = pam_modutil_getgrgid (pamh, pw->pw_gid);
          if (grp && (strcmp (pw->pw_name, grp->gr_name) == 0))