summaryrefslogtreecommitdiff
path: root/source3/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'source3/librpc')
-rw-r--r--source3/librpc/gen_ndr/libnetapi.h48
-rw-r--r--source3/librpc/gen_ndr/ndr_libnetapi.c91
-rw-r--r--source3/librpc/gen_ndr/ndr_libnetapi.h10
3 files changed, 148 insertions, 1 deletions
diff --git a/source3/librpc/gen_ndr/libnetapi.h b/source3/librpc/gen_ndr/libnetapi.h
index 17633daf6a..de165f889a 100644
--- a/source3/librpc/gen_ndr/libnetapi.h
+++ b/source3/librpc/gen_ndr/libnetapi.h
@@ -3,6 +3,9 @@
#include <stdint.h>
#define LIBNETAPI_LOCAL_SERVER(x) (!x || is_myname_or_ipaddr(x))
+#ifndef MAXSUBAUTHS
+#define MAXSUBAUTHS 15 /* max sub authorities in a SID */
+#endif
#ifndef _HEADER_libnetapi
#define _HEADER_libnetapi
@@ -18,6 +21,13 @@ enum NET_API_STATUS
#endif
;
+struct domsid {
+ uint8_t sid_rev_num;
+ uint8_t num_auths;
+ uint8_t id_auth[6];
+ uint32_t *sub_auths;
+};
+
struct SERVER_INFO_1005 {
const char * sv1005_comment;
};
@@ -74,6 +84,29 @@ struct NET_DISPLAY_GROUP {
uint32_t grpi3_next_index;
};
+struct GROUP_INFO_0 {
+ const char * grpi0_name;
+};
+
+struct GROUP_INFO_1 {
+ const char * grpi1_name;
+ const char * grpi1_comment;
+};
+
+struct GROUP_INFO_2 {
+ const char * grpi2_name;
+ const char * grpi2_comment;
+ uint32_t grpi2_group_id;
+ uint32_t grpi2_attributes;
+};
+
+struct GROUP_INFO_3 {
+ const char * grpi3_name;
+ const char * grpi3_comment;
+ struct domsid grpi3_group_sid;
+ uint32_t grpi3_attributes;
+};
+
struct NetJoinDomain {
struct {
@@ -277,4 +310,19 @@ struct NetQueryDisplayInformation {
};
+
+struct NetGroupAdd {
+ struct {
+ const char * server_name;
+ uint32_t level;
+ uint8_t *buf;/* [ref] */
+ } in;
+
+ struct {
+ uint32_t *parm_err;/* [ref] */
+ enum NET_API_STATUS result;
+ } out;
+
+};
+
#endif /* _HEADER_libnetapi */
diff --git a/source3/librpc/gen_ndr/ndr_libnetapi.c b/source3/librpc/gen_ndr/ndr_libnetapi.c
index 028753a391..d4db1f9609 100644
--- a/source3/librpc/gen_ndr/ndr_libnetapi.c
+++ b/source3/librpc/gen_ndr/ndr_libnetapi.c
@@ -27,6 +27,66 @@ _PUBLIC_ void ndr_print_NET_API_STATUS(struct ndr_print *ndr, const char *name,
ndr_print_enum(ndr, name, "ENUM", val, r);
}
+_PUBLIC_ enum ndr_err_code ndr_push_domsid(struct ndr_push *ndr, int ndr_flags, const struct domsid *r)
+{
+ uint32_t cntr_sub_auths_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->sid_rev_num));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->num_auths));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->id_auth, 6));
+ for (cntr_sub_auths_0 = 0; cntr_sub_auths_0 < MAXSUBAUTHS; cntr_sub_auths_0++) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sub_auths[cntr_sub_auths_0]));
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_domsid(struct ndr_pull *ndr, int ndr_flags, struct domsid *r)
+{
+ uint32_t cntr_sub_auths_0;
+ TALLOC_CTX *_mem_save_sub_auths_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sid_rev_num));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_auths));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->id_auth, 6));
+ NDR_PULL_ALLOC_N(ndr, r->sub_auths, MAXSUBAUTHS);
+ _mem_save_sub_auths_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->sub_auths, 0);
+ for (cntr_sub_auths_0 = 0; cntr_sub_auths_0 < MAXSUBAUTHS; cntr_sub_auths_0++) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sub_auths[cntr_sub_auths_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sub_auths_0, 0);
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_domsid(struct ndr_print *ndr, const char *name, const struct domsid *r)
+{
+ uint32_t cntr_sub_auths_0;
+ ndr_print_struct(ndr, name, "domsid");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "sid_rev_num", r->sid_rev_num);
+ ndr_print_uint8(ndr, "num_auths", r->num_auths);
+ ndr_print_array_uint8(ndr, "id_auth", r->id_auth, 6);
+ ndr->print(ndr, "%s: ARRAY(%d)", "sub_auths", MAXSUBAUTHS);
+ ndr->depth++;
+ for (cntr_sub_auths_0=0;cntr_sub_auths_0<MAXSUBAUTHS;cntr_sub_auths_0++) {
+ char *idx_0=NULL;
+ if (asprintf(&idx_0, "[%d]", cntr_sub_auths_0) != -1) {
+ ndr_print_uint32(ndr, "sub_auths", r->sub_auths[cntr_sub_auths_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
_PUBLIC_ enum ndr_err_code ndr_push_SERVER_INFO_1005(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1005 *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -879,3 +939,34 @@ _PUBLIC_ void ndr_print_NetQueryDisplayInformation(struct ndr_print *ndr, const
ndr->depth--;
}
+_PUBLIC_ void ndr_print_NetGroupAdd(struct ndr_print *ndr, const char *name, int flags, const struct NetGroupAdd *r)
+{
+ ndr_print_struct(ndr, name, "NetGroupAdd");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "NetGroupAdd");
+ ndr->depth++;
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_ptr(ndr, "buf", r->in.buf);
+ ndr->depth++;
+ ndr_print_uint8(ndr, "buf", *r->in.buf);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "NetGroupAdd");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "parm_err", r->out.parm_err);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "parm_err", *r->out.parm_err);
+ ndr->depth--;
+ ndr_print_NET_API_STATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
diff --git a/source3/librpc/gen_ndr/ndr_libnetapi.h b/source3/librpc/gen_ndr/ndr_libnetapi.h
index 70add82c11..683b165510 100644
--- a/source3/librpc/gen_ndr/ndr_libnetapi.h
+++ b/source3/librpc/gen_ndr/ndr_libnetapi.h
@@ -32,10 +32,15 @@
#define NDR_NETQUERYDISPLAYINFORMATION (0x0c)
-#define NDR_LIBNETAPI_CALL_COUNT (13)
+#define NDR_NETGROUPADD (0x0d)
+
+#define NDR_LIBNETAPI_CALL_COUNT (14)
enum ndr_err_code ndr_push_NET_API_STATUS(struct ndr_push *ndr, int ndr_flags, enum NET_API_STATUS r);
enum ndr_err_code ndr_pull_NET_API_STATUS(struct ndr_pull *ndr, int ndr_flags, enum NET_API_STATUS *r);
void ndr_print_NET_API_STATUS(struct ndr_print *ndr, const char *name, enum NET_API_STATUS r);
+enum ndr_err_code ndr_push_domsid(struct ndr_push *ndr, int ndr_flags, const struct domsid *r);
+enum ndr_err_code ndr_pull_domsid(struct ndr_pull *ndr, int ndr_flags, struct domsid *r);
+void ndr_print_domsid(struct ndr_print *ndr, const char *name, const struct domsid *r);
enum ndr_err_code ndr_push_SERVER_INFO_1005(struct ndr_push *ndr, int ndr_flags, const struct SERVER_INFO_1005 *r);
enum ndr_err_code ndr_pull_SERVER_INFO_1005(struct ndr_pull *ndr, int ndr_flags, struct SERVER_INFO_1005 *r);
void ndr_print_SERVER_INFO_1005(struct ndr_print *ndr, const char *name, const struct SERVER_INFO_1005 *r);
@@ -96,4 +101,7 @@ void ndr_print_NetUserEnum(struct ndr_print *ndr, const char *name, int flags, c
enum ndr_err_code ndr_push_NetQueryDisplayInformation(struct ndr_push *ndr, int flags, const struct NetQueryDisplayInformation *r);
enum ndr_err_code ndr_pull_NetQueryDisplayInformation(struct ndr_pull *ndr, int flags, struct NetQueryDisplayInformation *r);
void ndr_print_NetQueryDisplayInformation(struct ndr_print *ndr, const char *name, int flags, const struct NetQueryDisplayInformation *r);
+enum ndr_err_code ndr_push_NetGroupAdd(struct ndr_push *ndr, int flags, const struct NetGroupAdd *r);
+enum ndr_err_code ndr_pull_NetGroupAdd(struct ndr_pull *ndr, int flags, struct NetGroupAdd *r);
+void ndr_print_NetGroupAdd(struct ndr_print *ndr, const char *name, int flags, const struct NetGroupAdd *r);
#endif /* _HEADER_NDR_libnetapi */