From 7d18d058a1203ab7079f9dbdf37962803064d699 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 9 Jan 2010 20:20:36 +0100 Subject: s3: Add wbinfo --ccache-save With this command you can give winbind your password for later use by the automatic ntlm_auth --- nsswitch/libwbclient/wbc_pam.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'nsswitch/libwbclient/wbc_pam.c') diff --git a/nsswitch/libwbclient/wbc_pam.c b/nsswitch/libwbclient/wbc_pam.c index 1f76c0a143..087db2e6c6 100644 --- a/nsswitch/libwbclient/wbc_pam.c +++ b/nsswitch/libwbclient/wbc_pam.c @@ -1119,3 +1119,21 @@ wbcErr wbcCredentialCache(struct wbcCredentialCacheParams *params, { return WBC_ERR_NOT_IMPLEMENTED; } + +/* Authenticate a user with cached credentials */ +wbcErr wbcCredentialSave(const char *user, const char *password) +{ + struct winbindd_request request; + struct winbindd_response response; + + ZERO_STRUCT(request); + ZERO_STRUCT(response); + + strncpy(request.data.ccache_save.user, user, + sizeof(request.data.ccache_save.user)-1); + strncpy(request.data.ccache_save.pass, password, + sizeof(request.data.ccache_save.pass)-1); + request.data.ccache_save.uid = getuid(); + + return wbcRequestResponse(WINBINDD_CCACHE_SAVE, &request, &response); +} -- cgit