summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-08-14 18:17:00 +0200
committerGünther Deschner <gd@samba.org>2008-10-10 15:39:20 +0200
commitd397bafa0ac00df862d6c2b165df6b7cf9d2d4bd (patch)
tree8f65ed1de4fbb1e01cf1f53e4842886be3dfd0c4 /source3
parent377e4f929a4e0913fcc4b531437049db450659ea (diff)
downloadsamba-d397bafa0ac00df862d6c2b165df6b7cf9d2d4bd.tar.gz
samba-d397bafa0ac00df862d6c2b165df6b7cf9d2d4bd.tar.bz2
samba-d397bafa0ac00df862d6c2b165df6b7cf9d2d4bd.zip
pam_winbind: use libwbclient for WINBINDD_INFO.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/pam_winbind.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c
index 4f4f043df4..14eea9f0d6 100644
--- a/source3/nsswitch/pam_winbind.c
+++ b/source3/nsswitch/pam_winbind.c
@@ -784,8 +784,6 @@ static int pam_winbind_request_log(struct pwb_context *ctx,
/* Otherwise, the authentication looked good */
#if 0
switch (req_type) {
- case WINBINDD_INFO:
- break;
case WINBINDD_PAM_AUTH:
_pam_log(ctx, LOG_NOTICE,
"user '%s' granted access", user);
@@ -2053,20 +2051,25 @@ static int get_warn_pwd_expire_from_config(struct pwb_context *ctx)
static char winbind_get_separator(struct pwb_context *ctx)
{
- struct winbindd_request request;
- struct winbindd_response response;
+ wbcErr wbc_status;
+ static struct wbcInterfaceDetails *details = NULL;
- ZERO_STRUCT(request);
- ZERO_STRUCT(response);
+ wbc_status = wbcInterfaceDetails(&details);
+ if (!WBC_ERROR_IS_OK(wbc_status)) {
+ _pam_log(ctx, LOG_ERR,
+ "Could not retrieve winbind interface details: %s",
+ wbcErrorString(wbc_status));
+ return '\0';
+ }
- if (pam_winbind_request_log(ctx, WINBINDD_INFO,
- &request, &response, NULL)) {
+ if (!details) {
return '\0';
}
- return response.data.info.winbind_separator;
+ return details->winbind_separator;
}
+
/**
* Convert a upn to a name.
*