~ubuntu-branches/ubuntu/oneiric/pam/oneiric-proposed

« back to all changes in this revision

Viewing changes to modules/pam_umask/pam_umask.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-02-17 16:15:47 UTC
  • mfrom: (3.2.15 sid)
  • Revision ID: james.westby@ubuntu.com-20110217161547-afxi0yboxvn18a5t
Tags: 1.1.2-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/libpam-modules.postinst: Add PATH to /etc/environment if it's
    not present there or in /etc/security/pam_env.conf. (should send to
    Debian).
  - debian/libpam0g.postinst: only ask questions during update-manager when
    there are non-default services running.
  - debian/patches-applied/series: Ubuntu patches are as below ...
  - debian/patches-applied/ubuntu-rlimit_nice_correction: Explicitly
    initialise RLIMIT_NICE rather than relying on the kernel limits.
  - Change Vcs-Bzr to point at the Ubuntu branch.
  - debian/patches-applied/pam_motd-legal-notice: display the contents of
    /etc/legal once, then set a flag in the user's homedir to prevent
    showing it again.
  - debian/update-motd.5, debian/libpam-modules.manpages: add a manpage
    for update-motd, with some best practices and notes of explanation.
  - debian/patches/update-motd-manpage-ref: add a reference in pam_motd(8)
    to update-motd(5)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2005, 2006, 2007 Thorsten Kukuk <kukuk@thkukuk.de>
 
2
 * Copyright (c) 2005, 2006, 2007, 2010 Thorsten Kukuk <kukuk@thkukuk.de>
3
3
 *
4
4
 * Redistribution and use in source and binary forms, with or without
5
5
 * modification, are permitted provided that the following conditions
197
197
 
198
198
  if (options->usergroups)
199
199
    {
200
 
      /* if not root, and UID == GID, and username is the same as
201
 
         primary group name, set umask group bits to be the same as
202
 
         owner bits (examples: 022 -> 002, 077 -> 007).  */
203
 
      if (pw->pw_uid != 0 && pw->pw_uid == pw->pw_gid)
 
200
      /* if not root and username is the same as primary group name,
 
201
         set umask group bits to be the same as owner bits
 
202
         (examples: 022 -> 002, 077 -> 007).  */
 
203
      if (pw->pw_uid != 0)
204
204
        {
205
205
          struct group *grp = pam_modutil_getgrgid (pamh, pw->pw_gid);
206
206
          if (grp && (strcmp (pw->pw_name, grp->gr_name) == 0))