wb-ndr: rerun 'make idl'
authorStefan Metzmacher <metze@sernet.de>
Mon, 10 Dec 2007 17:59:12 +0000 (18:59 +0100)
committerStefan Metzmacher <metze@sernet.de>
Fri, 2 May 2008 14:12:34 +0000 (16:12 +0200)
metze

source/librpc/gen_ndr/ndr_winbind_protocol.c
source/librpc/gen_ndr/ndr_winbind_protocol.h
source/librpc/gen_ndr/winbind_protocol.h

index 6ec5430eb894f6c70b3f7275d1ee806ee9f9fd90..ae01a25cc291439679ea7f8c2f685dc8de6d3660 100644 (file)
@@ -123,6 +123,369 @@ _PUBLIC_ void ndr_print_STRUCT_winbind_header(struct ndr_print *ndr, const char
        ndr->depth--;
 }
 
+static enum ndr_err_code ndr_push_winbind_get_idmap_level(struct ndr_push *ndr, int ndr_flags, enum winbind_get_idmap_level r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_winbind_get_idmap_level(struct ndr_pull *ndr, int ndr_flags, enum winbind_get_idmap_level *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_winbind_get_idmap_level(struct ndr_print *ndr, const char *name, enum winbind_get_idmap_level r)
+{
+       const char *val = NULL;
+
+       switch (r) {
+               case WINBIND_IDMAP_LEVEL_SID_TO_UID: val = "WINBIND_IDMAP_LEVEL_SID_TO_UID"; break;
+               case WINBIND_IDMAP_LEVEL_SID_TO_GID: val = "WINBIND_IDMAP_LEVEL_SID_TO_GID"; break;
+               case WINBIND_IDMAP_LEVEL_UID_TO_SID: val = "WINBIND_IDMAP_LEVEL_UID_TO_SID"; break;
+               case WINBIND_IDMAP_LEVEL_GID_TO_SID: val = "WINBIND_IDMAP_LEVEL_GID_TO_SID"; break;
+       }
+       ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static enum ndr_err_code ndr_push_winbind_get_idmap_req(struct ndr_push *ndr, int ndr_flags, const union winbind_get_idmap_req *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               NDR_CHECK(ndr_push_winbind_get_idmap_level(ndr, NDR_SCALARS, level));
+               switch (level) {
+                       case WINBIND_IDMAP_LEVEL_SID_TO_UID:
+                               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_SID_TO_GID:
+                               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_UID_TO_SID:
+                               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->uid));
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_GID_TO_SID:
+                               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->gid));
+                       break;
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               switch (level) {
+                       case WINBIND_IDMAP_LEVEL_SID_TO_UID:
+                               if (r->sid) {
+                                       NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+                               }
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_SID_TO_GID:
+                               if (r->sid) {
+                                       NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+                               }
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_UID_TO_SID:
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_GID_TO_SID:
+                       break;
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_winbind_get_idmap_req(struct ndr_pull *ndr, int ndr_flags, union winbind_get_idmap_req *r)
+{
+       int level;
+       uint32_t _level;
+       TALLOC_CTX *_mem_save_sid_0;
+       level = ndr_pull_get_switch_value(ndr, r);
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+               if (_level != level) {
+                       return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
+               }
+               switch (level) {
+                       case WINBIND_IDMAP_LEVEL_SID_TO_UID: {
+                               uint32_t _ptr_sid;
+                               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+                               if (_ptr_sid) {
+                                       NDR_PULL_ALLOC(ndr, r->sid);
+                               } else {
+                                       r->sid = NULL;
+                               }
+                       break; }
+
+                       case WINBIND_IDMAP_LEVEL_SID_TO_GID: {
+                               uint32_t _ptr_sid;
+                               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+                               if (_ptr_sid) {
+                                       NDR_PULL_ALLOC(ndr, r->sid);
+                               } else {
+                                       r->sid = NULL;
+                               }
+                       break; }
+
+                       case WINBIND_IDMAP_LEVEL_UID_TO_SID: {
+                               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->uid));
+                       break; }
+
+                       case WINBIND_IDMAP_LEVEL_GID_TO_SID: {
+                               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->gid));
+                       break; }
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               switch (level) {
+                       case WINBIND_IDMAP_LEVEL_SID_TO_UID:
+                               if (r->sid) {
+                                       _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                                       NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
+                                       NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+                                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
+                               }
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_SID_TO_GID:
+                               if (r->sid) {
+                                       _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                                       NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
+                                       NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+                                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
+                               }
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_UID_TO_SID:
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_GID_TO_SID:
+                       break;
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_winbind_get_idmap_req(struct ndr_print *ndr, const char *name, const union winbind_get_idmap_req *r)
+{
+       int level;
+       level = ndr_print_get_switch_value(ndr, r);
+       ndr_print_union(ndr, name, level, "winbind_get_idmap_req");
+       switch (level) {
+               case WINBIND_IDMAP_LEVEL_SID_TO_UID:
+                       ndr_print_ptr(ndr, "sid", r->sid);
+                       ndr->depth++;
+                       if (r->sid) {
+                               ndr_print_dom_sid(ndr, "sid", r->sid);
+                       }
+                       ndr->depth--;
+               break;
+
+               case WINBIND_IDMAP_LEVEL_SID_TO_GID:
+                       ndr_print_ptr(ndr, "sid", r->sid);
+                       ndr->depth++;
+                       if (r->sid) {
+                               ndr_print_dom_sid(ndr, "sid", r->sid);
+                       }
+                       ndr->depth--;
+               break;
+
+               case WINBIND_IDMAP_LEVEL_UID_TO_SID:
+                       ndr_print_hyper(ndr, "uid", r->uid);
+               break;
+
+               case WINBIND_IDMAP_LEVEL_GID_TO_SID:
+                       ndr_print_hyper(ndr, "gid", r->gid);
+               break;
+
+               default:
+                       ndr_print_bad_level(ndr, name, level);
+       }
+}
+
+static enum ndr_err_code ndr_push_winbind_get_idmap_rep(struct ndr_push *ndr, int ndr_flags, const union winbind_get_idmap_rep *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               NDR_CHECK(ndr_push_winbind_get_idmap_level(ndr, NDR_SCALARS, level));
+               switch (level) {
+                       case WINBIND_IDMAP_LEVEL_SID_TO_UID:
+                               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->uid));
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_SID_TO_GID:
+                               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->gid));
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_UID_TO_SID:
+                               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_GID_TO_SID:
+                               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+                       break;
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               switch (level) {
+                       case WINBIND_IDMAP_LEVEL_SID_TO_UID:
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_SID_TO_GID:
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_UID_TO_SID:
+                               if (r->sid) {
+                                       NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+                               }
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_GID_TO_SID:
+                               if (r->sid) {
+                                       NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+                               }
+                       break;
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_winbind_get_idmap_rep(struct ndr_pull *ndr, int ndr_flags, union winbind_get_idmap_rep *r)
+{
+       int level;
+       uint32_t _level;
+       TALLOC_CTX *_mem_save_sid_0;
+       level = ndr_pull_get_switch_value(ndr, r);
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+               if (_level != level) {
+                       return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
+               }
+               switch (level) {
+                       case WINBIND_IDMAP_LEVEL_SID_TO_UID: {
+                               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->uid));
+                       break; }
+
+                       case WINBIND_IDMAP_LEVEL_SID_TO_GID: {
+                               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->gid));
+                       break; }
+
+                       case WINBIND_IDMAP_LEVEL_UID_TO_SID: {
+                               uint32_t _ptr_sid;
+                               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+                               if (_ptr_sid) {
+                                       NDR_PULL_ALLOC(ndr, r->sid);
+                               } else {
+                                       r->sid = NULL;
+                               }
+                       break; }
+
+                       case WINBIND_IDMAP_LEVEL_GID_TO_SID: {
+                               uint32_t _ptr_sid;
+                               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+                               if (_ptr_sid) {
+                                       NDR_PULL_ALLOC(ndr, r->sid);
+                               } else {
+                                       r->sid = NULL;
+                               }
+                       break; }
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               switch (level) {
+                       case WINBIND_IDMAP_LEVEL_SID_TO_UID:
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_SID_TO_GID:
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_UID_TO_SID:
+                               if (r->sid) {
+                                       _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                                       NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
+                                       NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+                                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
+                               }
+                       break;
+
+                       case WINBIND_IDMAP_LEVEL_GID_TO_SID:
+                               if (r->sid) {
+                                       _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                                       NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
+                                       NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+                                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
+                               }
+                       break;
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_winbind_get_idmap_rep(struct ndr_print *ndr, const char *name, const union winbind_get_idmap_rep *r)
+{
+       int level;
+       level = ndr_print_get_switch_value(ndr, r);
+       ndr_print_union(ndr, name, level, "winbind_get_idmap_rep");
+       switch (level) {
+               case WINBIND_IDMAP_LEVEL_SID_TO_UID:
+                       ndr_print_hyper(ndr, "uid", r->uid);
+               break;
+
+               case WINBIND_IDMAP_LEVEL_SID_TO_GID:
+                       ndr_print_hyper(ndr, "gid", r->gid);
+               break;
+
+               case WINBIND_IDMAP_LEVEL_UID_TO_SID:
+                       ndr_print_ptr(ndr, "sid", r->sid);
+                       ndr->depth++;
+                       if (r->sid) {
+                               ndr_print_dom_sid(ndr, "sid", r->sid);
+                       }
+                       ndr->depth--;
+               break;
+
+               case WINBIND_IDMAP_LEVEL_GID_TO_SID:
+                       ndr_print_ptr(ndr, "sid", r->sid);
+                       ndr->depth++;
+                       if (r->sid) {
+                               ndr_print_dom_sid(ndr, "sid", r->sid);
+                       }
+                       ndr->depth--;
+               break;
+
+               default:
+                       ndr_print_bad_level(ndr, name, level);
+       }
+}
+
 static enum ndr_err_code ndr_push_STRUCT_winbind_domain_info_compat(struct ndr_push *ndr, int ndr_flags, const struct winbind_domain_info_compat *r)
 {
        if (ndr_flags & NDR_SCALARS) {
@@ -1304,141 +1667,18 @@ static enum ndr_err_code ndr_pull_winbind_pam_chng_paswd_auth_crap(struct ndr_pu
 
 _PUBLIC_ void ndr_print_winbind_pam_chng_paswd_auth_crap(struct ndr_print *ndr, const char *name, int flags, const struct winbind_pam_chng_paswd_auth_crap *r)
 {
-       ndr_print_struct(ndr, name, "winbind_pam_chng_paswd_auth_crap");
-       ndr->depth++;
-       if (flags & NDR_SET_VALUES) {
-               ndr->flags |= LIBNDR_PRINT_SET_VALUES;
-       }
-       if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "winbind_pam_chng_paswd_auth_crap");
-               ndr->depth++;
-               ndr->depth--;
-       }
-       if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "winbind_pam_chng_paswd_auth_crap");
-               ndr->depth++;
-               ndr_print_winbind_status(ndr, "result", r->out.result);
-               ndr->depth--;
-       }
-       ndr->depth--;
-}
-
-static enum ndr_err_code ndr_push_winbind_list_users(struct ndr_push *ndr, int flags, const struct winbind_list_users *r)
-{
-       if (flags & NDR_IN) {
-       }
-       if (flags & NDR_OUT) {
-               NDR_CHECK(ndr_push_winbind_status(ndr, NDR_SCALARS, r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_winbind_list_users(struct ndr_pull *ndr, int flags, struct winbind_list_users *r)
-{
-       if (flags & NDR_IN) {
-       }
-       if (flags & NDR_OUT) {
-               NDR_CHECK(ndr_pull_winbind_status(ndr, NDR_SCALARS, &r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_winbind_list_users(struct ndr_print *ndr, const char *name, int flags, const struct winbind_list_users *r)
-{
-       ndr_print_struct(ndr, name, "winbind_list_users");
-       ndr->depth++;
-       if (flags & NDR_SET_VALUES) {
-               ndr->flags |= LIBNDR_PRINT_SET_VALUES;
-       }
-       if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "winbind_list_users");
-               ndr->depth++;
-               ndr->depth--;
-       }
-       if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "winbind_list_users");
-               ndr->depth++;
-               ndr_print_winbind_status(ndr, "result", r->out.result);
-               ndr->depth--;
-       }
-       ndr->depth--;
-}
-
-static enum ndr_err_code ndr_push_winbind_list_groups(struct ndr_push *ndr, int flags, const struct winbind_list_groups *r)
-{
-       if (flags & NDR_IN) {
-       }
-       if (flags & NDR_OUT) {
-               NDR_CHECK(ndr_push_winbind_status(ndr, NDR_SCALARS, r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_winbind_list_groups(struct ndr_pull *ndr, int flags, struct winbind_list_groups *r)
-{
-       if (flags & NDR_IN) {
-       }
-       if (flags & NDR_OUT) {
-               NDR_CHECK(ndr_pull_winbind_status(ndr, NDR_SCALARS, &r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_winbind_list_groups(struct ndr_print *ndr, const char *name, int flags, const struct winbind_list_groups *r)
-{
-       ndr_print_struct(ndr, name, "winbind_list_groups");
-       ndr->depth++;
-       if (flags & NDR_SET_VALUES) {
-               ndr->flags |= LIBNDR_PRINT_SET_VALUES;
-       }
-       if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "winbind_list_groups");
-               ndr->depth++;
-               ndr->depth--;
-       }
-       if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "winbind_list_groups");
-               ndr->depth++;
-               ndr_print_winbind_status(ndr, "result", r->out.result);
-               ndr->depth--;
-       }
-       ndr->depth--;
-}
-
-static enum ndr_err_code ndr_push_winbind_list_trustdom(struct ndr_push *ndr, int flags, const struct winbind_list_trustdom *r)
-{
-       if (flags & NDR_IN) {
-       }
-       if (flags & NDR_OUT) {
-               NDR_CHECK(ndr_push_winbind_status(ndr, NDR_SCALARS, r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_winbind_list_trustdom(struct ndr_pull *ndr, int flags, struct winbind_list_trustdom *r)
-{
-       if (flags & NDR_IN) {
-       }
-       if (flags & NDR_OUT) {
-               NDR_CHECK(ndr_pull_winbind_status(ndr, NDR_SCALARS, &r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_winbind_list_trustdom(struct ndr_print *ndr, const char *name, int flags, const struct winbind_list_trustdom *r)
-{
-       ndr_print_struct(ndr, name, "winbind_list_trustdom");
+       ndr_print_struct(ndr, name, "winbind_pam_chng_paswd_auth_crap");
        ndr->depth++;
        if (flags & NDR_SET_VALUES) {
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
        }
        if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "winbind_list_trustdom");
+               ndr_print_struct(ndr, "in", "winbind_pam_chng_paswd_auth_crap");
                ndr->depth++;
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "winbind_list_trustdom");
+               ndr_print_struct(ndr, "out", "winbind_pam_chng_paswd_auth_crap");
                ndr->depth++;
                ndr_print_winbind_status(ndr, "result", r->out.result);
                ndr->depth--;
@@ -1446,7 +1686,7 @@ _PUBLIC_ void ndr_print_winbind_list_trustdom(struct ndr_print *ndr, const char
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winbind_lookup_sid(struct ndr_push *ndr, int flags, const struct winbind_lookup_sid *r)
+static enum ndr_err_code ndr_push_winbind_list_users(struct ndr_push *ndr, int flags, const struct winbind_list_users *r)
 {
        if (flags & NDR_IN) {
        }
@@ -1456,7 +1696,7 @@ static enum ndr_err_code ndr_push_winbind_lookup_sid(struct ndr_push *ndr, int f
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winbind_lookup_sid(struct ndr_pull *ndr, int flags, struct winbind_lookup_sid *r)
+static enum ndr_err_code ndr_pull_winbind_list_users(struct ndr_pull *ndr, int flags, struct winbind_list_users *r)
 {
        if (flags & NDR_IN) {
        }
@@ -1466,20 +1706,20 @@ static enum ndr_err_code ndr_pull_winbind_lookup_sid(struct ndr_pull *ndr, int f
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_winbind_lookup_sid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_lookup_sid *r)
+_PUBLIC_ void ndr_print_winbind_list_users(struct ndr_print *ndr, const char *name, int flags, const struct winbind_list_users *r)
 {
-       ndr_print_struct(ndr, name, "winbind_lookup_sid");
+       ndr_print_struct(ndr, name, "winbind_list_users");
        ndr->depth++;
        if (flags & NDR_SET_VALUES) {
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
        }
        if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "winbind_lookup_sid");
+               ndr_print_struct(ndr, "in", "winbind_list_users");
                ndr->depth++;
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "winbind_lookup_sid");
+               ndr_print_struct(ndr, "out", "winbind_list_users");
                ndr->depth++;
                ndr_print_winbind_status(ndr, "result", r->out.result);
                ndr->depth--;
@@ -1487,7 +1727,7 @@ _PUBLIC_ void ndr_print_winbind_lookup_sid(struct ndr_print *ndr, const char *na
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winbind_lookup_name(struct ndr_push *ndr, int flags, const struct winbind_lookup_name *r)
+static enum ndr_err_code ndr_push_winbind_list_groups(struct ndr_push *ndr, int flags, const struct winbind_list_groups *r)
 {
        if (flags & NDR_IN) {
        }
@@ -1497,7 +1737,7 @@ static enum ndr_err_code ndr_push_winbind_lookup_name(struct ndr_push *ndr, int
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winbind_lookup_name(struct ndr_pull *ndr, int flags, struct winbind_lookup_name *r)
+static enum ndr_err_code ndr_pull_winbind_list_groups(struct ndr_pull *ndr, int flags, struct winbind_list_groups *r)
 {
        if (flags & NDR_IN) {
        }
@@ -1507,20 +1747,20 @@ static enum ndr_err_code ndr_pull_winbind_lookup_name(struct ndr_pull *ndr, int
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_winbind_lookup_name(struct ndr_print *ndr, const char *name, int flags, const struct winbind_lookup_name *r)
+_PUBLIC_ void ndr_print_winbind_list_groups(struct ndr_print *ndr, const char *name, int flags, const struct winbind_list_groups *r)
 {
-       ndr_print_struct(ndr, name, "winbind_lookup_name");
+       ndr_print_struct(ndr, name, "winbind_list_groups");
        ndr->depth++;
        if (flags & NDR_SET_VALUES) {
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
        }
        if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "winbind_lookup_name");
+               ndr_print_struct(ndr, "in", "winbind_list_groups");
                ndr->depth++;
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "winbind_lookup_name");
+               ndr_print_struct(ndr, "out", "winbind_list_groups");
                ndr->depth++;
                ndr_print_winbind_status(ndr, "result", r->out.result);
                ndr->depth--;
@@ -1528,7 +1768,7 @@ _PUBLIC_ void ndr_print_winbind_lookup_name(struct ndr_print *ndr, const char *n
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winbind_lookup_rids(struct ndr_push *ndr, int flags, const struct winbind_lookup_rids *r)
+static enum ndr_err_code ndr_push_winbind_list_trustdom(struct ndr_push *ndr, int flags, const struct winbind_list_trustdom *r)
 {
        if (flags & NDR_IN) {
        }
@@ -1538,7 +1778,7 @@ static enum ndr_err_code ndr_push_winbind_lookup_rids(struct ndr_push *ndr, int
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winbind_lookup_rids(struct ndr_pull *ndr, int flags, struct winbind_lookup_rids *r)
+static enum ndr_err_code ndr_pull_winbind_list_trustdom(struct ndr_pull *ndr, int flags, struct winbind_list_trustdom *r)
 {
        if (flags & NDR_IN) {
        }
@@ -1548,20 +1788,20 @@ static enum ndr_err_code ndr_pull_winbind_lookup_rids(struct ndr_pull *ndr, int
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_winbind_lookup_rids(struct ndr_print *ndr, const char *name, int flags, const struct winbind_lookup_rids *r)
+_PUBLIC_ void ndr_print_winbind_list_trustdom(struct ndr_print *ndr, const char *name, int flags, const struct winbind_list_trustdom *r)
 {
-       ndr_print_struct(ndr, name, "winbind_lookup_rids");
+       ndr_print_struct(ndr, name, "winbind_list_trustdom");
        ndr->depth++;
        if (flags & NDR_SET_VALUES) {
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
        }
        if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "winbind_lookup_rids");
+               ndr_print_struct(ndr, "in", "winbind_list_trustdom");
                ndr->depth++;
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "winbind_lookup_rids");
+               ndr_print_struct(ndr, "out", "winbind_list_trustdom");
                ndr->depth++;
                ndr_print_winbind_status(ndr, "result", r->out.result);
                ndr->depth--;
@@ -1569,7 +1809,7 @@ _PUBLIC_ void ndr_print_winbind_lookup_rids(struct ndr_print *ndr, const char *n
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winbind_sid_to_uid(struct ndr_push *ndr, int flags, const struct winbind_sid_to_uid *r)
+static enum ndr_err_code ndr_push_winbind_lookup_sid(struct ndr_push *ndr, int flags, const struct winbind_lookup_sid *r)
 {
        if (flags & NDR_IN) {
        }
@@ -1579,7 +1819,7 @@ static enum ndr_err_code ndr_push_winbind_sid_to_uid(struct ndr_push *ndr, int f
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winbind_sid_to_uid(struct ndr_pull *ndr, int flags, struct winbind_sid_to_uid *r)
+static enum ndr_err_code ndr_pull_winbind_lookup_sid(struct ndr_pull *ndr, int flags, struct winbind_lookup_sid *r)
 {
        if (flags & NDR_IN) {
        }
@@ -1589,20 +1829,20 @@ static enum ndr_err_code ndr_pull_winbind_sid_to_uid(struct ndr_pull *ndr, int f
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_winbind_sid_to_uid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_sid_to_uid *r)
+_PUBLIC_ void ndr_print_winbind_lookup_sid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_lookup_sid *r)
 {
-       ndr_print_struct(ndr, name, "winbind_sid_to_uid");
+       ndr_print_struct(ndr, name, "winbind_lookup_sid");
        ndr->depth++;
        if (flags & NDR_SET_VALUES) {
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
        }
        if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "winbind_sid_to_uid");
+               ndr_print_struct(ndr, "in", "winbind_lookup_sid");
                ndr->depth++;
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "winbind_sid_to_uid");
+               ndr_print_struct(ndr, "out", "winbind_lookup_sid");
                ndr->depth++;
                ndr_print_winbind_status(ndr, "result", r->out.result);
                ndr->depth--;
@@ -1610,7 +1850,7 @@ _PUBLIC_ void ndr_print_winbind_sid_to_uid(struct ndr_print *ndr, const char *na
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winbind_sid_to_gid(struct ndr_push *ndr, int flags, const struct winbind_sid_to_gid *r)
+static enum ndr_err_code ndr_push_winbind_lookup_name(struct ndr_push *ndr, int flags, const struct winbind_lookup_name *r)
 {
        if (flags & NDR_IN) {
        }
@@ -1620,7 +1860,7 @@ static enum ndr_err_code ndr_push_winbind_sid_to_gid(struct ndr_push *ndr, int f
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winbind_sid_to_gid(struct ndr_pull *ndr, int flags, struct winbind_sid_to_gid *r)
+static enum ndr_err_code ndr_pull_winbind_lookup_name(struct ndr_pull *ndr, int flags, struct winbind_lookup_name *r)
 {
        if (flags & NDR_IN) {
        }
@@ -1630,20 +1870,20 @@ static enum ndr_err_code ndr_pull_winbind_sid_to_gid(struct ndr_pull *ndr, int f
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_winbind_sid_to_gid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_sid_to_gid *r)
+_PUBLIC_ void ndr_print_winbind_lookup_name(struct ndr_print *ndr, const char *name, int flags, const struct winbind_lookup_name *r)
 {
-       ndr_print_struct(ndr, name, "winbind_sid_to_gid");
+       ndr_print_struct(ndr, name, "winbind_lookup_name");
        ndr->depth++;
        if (flags & NDR_SET_VALUES) {
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
        }
        if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "winbind_sid_to_gid");
+               ndr_print_struct(ndr, "in", "winbind_lookup_name");
                ndr->depth++;
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "winbind_sid_to_gid");
+               ndr_print_struct(ndr, "out", "winbind_lookup_name");
                ndr->depth++;
                ndr_print_winbind_status(ndr, "result", r->out.result);
                ndr->depth--;
@@ -1651,7 +1891,7 @@ _PUBLIC_ void ndr_print_winbind_sid_to_gid(struct ndr_print *ndr, const char *na
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winbind_uid_to_sid(struct ndr_push *ndr, int flags, const struct winbind_uid_to_sid *r)
+static enum ndr_err_code ndr_push_winbind_lookup_rids(struct ndr_push *ndr, int flags, const struct winbind_lookup_rids *r)
 {
        if (flags & NDR_IN) {
        }
@@ -1661,7 +1901,7 @@ static enum ndr_err_code ndr_push_winbind_uid_to_sid(struct ndr_push *ndr, int f
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winbind_uid_to_sid(struct ndr_pull *ndr, int flags, struct winbind_uid_to_sid *r)
+static enum ndr_err_code ndr_pull_winbind_lookup_rids(struct ndr_pull *ndr, int flags, struct winbind_lookup_rids *r)
 {
        if (flags & NDR_IN) {
        }
@@ -1671,20 +1911,20 @@ static enum ndr_err_code ndr_pull_winbind_uid_to_sid(struct ndr_pull *ndr, int f
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_winbind_uid_to_sid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_uid_to_sid *r)
+_PUBLIC_ void ndr_print_winbind_lookup_rids(struct ndr_print *ndr, const char *name, int flags, const struct winbind_lookup_rids *r)
 {
-       ndr_print_struct(ndr, name, "winbind_uid_to_sid");
+       ndr_print_struct(ndr, name, "winbind_lookup_rids");
        ndr->depth++;
        if (flags & NDR_SET_VALUES) {
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
        }
        if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "winbind_uid_to_sid");
+               ndr_print_struct(ndr, "in", "winbind_lookup_rids");
                ndr->depth++;
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "winbind_uid_to_sid");
+               ndr_print_struct(ndr, "out", "winbind_lookup_rids");
                ndr->depth++;
                ndr_print_winbind_status(ndr, "result", r->out.result);
                ndr->depth--;
@@ -1692,41 +1932,103 @@ _PUBLIC_ void ndr_print_winbind_uid_to_sid(struct ndr_print *ndr, const char *na
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winbind_gid_to_sid(struct ndr_push *ndr, int flags, const struct winbind_gid_to_sid *r)
+static enum ndr_err_code ndr_push_winbind_get_idmap(struct ndr_push *ndr, int flags, const struct winbind_get_idmap *r)
 {
        if (flags & NDR_IN) {
+               if (r->in.level == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_winbind_get_idmap_level(ndr, NDR_SCALARS, *r->in.level));
+               NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.req, *r->in.level));
+               NDR_CHECK(ndr_push_winbind_get_idmap_req(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
        }
        if (flags & NDR_OUT) {
+               if (r->out.level == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_winbind_get_idmap_level(ndr, NDR_SCALARS, *r->out.level));
+               if (r->out.rep == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.rep, *r->out.level));
+               NDR_CHECK(ndr_push_winbind_get_idmap_rep(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rep));
                NDR_CHECK(ndr_push_winbind_status(ndr, NDR_SCALARS, r->out.result));
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winbind_gid_to_sid(struct ndr_pull *ndr, int flags, struct winbind_gid_to_sid *r)
+static enum ndr_err_code ndr_pull_winbind_get_idmap(struct ndr_pull *ndr, int flags, struct winbind_get_idmap *r)
 {
+       TALLOC_CTX *_mem_save_level_0;
+       TALLOC_CTX *_mem_save_rep_0;
        if (flags & NDR_IN) {
+               ZERO_STRUCT(r->out);
+
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.level);
+               }
+               _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_winbind_get_idmap_level(ndr, NDR_SCALARS, r->in.level));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.req, *r->in.level));
+               NDR_CHECK(ndr_pull_winbind_get_idmap_req(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
+               NDR_PULL_ALLOC(ndr, r->out.level);
+               *r->out.level = *r->in.level;
+               NDR_PULL_ALLOC(ndr, r->out.rep);
+               ZERO_STRUCTP(r->out.rep);
        }
        if (flags & NDR_OUT) {
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->out.level);
+               }
+               _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_winbind_get_idmap_level(ndr, NDR_SCALARS, r->out.level));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->out.rep);
+               }
+               _mem_save_rep_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.rep, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.rep, *r->out.level));
+               NDR_CHECK(ndr_pull_winbind_get_idmap_rep(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rep));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rep_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_winbind_status(ndr, NDR_SCALARS, &r->out.result));
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_winbind_gid_to_sid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_gid_to_sid *r)
+_PUBLIC_ void ndr_print_winbind_get_idmap(struct ndr_print *ndr, const char *name, int flags, const struct winbind_get_idmap *r)
 {
-       ndr_print_struct(ndr, name, "winbind_gid_to_sid");
+       ndr_print_struct(ndr, name, "winbind_get_idmap");
        ndr->depth++;
        if (flags & NDR_SET_VALUES) {
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
        }
        if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "winbind_gid_to_sid");
+               ndr_print_struct(ndr, "in", "winbind_get_idmap");
+               ndr->depth++;
+               ndr_print_ptr(ndr, "level", r->in.level);
                ndr->depth++;
+               ndr_print_winbind_get_idmap_level(ndr, "level", *r->in.level);
+               ndr->depth--;
+               ndr_print_set_switch_value(ndr, &r->in.req, *r->in.level);
+               ndr_print_winbind_get_idmap_req(ndr, "req", &r->in.req);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "winbind_gid_to_sid");
+               ndr_print_struct(ndr, "out", "winbind_get_idmap");
+               ndr->depth++;
+               ndr_print_ptr(ndr, "level", r->out.level);
                ndr->depth++;
+               ndr_print_winbind_get_idmap_level(ndr, "level", *r->out.level);
+               ndr->depth--;
+               ndr_print_ptr(ndr, "rep", r->out.rep);
+               ndr->depth++;
+               ndr_print_set_switch_value(ndr, r->out.rep, *r->out.level);
+               ndr_print_winbind_get_idmap_rep(ndr, "rep", r->out.rep);
+               ndr->depth--;
                ndr_print_winbind_status(ndr, "result", r->out.result);
                ndr->depth--;
        }
@@ -2564,170 +2866,6 @@ _PUBLIC_ void ndr_print_winbind_getuserdomgroups(struct ndr_print *ndr, const ch
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winbind_dual_sid2gid(struct ndr_push *ndr, int flags, const struct winbind_dual_sid2gid *r)
-{
-       if (flags & NDR_IN) {
-       }
-       if (flags & NDR_OUT) {
-               NDR_CHECK(ndr_push_winbind_status(ndr, NDR_SCALARS, r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_winbind_dual_sid2gid(struct ndr_pull *ndr, int flags, struct winbind_dual_sid2gid *r)
-{
-       if (flags & NDR_IN) {
-       }
-       if (flags & NDR_OUT) {
-               NDR_CHECK(ndr_pull_winbind_status(ndr, NDR_SCALARS, &r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_winbind_dual_sid2gid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_dual_sid2gid *r)
-{
-       ndr_print_struct(ndr, name, "winbind_dual_sid2gid");
-       ndr->depth++;
-       if (flags & NDR_SET_VALUES) {
-               ndr->flags |= LIBNDR_PRINT_SET_VALUES;
-       }
-       if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "winbind_dual_sid2gid");
-               ndr->depth++;
-               ndr->depth--;
-       }
-       if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "winbind_dual_sid2gid");
-               ndr->depth++;
-               ndr_print_winbind_status(ndr, "result", r->out.result);
-               ndr->depth--;
-       }
-       ndr->depth--;
-}
-
-static enum ndr_err_code ndr_push_winbind_dual_sid2uid(struct ndr_push *ndr, int flags, const struct winbind_dual_sid2uid *r)
-{
-       if (flags & NDR_IN) {
-       }
-       if (flags & NDR_OUT) {
-               NDR_CHECK(ndr_push_winbind_status(ndr, NDR_SCALARS, r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_winbind_dual_sid2uid(struct ndr_pull *ndr, int flags, struct winbind_dual_sid2uid *r)
-{
-       if (flags & NDR_IN) {
-       }
-       if (flags & NDR_OUT) {
-               NDR_CHECK(ndr_pull_winbind_status(ndr, NDR_SCALARS, &r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_winbind_dual_sid2uid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_dual_sid2uid *r)
-{
-       ndr_print_struct(ndr, name, "winbind_dual_sid2uid");
-       ndr->depth++;
-       if (flags & NDR_SET_VALUES) {
-               ndr->flags |= LIBNDR_PRINT_SET_VALUES;
-       }
-       if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "winbind_dual_sid2uid");
-               ndr->depth++;
-               ndr->depth--;
-       }
-       if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "winbind_dual_sid2uid");
-               ndr->depth++;
-               ndr_print_winbind_status(ndr, "result", r->out.result);
-               ndr->depth--;
-       }
-       ndr->depth--;
-}
-
-static enum ndr_err_code ndr_push_winbind_dual_uid2sid(struct ndr_push *ndr, int flags, const struct winbind_dual_uid2sid *r)
-{
-       if (flags & NDR_IN) {
-       }
-       if (flags & NDR_OUT) {
-               NDR_CHECK(ndr_push_winbind_status(ndr, NDR_SCALARS, r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_winbind_dual_uid2sid(struct ndr_pull *ndr, int flags, struct winbind_dual_uid2sid *r)
-{
-       if (flags & NDR_IN) {
-       }
-       if (flags & NDR_OUT) {
-               NDR_CHECK(ndr_pull_winbind_status(ndr, NDR_SCALARS, &r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_winbind_dual_uid2sid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_dual_uid2sid *r)
-{
-       ndr_print_struct(ndr, name, "winbind_dual_uid2sid");
-       ndr->depth++;
-       if (flags & NDR_SET_VALUES) {
-               ndr->flags |= LIBNDR_PRINT_SET_VALUES;
-       }
-       if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "winbind_dual_uid2sid");
-               ndr->depth++;
-               ndr->depth--;
-       }
-       if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "winbind_dual_uid2sid");
-               ndr->depth++;
-               ndr_print_winbind_status(ndr, "result", r->out.result);
-               ndr->depth--;
-       }
-       ndr->depth--;
-}
-
-static enum ndr_err_code ndr_push_winbind_dual_gid2sid(struct ndr_push *ndr, int flags, const struct winbind_dual_gid2sid *r)
-{
-       if (flags & NDR_IN) {
-       }
-       if (flags & NDR_OUT) {
-               NDR_CHECK(ndr_push_winbind_status(ndr, NDR_SCALARS, r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_winbind_dual_gid2sid(struct ndr_pull *ndr, int flags, struct winbind_dual_gid2sid *r)
-{
-       if (flags & NDR_IN) {
-       }
-       if (flags & NDR_OUT) {
-               NDR_CHECK(ndr_pull_winbind_status(ndr, NDR_SCALARS, &r->out.result));
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_winbind_dual_gid2sid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_dual_gid2sid *r)
-{
-       ndr_print_struct(ndr, name, "winbind_dual_gid2sid");
-       ndr->depth++;
-       if (flags & NDR_SET_VALUES) {
-               ndr->flags |= LIBNDR_PRINT_SET_VALUES;
-       }
-       if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "winbind_dual_gid2sid");
-               ndr->depth++;
-               ndr->depth--;
-       }
-       if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "winbind_dual_gid2sid");
-               ndr->depth++;
-               ndr_print_winbind_status(ndr, "result", r->out.result);
-               ndr->depth--;
-       }
-       ndr->depth--;
-}
-
 static enum ndr_err_code ndr_push_winbind_dual_set_mapping(struct ndr_push *ndr, int flags, const struct winbind_dual_set_mapping *r)
 {
        if (flags & NDR_IN) {
@@ -3127,35 +3265,11 @@ static const struct ndr_interface_call winbind_protocol_calls[] = {
                false,
        },
        {
-               "winbind_sid_to_uid",
-               sizeof(struct winbind_sid_to_uid),
-               (ndr_push_flags_fn_t) ndr_push_winbind_sid_to_uid,
-               (ndr_pull_flags_fn_t) ndr_pull_winbind_sid_to_uid,
-               (ndr_print_function_t) ndr_print_winbind_sid_to_uid,
-               false,
-       },
-       {
-               "winbind_sid_to_gid",
-               sizeof(struct winbind_sid_to_gid),
-               (ndr_push_flags_fn_t) ndr_push_winbind_sid_to_gid,
-               (ndr_pull_flags_fn_t) ndr_pull_winbind_sid_to_gid,
-               (ndr_print_function_t) ndr_print_winbind_sid_to_gid,
-               false,
-       },
-       {
-               "winbind_uid_to_sid",
-               sizeof(struct winbind_uid_to_sid),
-               (ndr_push_flags_fn_t) ndr_push_winbind_uid_to_sid,
-               (ndr_pull_flags_fn_t) ndr_pull_winbind_uid_to_sid,
-               (ndr_print_function_t) ndr_print_winbind_uid_to_sid,
-               false,
-       },
-       {
-               "winbind_gid_to_sid",
-               sizeof(struct winbind_gid_to_sid),
-               (ndr_push_flags_fn_t) ndr_push_winbind_gid_to_sid,
-               (ndr_pull_flags_fn_t) ndr_pull_winbind_gid_to_sid,
-               (ndr_print_function_t) ndr_print_winbind_gid_to_sid,
+               "winbind_get_idmap",
+               sizeof(struct winbind_get_idmap),
+               (ndr_push_flags_fn_t) ndr_push_winbind_get_idmap,
+               (ndr_pull_flags_fn_t) ndr_pull_winbind_get_idmap,
+               (ndr_print_function_t) ndr_print_winbind_get_idmap,
                false,
        },
        {
@@ -3286,38 +3400,6 @@ static const struct ndr_interface_call winbind_protocol_calls[] = {
                (ndr_print_function_t) ndr_print_winbind_getuserdomgroups,
                false,
        },
-       {
-               "winbind_dual_sid2gid",
-               sizeof(struct winbind_dual_sid2gid),
-               (ndr_push_flags_fn_t) ndr_push_winbind_dual_sid2gid,
-               (ndr_pull_flags_fn_t) ndr_pull_winbind_dual_sid2gid,
-               (ndr_print_function_t) ndr_print_winbind_dual_sid2gid,
-               false,
-       },
-       {
-               "winbind_dual_sid2uid",
-               sizeof(struct winbind_dual_sid2uid),
-               (ndr_push_flags_fn_t) ndr_push_winbind_dual_sid2uid,
-               (ndr_pull_flags_fn_t) ndr_pull_winbind_dual_sid2uid,
-               (ndr_print_function_t) ndr_print_winbind_dual_sid2uid,
-               false,
-       },
-       {
-               "winbind_dual_uid2sid",
-               sizeof(struct winbind_dual_uid2sid),
-               (ndr_push_flags_fn_t) ndr_push_winbind_dual_uid2sid,
-               (ndr_pull_flags_fn_t) ndr_pull_winbind_dual_uid2sid,
-               (ndr_print_function_t) ndr_print_winbind_dual_uid2sid,
-               false,
-       },
-       {
-               "winbind_dual_gid2sid",
-               sizeof(struct winbind_dual_gid2sid),
-               (ndr_push_flags_fn_t) ndr_push_winbind_dual_gid2sid,
-               (ndr_pull_flags_fn_t) ndr_pull_winbind_dual_gid2sid,
-               (ndr_print_function_t) ndr_print_winbind_dual_gid2sid,
-               false,
-       },
        {
                "winbind_dual_set_mapping",
                sizeof(struct winbind_dual_set_mapping),
@@ -3387,7 +3469,7 @@ const struct ndr_interface_table ndr_table_winbind_protocol = {
                NDR_WINBIND_PROTOCOL_VERSION
        },
        .helpstring     = NDR_WINBIND_PROTOCOL_HELPSTRING,
-       .num_calls      = 53,
+       .num_calls      = 46,
        .calls          = winbind_protocol_calls,
        .endpoints      = &winbind_protocol_endpoints,
        .authservices   = &winbind_protocol_authservices
index 848e895aab70df9fc336eeb435fe023c688cdc8c..21bb0b13fce74c15034b824f5bacf0bc9481fb1b 100644 (file)
@@ -59,65 +59,51 @@ extern const struct ndr_interface_table ndr_table_winbind_protocol;
 
 #define NDR_WINBIND_LOOKUP_RIDS (0x17)
 
-#define NDR_WINBIND_SID_TO_UID (0x18)
+#define NDR_WINBIND_GET_IDMAP (0x18)
 
-#define NDR_WINBIND_SID_TO_GID (0x19)
+#define NDR_WINBIND_ALLOCATE_UID (0x19)
 
-#define NDR_WINBIND_UID_TO_SID (0x1a)
+#define NDR_WINBIND_ALLOCATE_GID (0x1a)
 
-#define NDR_WINBIND_GID_TO_SID (0x1b)
+#define NDR_WINBIND_SET_MAPPING (0x1b)
 
-#define NDR_WINBIND_ALLOCATE_UID (0x1c)
+#define NDR_WINBIND_SET_HWM (0x1c)
 
-#define NDR_WINBIND_ALLOCATE_GID (0x1d)
+#define NDR_WINBIND_CHECK_MACHCC (0x1d)
 
-#define NDR_WINBIND_SET_MAPPING (0x1e)
+#define NDR_WINBIND_INFO_FIXNAME (0x1e)
 
-#define NDR_WINBIND_SET_HWM (0x1f)
+#define NDR_WINBIND_DOMAIN_NAME (0x1f)
 
-#define NDR_WINBIND_CHECK_MACHCC (0x20)
+#define NDR_WINBIND_GET_DOMAIN_INFO (0x20)
 
-#define NDR_WINBIND_INFO_FIXNAME (0x21)
+#define NDR_WINBIND_GET_DC_INFO (0x21)
 
-#define NDR_WINBIND_DOMAIN_NAME (0x22)
+#define NDR_WINBIND_SHOW_SEQUENCE (0x22)
 
-#define NDR_WINBIND_GET_DOMAIN_INFO (0x23)
+#define NDR_WINBIND_WINS_BYIP (0x23)
 
-#define NDR_WINBIND_GET_DC_INFO (0x24)
+#define NDR_WINBIND_WINS_BYNAME (0x24)
 
-#define NDR_WINBIND_SHOW_SEQUENCE (0x25)
+#define NDR_WINBIND_GETGRLIST (0x25)
 
-#define NDR_WINBIND_WINS_BYIP (0x26)
+#define NDR_WINBIND_NETBIOS_NAME (0x26)
 
-#define NDR_WINBIND_WINS_BYNAME (0x27)
+#define NDR_WINBIND_GETUSERSIDS (0x27)
 
-#define NDR_WINBIND_GETGRLIST (0x28)
+#define NDR_WINBIND_GETUSERDOMGROUPS (0x28)
 
-#define NDR_WINBIND_NETBIOS_NAME (0x29)
+#define NDR_WINBIND_DUAL_SET_MAPPING (0x29)
 
-#define NDR_WINBIND_GETUSERSIDS (0x2a)
+#define NDR_WINBIND_DUAL_SET_HWM (0x2a)
 
-#define NDR_WINBIND_GETUSERDOMGROUPS (0x2b)
+#define NDR_WINBIND_DUAL_USERINFO (0x2b)
 
-#define NDR_WINBIND_DUAL_SID2GID (0x2c)
+#define NDR_WINBIND_DUAL_GETSIDALIASES (0x2c)
 
-#define NDR_WINBIND_DUAL_SID2UID (0x2d)
+#define NDR_WINBIND_CCACHE_NTLMAUTH (0x2d)
 
-#define NDR_WINBIND_DUAL_UID2SID (0x2e)
-
-#define NDR_WINBIND_DUAL_GID2SID (0x2f)
-
-#define NDR_WINBIND_DUAL_SET_MAPPING (0x30)
-
-#define NDR_WINBIND_DUAL_SET_HWM (0x31)
-
-#define NDR_WINBIND_DUAL_USERINFO (0x32)
-
-#define NDR_WINBIND_DUAL_GETSIDALIASES (0x33)
-
-#define NDR_WINBIND_CCACHE_NTLMAUTH (0x34)
-
-#define NDR_WINBIND_PROTOCOL_CALL_COUNT (53)
+#define NDR_WINBIND_PROTOCOL_CALL_COUNT (46)
 enum ndr_err_code ndr_push_winbind_status(struct ndr_push *ndr, int ndr_flags, enum winbind_status r);
 enum ndr_err_code ndr_pull_winbind_status(struct ndr_pull *ndr, int ndr_flags, enum winbind_status *r);
 void ndr_print_winbind_status(struct ndr_print *ndr, const char *name, enum winbind_status r);
@@ -126,6 +112,9 @@ void ndr_print_winbind_header_flags(struct ndr_print *ndr, const char *name, uin
 enum ndr_err_code ndr_push_STRUCT_winbind_header(struct ndr_push *ndr, int ndr_flags, const struct winbind_header *r);
 enum ndr_err_code ndr_pull_STRUCT_winbind_header(struct ndr_pull *ndr, int ndr_flags, struct winbind_header *r);
 void ndr_print_STRUCT_winbind_header(struct ndr_print *ndr, const char *name, const struct winbind_header *r);
+void ndr_print_winbind_get_idmap_level(struct ndr_print *ndr, const char *name, enum winbind_get_idmap_level r);
+void ndr_print_winbind_get_idmap_req(struct ndr_print *ndr, const char *name, const union winbind_get_idmap_req *r);
+void ndr_print_winbind_get_idmap_rep(struct ndr_print *ndr, const char *name, const union winbind_get_idmap_rep *r);
 void ndr_print_STRUCT_winbind_domain_info_compat(struct ndr_print *ndr, const char *name, const struct winbind_domain_info_compat *r);
 void ndr_print_winbind_domain_info_level(struct ndr_print *ndr, const char *name, enum winbind_domain_info_level r);
 void ndr_print_winbind_domain_info(struct ndr_print *ndr, const char *name, const union winbind_domain_info *r);
@@ -156,10 +145,7 @@ void ndr_print_winbind_list_trustdom(struct ndr_print *ndr, const char *name, in
 void ndr_print_winbind_lookup_sid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_lookup_sid *r);
 void ndr_print_winbind_lookup_name(struct ndr_print *ndr, const char *name, int flags, const struct winbind_lookup_name *r);
 void ndr_print_winbind_lookup_rids(struct ndr_print *ndr, const char *name, int flags, const struct winbind_lookup_rids *r);
-void ndr_print_winbind_sid_to_uid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_sid_to_uid *r);
-void ndr_print_winbind_sid_to_gid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_sid_to_gid *r);
-void ndr_print_winbind_uid_to_sid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_uid_to_sid *r);
-void ndr_print_winbind_gid_to_sid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_gid_to_sid *r);
+void ndr_print_winbind_get_idmap(struct ndr_print *ndr, const char *name, int flags, const struct winbind_get_idmap *r);
 void ndr_print_winbind_allocate_uid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_allocate_uid *r);
 void ndr_print_winbind_allocate_gid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_allocate_gid *r);
 void ndr_print_winbind_set_mapping(struct ndr_print *ndr, const char *name, int flags, const struct winbind_set_mapping *r);
@@ -176,10 +162,6 @@ void ndr_print_winbind_getgrlist(struct ndr_print *ndr, const char *name, int fl
 void ndr_print_winbind_netbios_name(struct ndr_print *ndr, const char *name, int flags, const struct winbind_netbios_name *r);
 void ndr_print_winbind_getusersids(struct ndr_print *ndr, const char *name, int flags, const struct winbind_getusersids *r);
 void ndr_print_winbind_getuserdomgroups(struct ndr_print *ndr, const char *name, int flags, const struct winbind_getuserdomgroups *r);
-void ndr_print_winbind_dual_sid2gid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_dual_sid2gid *r);
-void ndr_print_winbind_dual_sid2uid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_dual_sid2uid *r);
-void ndr_print_winbind_dual_uid2sid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_dual_uid2sid *r);
-void ndr_print_winbind_dual_gid2sid(struct ndr_print *ndr, const char *name, int flags, const struct winbind_dual_gid2sid *r);
 void ndr_print_winbind_dual_set_mapping(struct ndr_print *ndr, const char *name, int flags, const struct winbind_dual_set_mapping *r);
 void ndr_print_winbind_dual_set_hwm(struct ndr_print *ndr, const char *name, int flags, const struct winbind_dual_set_hwm *r);
 void ndr_print_winbind_dual_userinfo(struct ndr_print *ndr, const char *name, int flags, const struct winbind_dual_userinfo *r);
index 4dd55566295e366bb744a6b69832fb5eaeacd035..42fd363a61dbf1eae68a0ace82f7de6e22c3d504 100644 (file)
@@ -55,6 +55,34 @@ struct winbind_header {
        uint32_t flags;
 }/* [public] */;
 
+#ifndef USE_UINT_ENUMS
+enum winbind_get_idmap_level {
+       WINBIND_IDMAP_LEVEL_SID_TO_UID=1,
+       WINBIND_IDMAP_LEVEL_SID_TO_GID=2,
+       WINBIND_IDMAP_LEVEL_UID_TO_SID=3,
+       WINBIND_IDMAP_LEVEL_GID_TO_SID=4
+}
+#else
+enum winbind_get_idmap_level { __donnot_use_enum_winbind_get_idmap_level=0x7FFFFFFF}
+#define WINBIND_IDMAP_LEVEL_SID_TO_UID ( 1 )
+#define WINBIND_IDMAP_LEVEL_SID_TO_GID ( 2 )
+#define WINBIND_IDMAP_LEVEL_UID_TO_SID ( 3 )
+#define WINBIND_IDMAP_LEVEL_GID_TO_SID ( 4 )
+#endif
+;
+
+union winbind_get_idmap_req {
+       struct dom_sid *sid;/* [unique,case(WINBIND_IDMAP_LEVEL_SID_TO_UID)] */
+       uint64_t uid;/* [case(WINBIND_IDMAP_LEVEL_UID_TO_SID)] */
+       uint64_t gid;/* [case(WINBIND_IDMAP_LEVEL_GID_TO_SID)] */
+}/* [switch_type(winbind_get_idmap_level)] */;
+
+union winbind_get_idmap_rep {
+       uint64_t uid;/* [case(WINBIND_IDMAP_LEVEL_SID_TO_UID)] */
+       uint64_t gid;/* [case(WINBIND_IDMAP_LEVEL_SID_TO_GID)] */
+       struct dom_sid *sid;/* [unique,case(WINBIND_IDMAP_LEVEL_UID_TO_SID)] */
+}/* [switch_type(winbind_get_idmap_level)] */;
+
 struct winbind_domain_info_compat {
        const char *netbios_name;/* [charset(UTF8)] */
        const char *dns_name;/* [unique,charset(UTF8)] */
@@ -291,32 +319,15 @@ struct winbind_lookup_rids {
 };
 
 
-struct winbind_sid_to_uid {
-       struct {
-               enum winbind_status result;
-       } out;
-
-};
-
-
-struct winbind_sid_to_gid {
-       struct {
-               enum winbind_status result;
-       } out;
-
-};
-
-
-struct winbind_uid_to_sid {
+struct winbind_get_idmap {
        struct {
-               enum winbind_status result;
-       } out;
-
-};
-
+               union winbind_get_idmap_req req;/* [switch_is(*level)] */
+               enum winbind_get_idmap_level *level;/* [ref] */
+       } in;
 
-struct winbind_gid_to_sid {
        struct {
+               union winbind_get_idmap_rep *rep;/* [ref,switch_is(*level)] */
+               enum winbind_get_idmap_level *level;/* [ref] */
                enum winbind_status result;
        } out;
 
@@ -467,38 +478,6 @@ struct winbind_getuserdomgroups {
 };
 
 
-struct winbind_dual_sid2gid {
-       struct {
-               enum winbind_status result;
-       } out;
-
-};
-
-
-struct winbind_dual_sid2uid {
-       struct {
-               enum winbind_status result;
-       } out;
-
-};
-
-
-struct winbind_dual_uid2sid {
-       struct {
-               enum winbind_status result;
-       } out;
-
-};
-
-
-struct winbind_dual_gid2sid {
-       struct {
-               enum winbind_status result;
-       } out;
-
-};
-
-
 struct winbind_dual_set_mapping {
        struct {
                enum winbind_status result;