diff options
Diffstat (limited to 'modules/pam_group/pam_group.c')
-rw-r--r-- | modules/pam_group/pam_group.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c index be5f20f3..263b3d51 100644 --- a/modules/pam_group/pam_group.c +++ b/modules/pam_group/pam_group.c @@ -656,7 +656,11 @@ static int check_account(pam_handle_t *pamh, const char *service, } /* If buffer starts with @, we are using netgroups */ if (buffer[0] == '@') +#ifdef HAVE_INNETGR good &= innetgr (&buffer[1], NULL, user, NULL); +#else + pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support"); +#endif /* otherwise, if the buffer starts with %, it's a UNIX group */ else if (buffer[0] == '%') good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]); @@ -739,14 +743,14 @@ static int check_account(pam_handle_t *pamh, const char *service, /* --- public authentication management functions --- */ -PAM_EXTERN int +int pam_sm_authenticate (pam_handle_t *pamh UNUSED, int flags UNUSED, int argc UNUSED, const char **argv UNUSED) { return PAM_IGNORE; } -PAM_EXTERN int +int pam_sm_setcred (pam_handle_t *pamh, int flags, int argc UNUSED, const char **argv UNUSED) { @@ -817,18 +821,3 @@ pam_sm_setcred (pam_handle_t *pamh, int flags, } /* end of module definition */ - -#ifdef PAM_STATIC - -/* static module data */ - -struct pam_module _pam_group_modstruct = { - "pam_group", - pam_sm_authenticate, - pam_sm_setcred, - NULL, - NULL, - NULL, - NULL -}; -#endif |