From f17d6c53cd7d52fb29b6a8634d601841a59978d1 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 10 Nov 1994 00:48:55 +0000 Subject: [PATCH] added exempt group support --- check.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/check.c b/check.c index c332a18e2..12d8412e2 100644 --- a/check.c +++ b/check.c @@ -86,6 +86,7 @@ static char rcsid[] = "$Id$"; * Prototypes for local functions */ static int check_timestamp __P((void)); +static int user_is_exempt __P((void)); static void check_passwd __P((void)); static void update_timestamp __P((void)); static void reminder __P((void)); @@ -110,6 +111,9 @@ void check_user() register int rtn; mode_t oldmask; + if (user_is_exempt()) /* some users don't need to enter a passwd */ + return; + oldmask = umask(077); /* make sure the timestamp files are private */ rtn = check_timestamp(); @@ -126,6 +130,25 @@ void check_user() +/******************************************************************** + * + * user_is_exempt() + * + * this function checks the user is exempt from supplying a password + * XXX - should check more that just real gid. + */ + +static int user_is_exempt() +{ +#ifdef EXEMPTGROUP + return ((getgid() == EXEMPTGROUP)); +#else + return (1); +#endif +} + + + /******************************************************************** * * check_timestamp() -- 2.50.0