summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2010-06-22 16:26:28 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2010-06-22 16:26:28 +0000
commit53d8f564d1de7188d6bab82f51015ea4e9b78db2 (patch)
tree9e215a2f5c0cc7758653665bc444066a08c173a2 /modules
parent40b7b3f621fe56a03dd21cab49507b41312d16fa (diff)
Relevant BUGIDs: 3004656
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
Diffstat (limited to 'modules')
-rw-r--r--modules/pam_umask/pam_umask.8.xml7
-rw-r--r--modules/pam_umask/pam_umask.c10
2 files changed, 8 insertions, 9 deletions
diff --git a/modules/pam_umask/pam_umask.8.xml b/modules/pam_umask/pam_umask.8.xml
index 09fc0e7c..3b7e197b 100644
--- a/modules/pam_umask/pam_umask.8.xml
+++ b/modules/pam_umask/pam_umask.8.xml
@@ -115,10 +115,9 @@
</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>
diff --git a/modules/pam_umask/pam_umask.c b/modules/pam_umask/pam_umask.c
index eb88c1ac..6d2ec1ac 100644
--- a/modules/pam_umask/pam_umask.c
+++ b/modules/pam_umask/pam_umask.c
@@ -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))