From 53d8f564d1de7188d6bab82f51015ea4e9b78db2 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Tue, 22 Jun 2010 16:26:28 +0000 Subject: Relevant BUGIDs: 3004656 Purpose of commit: bugfix Commit summary: --------------- 2010-06-22 Thorsten Kukuk * 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 --- modules/pam_umask/pam_umask.8.xml | 7 +++---- modules/pam_umask/pam_umask.c | 10 +++++----- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'modules/pam_umask') 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 @@ - 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). 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 + * Copyright (c) 2005, 2006, 2007, 2010 Thorsten Kukuk * * 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)) -- cgit v1.2.3