* lib/prototypes.h, libmisc/addgrps.c: restrict add_groups() to

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/pwd2spwd.c (pwd_to_spwd): pwd_to_spwd() is not used in
	PAM builds.
This commit is contained in:
nekral-guest
2009-04-05 22:29:42 +00:00
parent 021066a980
commit a51954203e
5 changed files with 39 additions and 6 deletions

View File

@@ -60,8 +60,9 @@
extern char *Prog;
/* addgrps.c */
#if defined (HAVE_SETGROUPS) && ! defined (USE_PAM)
extern int add_groups (const char *);
extern void add_cons_grps (void);
#endif
/* age.c */
extern void agecheck (const struct passwd *, const struct spwd *);
@@ -231,7 +232,9 @@ extern void do_pam_passwd (const char *user, bool silent, bool change_expired);
extern bool isttytime (const char *, const char *, time_t);
/* pwd2spwd.c */
#ifdef USE_PAM
extern struct spwd *pwd_to_spwd (const struct passwd *);
#endif
/* pwdcheck.c */
#ifndef USE_PAM
@@ -259,7 +262,11 @@ extern char *crypt_make_salt (const char *meth, void *arg);
/* setugid.c */
extern int setup_groups (const struct passwd *info);
extern int change_uid (const struct passwd *info);
#if (defined HAVE_INITGROUPS) && (! defined USE_PAM)
extern int setup_uid_gid (const struct passwd *info, bool is_console);
#else
extern int setup_uid_gid (const struct passwd *info);
#endif
/* setup.c */
extern void setup (struct passwd *);