summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_pam.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-04-01 16:44:16 +0200
committerVolker Lendecke <vl@samba.org>2010-04-19 14:27:20 +0200
commit45eeed2893e569483136c3f998eacb776d52e1ce (patch)
tree10c7ceb16cf273c5a329d3e70fd013d70ba9507d /source3/winbindd/winbindd_pam.c
parent518a4f5423bb360cf886aa1ce951f5323f4b12f9 (diff)
downloadsamba-45eeed2893e569483136c3f998eacb776d52e1ce.tar.gz
samba-45eeed2893e569483136c3f998eacb776d52e1ce.tar.bz2
samba-45eeed2893e569483136c3f998eacb776d52e1ce.zip
s3: Convert WINBINDD_PAM_LOGOFF to the new async API
Diffstat (limited to 'source3/winbindd/winbindd_pam.c')
-rw-r--r--source3/winbindd/winbindd_pam.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 61c8c298f1..6aeeb2d143 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -2051,72 +2051,6 @@ process_result:
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
}
-void winbindd_pam_logoff(struct winbindd_cli_state *state)
-{
- struct winbindd_domain *domain;
- fstring name_domain, user;
- uid_t caller_uid = (uid_t)-1;
- uid_t request_uid = state->request->data.logoff.uid;
-
- /* Ensure null termination */
- state->request->data.logoff.user
- [sizeof(state->request->data.logoff.user)-1]='\0';
-
- state->request->data.logoff.krb5ccname
- [sizeof(state->request->data.logoff.krb5ccname)-1]='\0';
-
- DEBUG(3, ("[%5lu]: pam logoff %s\n", (unsigned long)state->pid,
- state->request->data.logoff.user));
-
- if (request_uid == (uid_t)-1) {
- goto failed;
- }
-
- if (!canonicalize_username(state->request->data.logoff.user, name_domain, user)) {
- goto failed;
- }
-
- if ((domain = find_auth_domain(state->request->flags,
- name_domain)) == NULL) {
- goto failed;
- }
-
- if ((sys_getpeereid(state->sock, &caller_uid)) != 0) {
- DEBUG(1,("winbindd_pam_logoff: failed to check peerid: %s\n",
- strerror(errno)));
- goto failed;
- }
-
- switch (caller_uid) {
- case -1:
- goto failed;
- case 0:
- /* root must be able to logoff any user - gd */
- state->request->data.logoff.uid = request_uid;
- break;
- default:
- if (caller_uid != request_uid) {
- DEBUG(1,("winbindd_pam_logoff: caller requested invalid uid\n"));
- goto failed;
- }
- state->request->data.logoff.uid = caller_uid;
- break;
- }
-
- sendto_domain(state, domain);
- return;
-
- failed:
- set_auth_errors(state->response, NT_STATUS_NO_SUCH_USER);
- DEBUG(5, ("Pam Logoff for %s returned %s "
- "(PAM: %d)\n",
- state->request->data.logoff.user,
- state->response->data.auth.nt_status_string,
- state->response->data.auth.pam_error));
- request_error(state);
- return;
-}
-
enum winbindd_result winbindd_dual_pam_logoff(struct winbindd_domain *domain,
struct winbindd_cli_state *state)
{