s4:idmap Seperate idmap structures from winbind.idl and match to source3/ idmap
authorAndrew Bartlett <abartlet@samba.org>
Mon, 24 May 2010 00:15:04 +0000 (10:15 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 24 May 2010 13:08:56 +0000 (23:08 +1000)
These structures now match those in use in the source3 code.  I'm not
sure if this is the better API or not, but it is far, far safer to
remove a pointer than to add one.

Andrew Bartlett

librpc/idl/idmap.idl [new file with mode: 0644]
librpc/idl/wscript_build
source4/librpc/idl/winbind.idl
source4/librpc/wscript_build

diff --git a/librpc/idl/idmap.idl b/librpc/idl/idmap.idl
new file mode 100644 (file)
index 0000000..65e4596
--- /dev/null
@@ -0,0 +1,34 @@
+#include "idl_types.h"
+
+import "security.idl";
+
+[
+  pointer_default(unique)
+]
+interface idmap
+{
+       typedef [public] enum {
+               ID_TYPE_NOT_SPECIFIED,
+               ID_TYPE_UID,
+               ID_TYPE_GID,
+               ID_TYPE_BOTH
+       } id_type;
+
+       typedef [public] struct {
+               uint32 id;
+               id_type type;
+       } unixid;
+
+       typedef[public]  enum {
+               ID_UNKNOWN,
+               ID_MAPPED,
+               ID_UNMAPPED,
+               ID_EXPIRED
+       } id_mapping;
+
+       typedef [public] struct {
+               dom_sid *sid;
+               unixid xid;
+               id_mapping status;
+       } id_map;
+}
index b8c650197c564f1170fcedf70c49a26e6114b016..c5be1b7447c8955ab3aafeb1d1c57da9ae8d88d3 100644 (file)
@@ -20,6 +20,6 @@ bld.SAMBA_PIDL_LIST('PIDL',
                     output_dir='../gen_ndr')
 
 bld.SAMBA_PIDL_LIST('PIDL',
-                    'rap.idl',
+                    'rap.idl idmap.idl',
                     options='--header --ndr-parser',
                     output_dir='../gen_ndr')
index 73e725bb9835c936a9529f1628e16de59de75244..849b8166a77d677f42aaacccb39ca8cad83f25cf 100644 (file)
@@ -4,7 +4,7 @@
 
 #include "idl_types.h"
 
-import "netlogon.idl", "lsa.idl", "security.idl";
+import "netlogon.idl", "lsa.idl", "security.idl", "idmap.idl";
 
 [
   uuid("245f3e6b-3c5d-6e21-3a2d-2a3d645b7221"),
@@ -16,31 +16,6 @@ interface winbind
        typedef [switch_type(uint16)] union netr_LogonLevel netr_LogonLevel;
        typedef [switch_type(uint16)] union netr_Validation netr_Validation;
 
-       typedef enum {
-               ID_TYPE_NOT_SPECIFIED,
-               ID_TYPE_UID,
-               ID_TYPE_GID,
-               ID_TYPE_BOTH
-       } id_type;
-
-       typedef struct {
-               uint32 id;
-               id_type type;
-       } unixid;
-
-       typedef enum {
-               ID_UNKNOWN,
-               ID_MAPPED,
-               ID_UNMAPPED,
-               ID_EXPIRED
-       } id_mapping;
-
-       typedef struct {
-               unixid *unixid;
-               dom_sid *sid;
-               id_mapping status;
-       } id_map;
-
        /* a call to get runtime informations */
        void winbind_information(/* TODO */);
 
index ab80c09e66809ae6b217226910ff2465851690b9..5e5c5f5b0447c9a7c68d4cc1e1825c2c66d56818 100644 (file)
@@ -319,9 +319,14 @@ bld.SAMBA_SUBSYSTEM('NDR_WINSREPL',
        )
 
 
+bld.SAMBA_SUBSYSTEM('NDR_IDMAP',
+       source='../../librpc/gen_ndr/ndr_idmap.c',
+       public_deps='LIBNDR NDR_STANDARD'
+       )
+
 bld.SAMBA_SUBSYSTEM('NDR_WINBIND',
        source='gen_ndr/ndr_winbind.c',
-       public_deps='LIBNDR NDR_STANDARD'
+       public_deps='NDR_IDMAP LIBNDR NDR_STANDARD'
        )