build: moved libds/common/flag_mapping.c into a common subsystem
authorAndrew Tridgell <tridge@samba.org>
Thu, 24 Feb 2011 00:23:53 +0000 (11:23 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 24 Feb 2011 00:57:48 +0000 (11:57 +1100)
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 files changed:
libds/common/flag_mapping.c
libds/common/flag_mapping.h [new file with mode: 0644]
libds/common/wscript_build [new file with mode: 0644]
source3/wscript_build
source4/cldap_server/netlogon.c
source4/dsdb/common/util.c
source4/dsdb/common/util_samr.c
source4/dsdb/samdb/ldb_modules/samldb.c
source4/dsdb/wscript_build
source4/rpc_server/lsa/lsa_lookup.c
source4/rpc_server/samr/dcesrv_samr.c
wscript_build

index 99421ed533fa1fb8c01b73938dc59ae78ef91c33..471afd06f9e32c10dc25ce5864e149a3f1c30f2d 100644 (file)
@@ -23,6 +23,7 @@
 #include "includes.h"
 #include "librpc/gen_ndr/samr.h"
 #include "../libds/common/flags.h"
+#include "flag_mapping.h"
 
 /*
 translated the ACB_CTRL Flags to UserFlags (userAccountControl)
diff --git a/libds/common/flag_mapping.h b/libds/common/flag_mapping.h
new file mode 100644 (file)
index 0000000..4b1cc3b
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef __LIBDS_COMMON_FLAG_MAPPING_H__
+#define __LIBDS_COMMON_FLAG_MAPPING_H__
+
+/* The following definitions come from flag_mapping.c  */
+
+uint32_t ds_acb2uf(uint32_t acb);
+uint32_t ds_uf2acb(uint32_t uf);
+uint32_t ds_uf2atype(uint32_t uf);
+uint32_t ds_gtype2atype(uint32_t gtype);
+enum lsa_SidType ds_atype_map(uint32_t atype);
+uint32_t ds_uf2prim_group_rid(uint32_t uf);
+
+#endif /* __LIBDS_COMMON_FLAG_MAPPING_H__ */
diff --git a/libds/common/wscript_build b/libds/common/wscript_build
new file mode 100644 (file)
index 0000000..46787db
--- /dev/null
@@ -0,0 +1,3 @@
+
+bld.SAMBA_SUBSYSTEM('flag_mapping',
+                    source='flag_mapping.c')
index 7522884949b9fba73994c4b16a34a51f2c5dfac2..c7d84a20f7eb7f3df9da70ea6b7ad141376158ef 100644 (file)
@@ -63,7 +63,6 @@ LIB_SRC = '''
           lib/interface.c lib/pidfile.c
           lib/system.c lib/sendfile.c lib/recvfile.c lib/time.c
           lib/username.c
-          ../libds/common/flag_mapping.c
           lib/access.c lib/smbrun.c
           lib/bitmap.c lib/dprintf.c ${UTIL_REG_SRC}
           lib/wins_srv.c
@@ -764,7 +763,7 @@ bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
 
 bld.SAMBA3_LIBRARY('samba3core',
                    source=LIB_SRC,
-                   deps='LIBCRYPTO ndr ndr-util security NDR_SECURITY charset NDR_MESSAGING LIBASYNC_REQ tdb-wrap3 samba-util3 CHARSET3 UTIL_TDB SAMBA_VERSION krb5',
+                   deps='LIBCRYPTO ndr ndr-util security NDR_SECURITY charset NDR_MESSAGING LIBASYNC_REQ tdb-wrap3 samba-util3 CHARSET3 UTIL_TDB SAMBA_VERSION krb5 flag_mapping',
                    private_library=True,
                    vars=locals())
 
@@ -1360,6 +1359,7 @@ bld.RECURSE('../lib/util')
 bld.RECURSE('../lib/tevent')
 bld.RECURSE('../lib/tsocket')
 bld.RECURSE('../lib/zlib')
+bld.RECURSE('../libds/common')
 bld.RECURSE('../nsswitch')
 bld.RECURSE('../nsswitch/libwbclient')
 bld.RECURSE('auth')
@@ -1372,6 +1372,7 @@ bld.RECURSE('passdb')
 bld.RECURSE('rpc_server')
 bld.RECURSE('winbindd')
 
+
 bld.ENFORCE_GROUP_ORDERING()
 bld.CHECK_PROJECT_RULES()
 
index 4d3ef48a7983a5950791bf65f60fe12cd4356313..baac3c8dff5633b5741fcb7a052e277cb50f4e1a 100644 (file)
@@ -36,6 +36,7 @@
 #include "lib/socket/netif.h"
 #include "param/param.h"
 #include "../lib/tsocket/tsocket.h"
+#include "libds/common/flag_mapping.h"
 
 /*
   fill in the cldap netlogon union for a given version
index 148a77d153477dbc827349145cb5457a55ec0099..e711a324f8a3cd1d5102e7b6b29ec5d900c07e76 100644 (file)
@@ -43,6 +43,7 @@
 #include "dsdb/common/util.h"
 #include "lib/socket/socket.h"
 #include "librpc/gen_ndr/irpc.h"
+#include "libds/common/flag_mapping.h"
 
 /*
   search the sam for the specified attributes in a specific domain, filter on
index 621c9be35e4b3907876d29ccd008ecddae499579..02b412e433bd4194a6070a82571b70895432ac69 100644 (file)
@@ -28,6 +28,8 @@
 #include "../libds/common/flags.h"
 #include "libcli/security/security.h"
 
+#include "libds/common/flag_mapping.h"
+
 /* Add a user, SAMR style, including the correct transaction
  * semantics.  Used by the SAMR server and by pdb_samba4 */
 NTSTATUS dsdb_add_user(struct ldb_context *ldb,
index 710ce8bf3a00d1c3866ffdbe1a310f1fa9ba69d2..b11fc554b55be1d9434763caa4a6473c4f8f13bf 100644 (file)
@@ -39,6 +39,7 @@
 #include "librpc/gen_ndr/ndr_security.h"
 #include "ldb_wrap.h"
 #include "param/param.h"
+#include "libds/common/flag_mapping.h"
 
 struct samldb_ctx;
 
index f595f3c26feefb0904b30b3d28f64a4699303aaf..364edf14b2bac0e643858d083741a1eefcb3e57c 100644 (file)
@@ -13,10 +13,10 @@ bld.SAMBA_LIBRARY('samdb',
 
 
 bld.SAMBA_LIBRARY('samdb-common',
-       source='common/util.c common/util_groups.c common/util_samr.c common/dsdb_dn.c common/dsdb_access.c ../../libds/common/flag_mapping.c',
+       source='common/util.c common/util_groups.c common/util_samr.c common/dsdb_dn.c common/dsdb_access.c',
        autoproto='common/proto.h',
        private_library=True,
-       deps='ldb NDR_DRSBLOBS UTIL_LDB LIBCLI_AUTH samba-hostconfig samba_socket LIBCLI_LDAP_NDR'
+       deps='ldb NDR_DRSBLOBS UTIL_LDB LIBCLI_AUTH samba-hostconfig samba_socket LIBCLI_LDAP_NDR flag_mapping'
        )
 
 
index 73ea72ca6aa27ed418c505e2962ef3282d3aa379..3d472812d8cef2c646d0184fdc7123f20dbd92fc 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "rpc_server/lsa/lsa.h"
+#include "libds/common/flag_mapping.h"
 
 static const struct {
        const char *domain;
index a9a72a74007f2a2717055873f660a9b37efcb5dd..25e57278d34e58602fad2b887303bf21b5895575 100644 (file)
@@ -39,6 +39,7 @@
 #include "../lib/util/util_ldb.h"
 #include "param/param.h"
 #include "lib/util/tsort.h"
+#include "libds/common/flag_mapping.h"
 
 /* these query macros make samr_Query[User|Group|Alias]Info a bit easier to read */
 
index dd905f8063a20cd5ec50b7d64bcf7cfe1cbd5d4a..a35ac9b496867014aff06d90e314efbcb2c89ba8 100644 (file)
@@ -105,6 +105,7 @@ bld.RECURSE('source4/setup')
 bld.RECURSE('source4/scripting')
 bld.RECURSE('pidl')
 bld.RECURSE('lib')
+bld.RECURSE('libds/common')
 if bld.env.enable_s3build:
     bld.RECURSE('source3')