Example #1
0
NTSTATUS wbsrv_samba3_process(void *private_data, DATA_BLOB blob)
{
	NTSTATUS status;
	struct wbsrv_connection *wbconn = talloc_get_type(private_data,
							  struct wbsrv_connection);
	struct wbsrv_samba3_call *call;
	status = wbsrv_samba3_pull_request(blob, wbconn, &call);
	
	if (!NT_STATUS_IS_OK(status)) {
		return status;
	}
	
	status = wbsrv_samba3_handle_call(call);

	if (!NT_STATUS_IS_OK(status)) {
		talloc_free(call);
		return status;
	}

	if (call->flags & WBSRV_CALL_FLAGS_REPLY_ASYNC) {
		return NT_STATUS_OK;
	}

	status = wbsrv_samba3_send_reply(call);
	return status;
}
Example #2
0
static void wbsrv_samba3_async_epilogue(NTSTATUS status,
					struct wbsrv_samba3_call *s3call)
{
	struct winbindd_response *resp = &s3call->response;
	if (NT_STATUS_IS_OK(status)) {
		resp->result = WINBINDD_OK;
	} else {
		resp->result = WINBINDD_ERROR;
	}

	wbsrv_samba3_send_reply(s3call);
}
Example #3
0
static void wbsrv_samba3_async_auth_epilogue(NTSTATUS status,
					     struct wbsrv_samba3_call *s3call)
{
	struct winbindd_response *resp = &s3call->response;
	if (!NT_STATUS_IS_OK(status)) {
		resp->result = WINBINDD_ERROR;
	} else {
		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);

	wbsrv_samba3_send_reply(s3call);
}
Example #4
0
NTSTATUS wbsrv_samba3_process(struct wbsrv_samba3_call *call)
{
	NTSTATUS status;

	status = wbsrv_samba3_pull_request(call);
	
	if (!NT_STATUS_IS_OK(status)) {
		return status;
	}

	status = wbsrv_samba3_handle_call(call);

	if (!NT_STATUS_IS_OK(status)) {
		talloc_free(call);
		return status;
	}

	if (call->flags & WBSRV_CALL_FLAGS_REPLY_ASYNC) {
		return NT_STATUS_OK;
	}

	status = wbsrv_samba3_send_reply(call);
	return status;
}