s4:winbind: stub implementation of WINBINDD_PAM_LOGOFF
authorMatthieu Patou <mat@matws.net>
Wed, 3 Mar 2010 20:29:15 +0000 (23:29 +0300)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Tue, 9 Mar 2010 16:20:31 +0000 (17:20 +0100)
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
source4/winbind/wb_samba3_cmd.c
source4/winbind/wb_samba3_protocol.c

index 2161c2f58533f6a73bccda3268cb2e6be2811f75..95ef7d14b9f28f89be068c77117c8603fb948271 100644 (file)
@@ -591,6 +591,32 @@ static void lookupsid_recv_name(struct composite_context *ctx)
        wbsrv_samba3_async_epilogue(status, s3call);
 }
 
+/*
+  This is a stub function in order to limit error message in the pam_winbind module
+*/
+NTSTATUS wbsrv_samba3_pam_logoff(struct wbsrv_samba3_call *s3call)
+{
+       NTSTATUS status;
+       struct winbindd_response *resp = &s3call->response;
+
+       status = NT_STATUS_OK;
+
+       DEBUG(5, ("wbsrv_samba3_pam_logoff called\n"));
+       DEBUG(10, ("Winbind logoff not implemented\n"));
+       resp->result = WINBINDD_OK;
+
+       WBSRV_SAMBA3_SET_STRING(resp->data.auth.nt_status_string,
+                               nt_errstr(status));
+       WBSRV_SAMBA3_SET_STRING(resp->data.auth.error_string,
+                               get_friendly_nt_error_msg(status));
+
+       resp->data.auth.pam_error = nt_status_to_pam(status);
+       resp->data.auth.nt_status = NT_STATUS_V(status);
+       DEBUG(5, ("wbsrv_samba3_pam_logoff called\n"));
+
+       return NT_STATUS_OK;
+}
+
 /*
   Challenge-response authentication.  This interface is used by
   ntlm_auth and the smbd auth subsystem to pass NTLM authentication
index ae933054cf4636f34d5a1a7d657f3b458ae82aa4..88eecdb4ff24a574c6f18554d405a107edf06364 100644 (file)
@@ -169,11 +169,12 @@ NTSTATUS wbsrv_samba3_handle_call(struct wbsrv_samba3_call *s3call)
        case WINBINDD_DOMAIN_INFO:
                return wbsrv_samba3_domain_info(s3call);
 
-       /* Unimplemented commands */
+       case WINBINDD_PAM_LOGOFF:
+               return wbsrv_samba3_pam_logoff(s3call);
 
+       /* Unimplemented commands */
        case WINBINDD_GETPWSID:
        case WINBINDD_PAM_CHAUTHTOK:
-       case WINBINDD_PAM_LOGOFF:
        case WINBINDD_PAM_CHNG_PSWD_AUTH_CRAP:
        case WINBINDD_LOOKUPRIDS:
        case WINBINDD_SIDS_TO_XIDS: