summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-02-24 11:23:53 +1100
committerAndrew Tridgell <tridge@samba.org>2011-02-24 11:57:48 +1100
commit94c04b10db5032d83c21ea6eb8665bf930e81a9f (patch)
tree0ed6684221fb43ea2897ba2826bbecc9a024ac62
parent8dbe665a0c0870aeb298b8f0d5a8a1a05e21a719 (diff)
downloadsamba-94c04b10db5032d83c21ea6eb8665bf930e81a9f.tar.gz
samba-94c04b10db5032d83c21ea6eb8665bf930e81a9f.tar.bz2
samba-94c04b10db5032d83c21ea6eb8665bf930e81a9f.zip
build: moved libds/common/flag_mapping.c into a common subsystem
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--libds/common/flag_mapping.c1
-rw-r--r--libds/common/flag_mapping.h13
-rw-r--r--libds/common/wscript_build3
-rw-r--r--source3/wscript_build5
-rw-r--r--source4/cldap_server/netlogon.c1
-rw-r--r--source4/dsdb/common/util.c1
-rw-r--r--source4/dsdb/common/util_samr.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c1
-rw-r--r--source4/dsdb/wscript_build4
-rw-r--r--source4/rpc_server/lsa/lsa_lookup.c1
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c1
-rw-r--r--wscript_build1
12 files changed, 30 insertions, 4 deletions
diff --git a/libds/common/flag_mapping.c b/libds/common/flag_mapping.c
index 99421ed533..471afd06f9 100644
--- a/libds/common/flag_mapping.c
+++ b/libds/common/flag_mapping.c
@@ -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
index 0000000000..4b1cc3b05f
--- /dev/null
+++ b/libds/common/flag_mapping.h
@@ -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
index 0000000000..46787db19b
--- /dev/null
+++ b/libds/common/wscript_build
@@ -0,0 +1,3 @@
+
+bld.SAMBA_SUBSYSTEM('flag_mapping',
+ source='flag_mapping.c')
diff --git a/source3/wscript_build b/source3/wscript_build
index 7522884949..c7d84a20f7 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -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()
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index 4d3ef48a79..baac3c8dff 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -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
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 148a77d153..e711a324f8 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -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
diff --git a/source4/dsdb/common/util_samr.c b/source4/dsdb/common/util_samr.c
index 621c9be35e..02b412e433 100644
--- a/source4/dsdb/common/util_samr.c
+++ b/source4/dsdb/common/util_samr.c
@@ -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,
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 710ce8bf3a..b11fc554b5 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -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;
diff --git a/source4/dsdb/wscript_build b/source4/dsdb/wscript_build
index f595f3c26f..364edf14b2 100644
--- a/source4/dsdb/wscript_build
+++ b/source4/dsdb/wscript_build
@@ -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'
)
diff --git a/source4/rpc_server/lsa/lsa_lookup.c b/source4/rpc_server/lsa/lsa_lookup.c
index 73ea72ca6a..3d472812d8 100644
--- a/source4/rpc_server/lsa/lsa_lookup.c
+++ b/source4/rpc_server/lsa/lsa_lookup.c
@@ -21,6 +21,7 @@
*/
#include "rpc_server/lsa/lsa.h"
+#include "libds/common/flag_mapping.h"
static const struct {
const char *domain;
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index a9a72a7400..25e57278d3 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -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 */
diff --git a/wscript_build b/wscript_build
index dd905f8063..a35ac9b496 100644
--- a/wscript_build
+++ b/wscript_build
@@ -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')