add idl for WINBIND_SET_IDMAP...
authorStefan Metzmacher <metze@sernet.de>
Wed, 12 Dec 2007 17:10:02 +0000 (18:10 +0100)
committerStefan Metzmacher <metze@sernet.de>
Fri, 2 May 2008 14:12:43 +0000 (16:12 +0200)
source/librpc/idl/winbind_protocol.idl

index 382ba98193595dc7990914d4176fec26c23509f1..d05f512bfa0e63544df0cf900bb0ea9f5fc4f695 100644 (file)
@@ -144,10 +144,36 @@ import "security.idl";
                [out,switch_is(*level)] winbind_get_idmap_rep *rep
        );
 
-       winbind_status winbind_allocate_uid(/*TODO*/);
-       winbind_status winbind_allocate_gid(/*TODO*/);
-       winbind_status winbind_set_mapping(/*TODO*/);
-       winbind_status winbind_set_hwm(/*TODO*/);
+       typedef [v1_enum] enum {
+               WINBIND_SET_IDMAP_LEVEL_ALLOCATE_UID            = 1,
+               WINBIND_SET_IDMAP_LEVEL_ALLOCATE_GID            = 2,
+               WINBIND_SET_IDMAP_LEVEL_SET_MAPPING             = 3,
+               WINBIND_SET_IDMAP_LEVEL_SET_HWM                 = 4
+       } winbind_set_idmap_level;
+
+       typedef [switch_type(winbind_set_idmap_level)] union {
+       [case(WINBIND_SET_IDMAP_LEVEL_ALLOCATE_UID)];
+       [case(WINBIND_SET_IDMAP_LEVEL_ALLOCATE_GID)];
+       [case(WINBIND_SET_IDMAP_LEVEL_SET_MAPPING)]
+               id_map mapping;
+       [case(WINBIND_SET_IDMAP_LEVEL_SET_HWM)]
+               unixid hwm;
+       } winbind_set_idmap_req;
+
+       typedef [switch_type(winbind_set_idmap_level)] union {
+       [case(WINBIND_SET_IDMAP_LEVEL_ALLOCATE_UID)]
+               hyper uid;
+       [case(WINBIND_SET_IDMAP_LEVEL_ALLOCATE_GID)]
+               hyper gid;
+       [case(WINBIND_SET_IDMAP_LEVEL_SET_MAPPING)];
+       [case(WINBIND_SET_IDMAP_LEVEL_SET_HWM)];
+       } winbind_set_idmap_rep;
+
+       winbind_status winbind_set_idmap(
+               [in,out] winbind_set_idmap_level *level,
+               [in,switch_is(*level)] winbind_set_idmap_req req,
+               [out,switch_is(*level)] winbind_set_idmap_rep *rep
+       );
 
        /* Check machine account pw works */
        winbind_status winbind_check_machcc(/*TODO*/);
@@ -231,13 +257,6 @@ import "security.idl";
        /* Various group queries */
        winbind_status winbind_getuserdomgroups(/*TODO*/);
 
-       /*
-        * Blocking calls that are not allowed on the main winbind pipe, only
-        * between parent and children
-        */
-       winbind_status winbind_dual_set_mapping(/*TODO*/);
-       winbind_status winbind_dual_set_hwm(/*TODO*/);
-
        /*
         * Wrapper around possibly blocking unix nss calls
         */