diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-12-16 17:52:36 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-12-16 17:52:36 +0000 |
commit | 6c45b51f441daab12166843bc12cbf0a4d480e35 (patch) | |
tree | b6b7f868a118f3c9ebd780a9abef172a32dab951 /modules/pam_group/pam_group.c | |
parent | 4c2c1683d7f9fb6690175645a1ddea0acf3c308e (diff) | |
download | pam-6c45b51f441daab12166843bc12cbf0a4d480e35.tar.gz pam-6c45b51f441daab12166843bc12cbf0a4d480e35.tar.bz2 pam-6c45b51f441daab12166843bc12cbf0a4d480e35.zip |
Relevant BUGIDs: none
Purpose of commit: new feature
Commit summary:
---------------
2005-12-16 Thorsten Kukuk <kukuk@thkukuk.de>
* modules/pam_group/pam_group.c (check_account): Implement
support for netgroups.
* modules/pam_group/group.conf: Add all documentation to this
example config file and don't reference to outdated configs.
* modules/pam_group/README: New.
* modules/pam_group/Makefile.am: Add README to EXTRADIST.
Diffstat (limited to 'modules/pam_group/pam_group.c')
-rw-r--r-- | modules/pam_group/pam_group.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c index c81ad665..bc40912b 100644 --- a/modules/pam_group/pam_group.c +++ b/modules/pam_group/pam_group.c @@ -6,11 +6,6 @@ * Written by Andrew Morgan <morgan@linux.kernel.org> 1996/7/6 */ -static const char rcsid[] = -"$Id$;\n" -"Version 0.5 for Linux-PAM\n" -"Copyright (c) Andrew G. Morgan 1996 <morgan@linux.kernel.org>\n"; - #include "config.h" #include <sys/file.h> @@ -27,6 +22,7 @@ static const char rcsid[] = #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> +#include <netdb.h> #define PAM_GROUP_BUFLEN 1000 #define FIELD_SEPARATOR ';' /* this is new as of .02 */ @@ -686,7 +682,11 @@ static int check_account(pam_handle_t *pamh, const char *service, "%s: no user entry #%d", PAM_GROUP_CONF, count); continue; } - good &= logic_field(pamh,user, buffer, count, is_same); + /* If buffer starts with @, we are using netgroups */ + if (buffer[0] == '@') + good &= innetgr (&buffer[1], NULL, user, NULL); + else + good &= logic_field(pamh,user, buffer, count, is_same); D(("with user: %s", good ? "passes":"fails" )); /* here we get the time field */ |