]> granicus.if.org Git - shadow/commitdiff
* libmisc/setugid.c libmisc/age.c (setup_uid_gid): is_console is
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 5 Apr 2009 22:33:00 +0000 (22:33 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 5 Apr 2009 22:33:00 +0000 (22:33 +0000)
never set ifndef USE_PAM. Change the prototype of setup_uid_gid()
when USE_PAM is not defined. This permits to remove add_groups
from PAM builds.  setup_uid_gid is already subject to
HAVE_INITGROUPS.

ChangeLog
libmisc/setugid.c

index cff4162d03e6e5f48e95b36b1d040187cd0d477c..c7ef7a7d882b28acbdbe8269e3c276ba849734fe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,13 +4,15 @@
        ifndef USE_PAM.
        * lib/prototypes.h: Remove the declaration of add_cons_grps(). The
        function does not exist.
-       * libmisc/age.c (setup_uid_gid): is_console is never set ifndef
-       USE_PAM. Change the prototype of setup_uid_gid() when USE_PAM is
-       not defined. This permits to remove add_groups from PAM builds.
-       setup_uid_gid is already subject to HAVE_INITGROUPS.
+       * libmisc/setugid.c libmisc/age.c (setup_uid_gid): is_console is
+       never set ifndef USE_PAM. Change the prototype of setup_uid_gid()
+       when USE_PAM is not defined. This permits to remove add_groups
+       from PAM builds.  setup_uid_gid is already subject to
+       HAVE_INITGROUPS.
        * libmisc/pwd2spwd.c (pwd_to_spwd): pwd_to_spwd() is not used in
        PAM builds.
 
+
 2009-04-05  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/passwd.c: do_update_age is only used ifndef USE_PAM. Make it
index be0d7163dd0848a6d536bd1643e200a1024c12ca..80c5f6dc9a26b42cc84a27fb939446f05d29c905 100644 (file)
@@ -108,13 +108,17 @@ int change_uid (const struct passwd *info)
  *     Returns 0 on success, or -1 on failure.
  */
 
+#if defined (HAVE_INITGROUPS) && ! (defined USE_PAM)
 int setup_uid_gid (const struct passwd *info, bool is_console)
+#else
+int setup_uid_gid (const struct passwd *info)
+#endif
 {
        if (setup_groups (info) < 0) {
                return -1;
        }
 
-#ifdef HAVE_INITGROUPS
+#if defined (HAVE_INITGROUPS) && ! defined (USE_PAM)
        if (is_console) {
                char *cp = getdef_str ("CONSOLE_GROUPS");
 
@@ -122,7 +126,7 @@ int setup_uid_gid (const struct passwd *info, bool is_console)
                        perror ("Warning: add_groups");
                }
        }
-#endif                         /* HAVE_INITGROUPS */
+#endif                         /* HAVE_INITGROUPS && !USE_PAM*/
 
        if (change_uid (info) < 0) {
                return -1;