summaryrefslogtreecommitdiff
path: root/source4/winbind/wb_samba3_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/winbind/wb_samba3_cmd.c')
-rw-r--r--source4/winbind/wb_samba3_cmd.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/source4/winbind/wb_samba3_cmd.c b/source4/winbind/wb_samba3_cmd.c
index 530c95daa3..dfedfec190 100644
--- a/source4/winbind/wb_samba3_cmd.c
+++ b/source4/winbind/wb_samba3_cmd.c
@@ -901,13 +901,44 @@ NTSTATUS wbsrv_samba3_endpwent(struct wbsrv_samba3_call *s3call)
return NT_STATUS_OK;
}
+
+static void getgrnam_recv(struct composite_context *ctx);
+
NTSTATUS wbsrv_samba3_getgrnam(struct wbsrv_samba3_call *s3call)
{
+ struct composite_context *ctx;
+ struct wbsrv_service *service =
+ s3call->wbconn->listen_socket->service;
+
DEBUG(5, ("wbsrv_samba3_getgrnam called\n"));
- s3call->response.result = WINBINDD_ERROR;
+
+ ctx = wb_cmd_getgrnam_send(s3call, service,
+ s3call->request.data.groupname);
+ NT_STATUS_HAVE_NO_MEMORY(ctx);
+
+ ctx->async.fn = getgrnam_recv;
+ ctx->async.private_data = s3call;
+ s3call->flags |= WBSRV_CALL_FLAGS_REPLY_ASYNC;
return NT_STATUS_OK;
}
+static void getgrnam_recv(struct composite_context *ctx)
+{
+ struct wbsrv_samba3_call *s3call =
+ talloc_get_type(ctx->async.private_data,
+ struct wbsrv_samba3_call);
+ NTSTATUS status;
+ struct winbindd_gr *gr;
+
+ DEBUG(5, ("getgrnam_recv called\n"));
+
+ status = wb_cmd_getgrnam_recv(ctx, s3call, &gr);
+ if(NT_STATUS_IS_OK(status))
+ s3call->response.data.gr = *gr;
+
+ wbsrv_samba3_async_epilogue(status, s3call);
+}
+
NTSTATUS wbsrv_samba3_getgrgid(struct wbsrv_samba3_call *s3call)
{
DEBUG(5, ("wbsrv_samba3_getgrgid called\n"));