summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr/srv_wkssvc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/librpc/gen_ndr/srv_wkssvc.c')
-rw-r--r--source3/librpc/gen_ndr/srv_wkssvc.c1635
1 files changed, 1635 insertions, 0 deletions
diff --git a/source3/librpc/gen_ndr/srv_wkssvc.c b/source3/librpc/gen_ndr/srv_wkssvc.c
new file mode 100644
index 0000000000..3d49480216
--- /dev/null
+++ b/source3/librpc/gen_ndr/srv_wkssvc.c
@@ -0,0 +1,1635 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * server auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/srv_wkssvc.h"
+
+static BOOL api_wkssvc_NetWkstaGetInfo(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct wkssvc_NetWkstaGetInfo r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetWkstaGetInfo");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_wkssvc_NetWkstaGetInfo(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _wkssvc_NetWkstaGetInfo(p, r.in.server_name, r.in.level, r.out.info);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_wkssvc_NetWkstaGetInfo(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_wkssvc_NetWkstaSetInfo(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct wkssvc_NetWkstaSetInfo r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetWkstaSetInfo");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_wkssvc_NetWkstaSetInfo(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.parm_error = r.in.parm_error;
+ r.out.result = _wkssvc_NetWkstaSetInfo(p, r.in.server_name, r.in.level, r.in.info, r.in.parm_error);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_wkssvc_NetWkstaSetInfo(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_wkssvc_NetWkstaEnumUsers(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct wkssvc_NetWkstaEnumUsers r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetWkstaEnumUsers");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_wkssvc_NetWkstaEnumUsers(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.users = r.in.users;
+ r.out.entriesread = talloc_size(mem_ctx, sizeof(*r.out.entriesread));
+ if (r.out.entriesread == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.totalentries = talloc_size(mem_ctx, sizeof(*r.out.totalentries));
+ if (r.out.totalentries == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.resumehandle = r.in.resumehandle;
+ r.out.result = _wkssvc_NetWkstaEnumUsers(p, r.in.server_name, r.in.level, r.in.users, r.in.prefmaxlen, r.out.entriesread, r.out.totalentries, r.in.resumehandle);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_wkssvc_NetWkstaEnumUsers(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRWKSTAUSERGETINFO(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRWKSTAUSERGETINFO r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRWKSTAUSERGETINFO");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRWKSTAUSERGETINFO(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRWKSTAUSERGETINFO(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRWKSTAUSERGETINFO(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRWKSTAUSERSETINFO(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRWKSTAUSERSETINFO r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRWKSTAUSERSETINFO");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRWKSTAUSERSETINFO(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRWKSTAUSERSETINFO(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRWKSTAUSERSETINFO(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_wkssvc_NetWkstaTransportEnum(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct wkssvc_NetWkstaTransportEnum r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetWkstaTransportEnum");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_wkssvc_NetWkstaTransportEnum(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.level = r.in.level;
+ r.out.ctr = r.in.ctr;
+ r.out.totalentries = talloc_size(mem_ctx, sizeof(*r.out.totalentries));
+ if (r.out.totalentries == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.resume_handle = r.in.resume_handle;
+ r.out.result = _wkssvc_NetWkstaTransportEnum(p, r.in.server_name, r.in.level, r.in.ctr, r.in.max_buffer, r.out.totalentries, r.in.resume_handle);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_wkssvc_NetWkstaTransportEnum(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRWKSTATRANSPORTADD(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRWKSTATRANSPORTADD r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRWKSTATRANSPORTADD");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRWKSTATRANSPORTADD(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRWKSTATRANSPORTADD(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRWKSTATRANSPORTADD(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRWKSTATRANSPORTDEL(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRWKSTATRANSPORTDEL r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRWKSTATRANSPORTDEL");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRWKSTATRANSPORTDEL(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRWKSTATRANSPORTDEL(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRWKSTATRANSPORTDEL(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRUSEADD(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRUSEADD r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRUSEADD");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRUSEADD(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRUSEADD(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRUSEADD(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRUSEGETINFO(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRUSEGETINFO r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRUSEGETINFO");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRUSEGETINFO(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRUSEGETINFO(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRUSEGETINFO(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRUSEDEL(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRUSEDEL r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRUSEDEL");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRUSEDEL(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRUSEDEL(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRUSEDEL(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRUSEENUM(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRUSEENUM r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRUSEENUM");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRUSEENUM(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRUSEENUM(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRUSEENUM(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRMESSAGEBUFFERSEND(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRMESSAGEBUFFERSEND r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRMESSAGEBUFFERSEND");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRMESSAGEBUFFERSEND(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRMESSAGEBUFFERSEND(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRMESSAGEBUFFERSEND(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRWORKSTATIONSTATISTICSGET(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRWORKSTATIONSTATISTICSGET r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRWORKSTATIONSTATISTICSGET");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRWORKSTATIONSTATISTICSGET(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRWORKSTATIONSTATISTICSGET(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRWORKSTATIONSTATISTICSGET(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRLOGONDOMAINNAMEADD(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRLOGONDOMAINNAMEADD r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRLOGONDOMAINNAMEADD");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEADD(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRLOGONDOMAINNAMEADD(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRLOGONDOMAINNAMEADD(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRLOGONDOMAINNAMEDEL(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRLOGONDOMAINNAMEDEL r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRLOGONDOMAINNAMEDEL");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEDEL(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRLOGONDOMAINNAMEDEL(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRLOGONDOMAINNAMEDEL(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRJOINDOMAIN(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRJOINDOMAIN r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRJOINDOMAIN");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRJOINDOMAIN(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRJOINDOMAIN(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRJOINDOMAIN(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRUNJOINDOMAIN(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRUNJOINDOMAIN r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRUNJOINDOMAIN");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRUNJOINDOMAIN(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRUNJOINDOMAIN(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRUNJOINDOMAIN(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRRENAMEMACHINEINDOMAIN(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRRENAMEMACHINEINDOMAIN r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRRENAMEMACHINEINDOMAIN");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRRENAMEMACHINEINDOMAIN(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRRENAMEMACHINEINDOMAIN(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRRENAMEMACHINEINDOMAIN(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRVALIDATENAME(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRVALIDATENAME r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRVALIDATENAME");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRVALIDATENAME(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRVALIDATENAME(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRVALIDATENAME(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRGETJOININFORMATION(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRGETJOININFORMATION r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRGETJOININFORMATION");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRGETJOININFORMATION(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRGETJOININFORMATION(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRGETJOININFORMATION(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRGETJOINABLEOUS(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRGETJOINABLEOUS r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRGETJOINABLEOUS");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRGETJOINABLEOUS(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRGETJOINABLEOUS(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRGETJOINABLEOUS(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_wkssvc_NetrJoinDomain2(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct wkssvc_NetrJoinDomain2 r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetrJoinDomain2");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_wkssvc_NetrJoinDomain2(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _wkssvc_NetrJoinDomain2(p, r.in.server_name, r.in.domain_name, r.in.account_name, r.in.admin_account, r.in.encrypted_password, r.in.join_flags);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_wkssvc_NetrJoinDomain2(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_wkssvc_NetrUnjoinDomain2(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct wkssvc_NetrUnjoinDomain2 r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetrUnjoinDomain2");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_wkssvc_NetrUnjoinDomain2(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _wkssvc_NetrUnjoinDomain2(p, r.in.server_name, r.in.account, r.in.encrypted_password, r.in.unjoin_flags);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_wkssvc_NetrUnjoinDomain2(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_wkssvc_NetrRenameMachineInDomain2(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct wkssvc_NetrRenameMachineInDomain2 r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetrRenameMachineInDomain2");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_wkssvc_NetrRenameMachineInDomain2(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _wkssvc_NetrRenameMachineInDomain2(p, r.in.server_name, r.in.NewMachineName, r.in.Account, r.in.EncryptedPassword, r.in.RenameOptions);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_wkssvc_NetrRenameMachineInDomain2(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRVALIDATENAME2(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRVALIDATENAME2 r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRVALIDATENAME2");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRVALIDATENAME2(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRVALIDATENAME2(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRVALIDATENAME2(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRGETJOINABLEOUS2(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRGETJOINABLEOUS2 r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRGETJOINABLEOUS2");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRGETJOINABLEOUS2(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRGETJOINABLEOUS2(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRGETJOINABLEOUS2(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_wkssvc_NetrAddAlternateComputerName(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct wkssvc_NetrAddAlternateComputerName r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetrAddAlternateComputerName");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_wkssvc_NetrAddAlternateComputerName(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _wkssvc_NetrAddAlternateComputerName(p, r.in.server_name, r.in.NewAlternateMachineName, r.in.Account, r.in.EncryptedPassword, r.in.Reserved);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_wkssvc_NetrAddAlternateComputerName(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_wkssvc_NetrRemoveAlternateComputerName(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct wkssvc_NetrRemoveAlternateComputerName r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_wkssvc_NetrRemoveAlternateComputerName");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_wkssvc_NetrRemoveAlternateComputerName(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _wkssvc_NetrRemoveAlternateComputerName(p, r.in.server_name, r.in.AlternateMachineNameToRemove, r.in.Account, r.in.EncryptedPassword, r.in.Reserved);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_wkssvc_NetrRemoveAlternateComputerName(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRSETPRIMARYCOMPUTERNAME(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_WKSSVC_NETRENUMERATECOMPUTERNAMES(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct WKSSVC_NETRENUMERATECOMPUTERNAMES r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_WKSSVC_NETRENUMERATECOMPUTERNAMES");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_WKSSVC_NETRENUMERATECOMPUTERNAMES(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _WKSSVC_NETRENUMERATECOMPUTERNAMES(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_WKSSVC_NETRENUMERATECOMPUTERNAMES(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+
+/* Tables */
+static struct api_struct api_wkssvc_cmds[] =
+{
+ {"WKSSVC_NETWKSTAGETINFO", DCERPC_WKSSVC_NETWKSTAGETINFO, api_wkssvc_NetWkstaGetInfo},
+ {"WKSSVC_NETWKSTASETINFO", DCERPC_WKSSVC_NETWKSTASETINFO, api_wkssvc_NetWkstaSetInfo},
+ {"WKSSVC_NETWKSTAENUMUSERS", DCERPC_WKSSVC_NETWKSTAENUMUSERS, api_wkssvc_NetWkstaEnumUsers},
+ {"WKSSVC_NETRWKSTAUSERGETINFO", DCERPC_WKSSVC_NETRWKSTAUSERGETINFO, api_WKSSVC_NETRWKSTAUSERGETINFO},
+ {"WKSSVC_NETRWKSTAUSERSETINFO", DCERPC_WKSSVC_NETRWKSTAUSERSETINFO, api_WKSSVC_NETRWKSTAUSERSETINFO},
+ {"WKSSVC_NETWKSTATRANSPORTENUM", DCERPC_WKSSVC_NETWKSTATRANSPORTENUM, api_wkssvc_NetWkstaTransportEnum},
+ {"WKSSVC_NETRWKSTATRANSPORTADD", DCERPC_WKSSVC_NETRWKSTATRANSPORTADD, api_WKSSVC_NETRWKSTATRANSPORTADD},
+ {"WKSSVC_NETRWKSTATRANSPORTDEL", DCERPC_WKSSVC_NETRWKSTATRANSPORTDEL, api_WKSSVC_NETRWKSTATRANSPORTDEL},
+ {"WKSSVC_NETRUSEADD", DCERPC_WKSSVC_NETRUSEADD, api_WKSSVC_NETRUSEADD},
+ {"WKSSVC_NETRUSEGETINFO", DCERPC_WKSSVC_NETRUSEGETINFO, api_WKSSVC_NETRUSEGETINFO},
+ {"WKSSVC_NETRUSEDEL", DCERPC_WKSSVC_NETRUSEDEL, api_WKSSVC_NETRUSEDEL},
+ {"WKSSVC_NETRUSEENUM", DCERPC_WKSSVC_NETRUSEENUM, api_WKSSVC_NETRUSEENUM},
+ {"WKSSVC_NETRMESSAGEBUFFERSEND", DCERPC_WKSSVC_NETRMESSAGEBUFFERSEND, api_WKSSVC_NETRMESSAGEBUFFERSEND},
+ {"WKSSVC_NETRWORKSTATIONSTATISTICSGET", DCERPC_WKSSVC_NETRWORKSTATIONSTATISTICSGET, api_WKSSVC_NETRWORKSTATIONSTATISTICSGET},
+ {"WKSSVC_NETRLOGONDOMAINNAMEADD", DCERPC_WKSSVC_NETRLOGONDOMAINNAMEADD, api_WKSSVC_NETRLOGONDOMAINNAMEADD},
+ {"WKSSVC_NETRLOGONDOMAINNAMEDEL", DCERPC_WKSSVC_NETRLOGONDOMAINNAMEDEL, api_WKSSVC_NETRLOGONDOMAINNAMEDEL},
+ {"WKSSVC_NETRJOINDOMAIN", DCERPC_WKSSVC_NETRJOINDOMAIN, api_WKSSVC_NETRJOINDOMAIN},
+ {"WKSSVC_NETRUNJOINDOMAIN", DCERPC_WKSSVC_NETRUNJOINDOMAIN, api_WKSSVC_NETRUNJOINDOMAIN},
+ {"WKSSVC_NETRRENAMEMACHINEINDOMAIN", DCERPC_WKSSVC_NETRRENAMEMACHINEINDOMAIN, api_WKSSVC_NETRRENAMEMACHINEINDOMAIN},
+ {"WKSSVC_NETRVALIDATENAME", DCERPC_WKSSVC_NETRVALIDATENAME, api_WKSSVC_NETRVALIDATENAME},
+ {"WKSSVC_NETRGETJOININFORMATION", DCERPC_WKSSVC_NETRGETJOININFORMATION, api_WKSSVC_NETRGETJOININFORMATION},
+ {"WKSSVC_NETRGETJOINABLEOUS", DCERPC_WKSSVC_NETRGETJOINABLEOUS, api_WKSSVC_NETRGETJOINABLEOUS},
+ {"WKSSVC_NETRJOINDOMAIN2", DCERPC_WKSSVC_NETRJOINDOMAIN2, api_wkssvc_NetrJoinDomain2},
+ {"WKSSVC_NETRUNJOINDOMAIN2", DCERPC_WKSSVC_NETRUNJOINDOMAIN2, api_wkssvc_NetrUnjoinDomain2},
+ {"WKSSVC_NETRRENAMEMACHINEINDOMAIN2", DCERPC_WKSSVC_NETRRENAMEMACHINEINDOMAIN2, api_wkssvc_NetrRenameMachineInDomain2},
+ {"WKSSVC_NETRVALIDATENAME2", DCERPC_WKSSVC_NETRVALIDATENAME2, api_WKSSVC_NETRVALIDATENAME2},
+ {"WKSSVC_NETRGETJOINABLEOUS2", DCERPC_WKSSVC_NETRGETJOINABLEOUS2, api_WKSSVC_NETRGETJOINABLEOUS2},
+ {"WKSSVC_NETRADDALTERNATECOMPUTERNAME", DCERPC_WKSSVC_NETRADDALTERNATECOMPUTERNAME, api_wkssvc_NetrAddAlternateComputerName},
+ {"WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME", DCERPC_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME, api_wkssvc_NetrRemoveAlternateComputerName},
+ {"WKSSVC_NETRSETPRIMARYCOMPUTERNAME", DCERPC_WKSSVC_NETRSETPRIMARYCOMPUTERNAME, api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME},
+ {"WKSSVC_NETRENUMERATECOMPUTERNAMES", DCERPC_WKSSVC_NETRENUMERATECOMPUTERNAMES, api_WKSSVC_NETRENUMERATECOMPUTERNAMES},
+};
+
+void wkssvc_get_pipe_fns(struct api_struct **fns, int *n_fns)
+{
+ *fns = api_wkssvc_cmds;
+ *n_fns = sizeof(api_wkssvc_cmds) / sizeof(struct api_struct);
+}
+
+NTSTATUS rpc_wkssvc_init(void)
+{
+ return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "wkssvc", "wkssvc", api_wkssvc_cmds, sizeof(api_wkssvc_cmds) / sizeof(struct api_struct));
+}