diff options
author | Volker Lendecke <vl@samba.org> | 2010-01-09 20:20:36 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-01-24 20:32:16 +0100 |
commit | 7d18d058a1203ab7079f9dbdf37962803064d699 (patch) | |
tree | 44b5e54adfe02dccd954570ad5993c3dceed9475 /nsswitch/libwbclient/wbc_pam.c | |
parent | 185815a6472a7a09602b3c51198e20257241dfa7 (diff) | |
download | samba-7d18d058a1203ab7079f9dbdf37962803064d699.tar.gz samba-7d18d058a1203ab7079f9dbdf37962803064d699.tar.xz samba-7d18d058a1203ab7079f9dbdf37962803064d699.zip |
s3: Add wbinfo --ccache-save
With this command you can give winbind your password for later use by
the automatic ntlm_auth
Diffstat (limited to 'nsswitch/libwbclient/wbc_pam.c')
-rw-r--r-- | nsswitch/libwbclient/wbc_pam.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/nsswitch/libwbclient/wbc_pam.c b/nsswitch/libwbclient/wbc_pam.c index 1f76c0a143f..087db2e6c6b 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); +} |