summaryrefslogtreecommitdiff
path: root/source4/winbind/wb_samba3_protocol.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-10-19 13:45:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:44:57 -0500
commit0f51ae83f09fa90362cae12a37ca4debc35f8491 (patch)
treeb4eef9f6b5647e53f430b46ae5bf90e3ace1e48d /source4/winbind/wb_samba3_protocol.c
parentba97ac6b96cbd5a3b40acd2d62f7483d1872d124 (diff)
downloadsamba-0f51ae83f09fa90362cae12a37ca4debc35f8491.tar.gz
samba-0f51ae83f09fa90362cae12a37ca4debc35f8491.tar.bz2
samba-0f51ae83f09fa90362cae12a37ca4debc35f8491.zip
r11181: Implement wbinfo -s and wbinfo --user-sids. The patch is so large because
--user-sids required the extension to trusted domains. Implement "winbind sealed pipes" parameter for debugging purposes. Volker (This used to be commit 3821a17bdb68b2f1389b5a150502c057d28569d2)
Diffstat (limited to 'source4/winbind/wb_samba3_protocol.c')
-rw-r--r--source4/winbind/wb_samba3_protocol.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source4/winbind/wb_samba3_protocol.c b/source4/winbind/wb_samba3_protocol.c
index 2c99aa63c9..fa2225a5c3 100644
--- a/source4/winbind/wb_samba3_protocol.c
+++ b/source4/winbind/wb_samba3_protocol.c
@@ -69,6 +69,8 @@ NTSTATUS wbsrv_samba3_handle_call(struct wbsrv_call *call)
DEBUG(10, ("Got winbind samba3 request %d\n", s3call->request.cmd));
+ s3call->response.length = sizeof(s3call->response);
+
switch(s3call->request.cmd) {
case WINBINDD_INTERFACE_VERSION:
return wbsrv_samba3_interface_version(s3call);
@@ -94,6 +96,9 @@ NTSTATUS wbsrv_samba3_handle_call(struct wbsrv_call *call)
case WINBINDD_LOOKUPNAME:
return wbsrv_samba3_lookupname(s3call);
+ case WINBINDD_LOOKUPSID:
+ return wbsrv_samba3_lookupsid(s3call);
+
case WINBINDD_PAM_AUTH:
return wbsrv_samba3_pam_auth(s3call);
@@ -105,6 +110,9 @@ NTSTATUS wbsrv_samba3_handle_call(struct wbsrv_call *call)
case WINBINDD_GETUSERDOMGROUPS:
return wbsrv_samba3_userdomgroups(s3call);
+
+ case WINBINDD_GETUSERSIDS:
+ return wbsrv_samba3_usersids(s3call);
}
s3call->response.result = WINBINDD_ERROR;
@@ -121,17 +129,17 @@ NTSTATUS wbsrv_samba3_push_reply(struct wbsrv_call *call, TALLOC_CTX *mem_ctx, D
extra_data = s3call->response.extra_data;
if (extra_data) {
- extra_data_len = strlen((char *)s3call->response.extra_data) + 1;
+ extra_data_len = s3call->response.length -
+ sizeof(s3call->response);
}
- blob = data_blob_talloc(mem_ctx, NULL, sizeof(s3call->response) + extra_data_len);
+ blob = data_blob_talloc(mem_ctx, NULL, s3call->response.length);
NT_STATUS_HAVE_NO_MEMORY(blob.data);
/* don't push real pointer values into sockets */
if (extra_data) {
s3call->response.extra_data = (void *)0xFFFFFFFF;
}
- s3call->response.length = sizeof(s3call->response) + extra_data_len;
memcpy(blob.data, &s3call->response, sizeof(s3call->response));
/* set back the pointer */
s3call->response.extra_data = extra_data;