diff options
Diffstat (limited to 'source3/nsswitch/pam_winbind.c')
-rw-r--r-- | source3/nsswitch/pam_winbind.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c index 64e2173822..9a00ac2886 100644 --- a/source3/nsswitch/pam_winbind.c +++ b/source3/nsswitch/pam_winbind.c @@ -45,7 +45,9 @@ static int _pam_parse(int argc, const char **argv) ctrl |= WINBIND_TRY_FIRST_PASS_ARG; else if (!strcasecmp(*argv, "unknown_ok")) ctrl |= WINBIND_UNKNOWN_OK_ARG; - else if (!strncasecmp(*argv, "required_membership", strlen("required_membership"))) + else if (!strncasecmp(*argv, "require_membership_of", strlen("require_membership_of"))) + ctrl |= WINBIND_REQUIRED_MEMBERSHIP; + else if (!strncasecmp(*argv, "require-membership-of", strlen("require-membership-of"))) ctrl |= WINBIND_REQUIRED_MEMBERSHIP; else { _pam_log(LOG_ERR, "pam_parse: unknown option; %s", *argv); @@ -213,8 +215,8 @@ static int winbind_auth_request(const char *user, const char *pass, const char * /* lookup name? */ if (!strncmp("S-", member, 2) == 0) { - struct winbindd_request request; - struct winbindd_response response; + struct winbindd_request sid_request; + struct winbindd_response sid_response; ZERO_STRUCT(request); ZERO_STRUCT(response); @@ -230,11 +232,11 @@ static int winbind_auth_request(const char *user, const char *pass, const char * return PAM_AUTH_ERR; } - member = strdup(response.data.sid.sid); + member = response.data.sid.sid; } - strncpy(request.data.auth.required_membership_sid, member, - sizeof(request.data.auth.required_membership_sid)-1); + strncpy(request.data.auth.require_membership_of_sid, member, + sizeof(request.data.auth.require_membership_of_sid)-1); return pam_winbind_request_log(WINBINDD_PAM_AUTH, &request, &response, ctrl, user); } @@ -488,7 +490,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, /* Retrieve membership-string here */ for ( i=0; i<argc; i++ ) { - if (!strncmp(argv[i], "required_membership", strlen("required_membership"))) { + if (!strncmp(argv[i], "require_membership_of", strlen("require_membership_of"))) { char *p; char *parm = strdup(argv[i]); |