From 668fd9d2962888bfceb4748e64e6057d1baf7daf Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 27 Dec 2015 22:07:59 +0000 Subject: [PATCH 01/13] Add private_headers flag to SAMBA_*() functions. While this argument is correctly ignored, it does mean that we can associate private headers with specific subsystems/libraries. Signed-Off-By: Jelmer Vernooij Reviewed-By: Andrew Bartlett --- buildtools/wafsamba/wafsamba.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 8af8455..3b05916 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -106,6 +106,7 @@ def SAMBA_LIBRARY(bld, libname, source, includes='', public_headers=None, public_headers_install=True, + private_headers=None, header_path=None, pc_files=None, vnum=None, @@ -187,6 +188,7 @@ def SAMBA_LIBRARY(bld, libname, source, includes = includes, public_headers = public_headers, public_headers_install = public_headers_install, + private_headers= private_headers, header_path = header_path, cflags = cflags, group = subsystem_group, @@ -337,6 +339,7 @@ def SAMBA_BINARY(bld, binname, source, deps='', includes='', public_headers=None, + private_headers=None, header_path=None, modules=None, ldflags=None, @@ -539,6 +542,7 @@ def SAMBA_SUBSYSTEM(bld, modname, source, includes='', public_headers=None, public_headers_install=True, + private_headers=None, header_path=None, cflags='', cflags_end=None, @@ -631,6 +635,7 @@ def SAMBA_GENERATOR(bld, name, rule, source='', target='', group='generators', enabled=True, public_headers=None, public_headers_install=True, + private_headers=None, header_path=None, vars=None, dep_vars=[], From 3fb04d4b8b73ada5fe72dca35fe1ceca47ced957 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 28 Dec 2015 00:04:02 +0000 Subject: [PATCH 02/13] Error when private libraries have public headers. Signed-Off-By: Jelmer Vernooij Reviewed-By: Andrew Bartlett --- buildtools/wafsamba/wafsamba.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 3b05916..4a47dbf 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -146,8 +146,12 @@ def SAMBA_LIBRARY(bld, libname, source, if pyembed and bld.env['IS_EXTRA_PYTHON']: public_headers = pc_files = None + if private_library and public_headers: + raise Utils.WafError("private library '%s' must not have public header files" % + libname) + if LIB_MUST_BE_PRIVATE(bld, libname): - private_library=True + private_library = True if not enabled: SET_TARGET_TYPE(bld, libname, 'DISABLED') From 4e11cdbdf02634ad7b6b47b63b1d38bf46e1c4e9 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 28 Dec 2015 18:02:06 +0000 Subject: [PATCH 03/13] Make gensec private, for now. Signed-Off-By: Jelmer Vernooij Reviewed-By: Andrew Bartlett --- auth/gensec/gensec.pc.in | 11 ----------- auth/gensec/wscript_build | 5 ++--- 2 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 auth/gensec/gensec.pc.in diff --git a/auth/gensec/gensec.pc.in b/auth/gensec/gensec.pc.in deleted file mode 100644 index f32226d..0000000 --- a/auth/gensec/gensec.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ -modulesdir=${prefix}/modules/gensec - -Name: gensec -Description: Generic Security Library -Version: @PACKAGE_VERSION@ -Libs: @LIB_RPATH@ -L${libdir} -lgensec -Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 diff --git a/auth/gensec/wscript_build b/auth/gensec/wscript_build index e4c4a08..5ecd280 100755 --- a/auth/gensec/wscript_build +++ b/auth/gensec/wscript_build @@ -1,12 +1,11 @@ #!/usr/bin/env python bld.SAMBA_LIBRARY('gensec', source='gensec.c gensec_start.c gensec_util.c', - pc_files='gensec.pc', autoproto='gensec_toplevel_proto.h', public_deps='tevent-util samba-util errors auth_system_session samba-modules gensec_util asn1util', - public_headers='gensec.h', + private_headers='gensec.h', deps='com_err', - vnum='0.0.1' + private_library=True, ) bld.SAMBA_MODULE('gensec_spnego', From 817e6bd73bf1f1742eaad77e02ab2b3d26427f4e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 28 Dec 2015 18:02:48 +0000 Subject: [PATCH 04/13] Make libtorture private, for now. Signed-Off-By: Jelmer Vernooij Reviewed-By: Andrew Bartlett --- lib/torture/torture.pc.in | 12 ------------ lib/torture/wscript_build | 11 +++++------ 2 files changed, 5 insertions(+), 18 deletions(-) delete mode 100644 lib/torture/torture.pc.in diff --git a/lib/torture/torture.pc.in b/lib/torture/torture.pc.in deleted file mode 100644 index e0421b0..0000000 --- a/lib/torture/torture.pc.in +++ /dev/null @@ -1,12 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ -modulesdir=${prefix}/modules/torture - -Name: torture -Description: Samba torture (test) suite -Requires: talloc -Version: @PACKAGE_VERSION@ -Libs: @LIB_RPATH@ -L${libdir} -ltorture -Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 diff --git a/lib/torture/wscript_build b/lib/torture/wscript_build index ad047e2..2c0064e 100644 --- a/lib/torture/wscript_build +++ b/lib/torture/wscript_build @@ -1,9 +1,8 @@ #!/usr/bin/env python bld.SAMBA_LIBRARY('torture', - source='torture.c subunit.c simple.c', - vnum='0.0.1', - pc_files='torture.pc', - public_deps='samba-hostconfig samba-util errors talloc tevent', - public_headers='torture.h' - ) + private_library=True, + source='torture.c subunit.c simple.c', + public_deps='samba-hostconfig samba-util errors talloc tevent', + private_headers='torture.h' + ) From 357f576daaa45fb15aa60eb9bd6b347cacd48d7d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 28 Dec 2015 18:03:18 +0000 Subject: [PATCH 05/13] Make libregistry private, for now. Signed-Off-By: Jelmer Vernooij Reviewed-By: Andrew Bartlett --- source4/lib/registry/registry.pc.in | 12 ------------ source4/lib/registry/wscript_build | 5 ++--- 2 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 source4/lib/registry/registry.pc.in diff --git a/source4/lib/registry/registry.pc.in b/source4/lib/registry/registry.pc.in deleted file mode 100644 index e923931..0000000 --- a/source4/lib/registry/registry.pc.in +++ /dev/null @@ -1,12 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: registry -Description: Windows-style registry library -Requires: talloc -Requires.private: ldb -Version: @PACKAGE_VERSION@ -Libs: @LIB_RPATH@ -L${libdir} -lregistry -Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 diff --git a/source4/lib/registry/wscript_build b/source4/lib/registry/wscript_build index 495969a..c558b22 100644 --- a/source4/lib/registry/wscript_build +++ b/source4/lib/registry/wscript_build @@ -12,10 +12,9 @@ bld.SAMBA_SUBSYSTEM('TDR_REGF', bld.SAMBA_LIBRARY('registry', source='interface.c util.c samba.c patchfile_dotreg.c patchfile_preg.c patchfile.c regf.c hive.c local.c ldb.c rpc.c', - pc_files='registry.pc', public_deps='dcerpc samba-util TDR_REGF ldb RPC_NDR_WINREG ldbsamba util_reg', - public_headers='registry.h', - vnum='0.0.1' + private_headers='registry.h', + private_library=True ) From 65081ec4ef0b3c02ebba2f2e683abbf56b35bdb4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 28 Dec 2015 18:52:19 +0000 Subject: [PATCH 06/13] Remove public library dcerpc-atsvc. Signed-Off-By: Jelmer Vernooij Reviewed-By: Andrew Bartlett --- source4/librpc/dcerpc_atsvc.pc.in | 11 ----------- source4/librpc/wscript_build | 18 ++---------------- source4/torture/wscript_build | 4 ++-- 3 files changed, 4 insertions(+), 29 deletions(-) delete mode 100644 source4/librpc/dcerpc_atsvc.pc.in diff --git a/source4/librpc/dcerpc_atsvc.pc.in b/source4/librpc/dcerpc_atsvc.pc.in deleted file mode 100644 index f781f23..0000000 --- a/source4/librpc/dcerpc_atsvc.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: dcerpc_atsvc -Description: DCE/RPC client library - ATSVC -Requires.private: dcerpc ndr -Version: @PACKAGE_VERSION@ -Libs: @LIB_RPATH@ -L${libdir} -ldcerpc-atsvc -Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 diff --git a/source4/librpc/wscript_build b/source4/librpc/wscript_build index 781611e..5100ae8 100755 --- a/source4/librpc/wscript_build +++ b/source4/librpc/wscript_build @@ -99,17 +99,6 @@ bld.SAMBA_LIBRARY('dcerpc-samr', header_path='gen_ndr' ) - -bld.SAMBA_LIBRARY('dcerpc-atsvc', - source='', - pc_files='dcerpc_atsvc.pc', - vnum='0.0.1', - public_deps='dcerpc ndr-standard RPC_NDR_ATSVC', - public_headers='../../librpc/gen_ndr/ndr_atsvc_c.h', - header_path='gen_ndr' - ) - - bld.SAMBA_SUBSYSTEM('RPC_NDR_WINSIF', source='gen_ndr/ndr_winsif_c.c', public_deps='dcerpc NDR_WINSIF' @@ -125,10 +114,7 @@ bld.SAMBA_LIBRARY('dcerpc', deps='samba_socket LIBCLI_RESOLVE LIBCLI_SMB LIBCLI_SMB2 ndr NDR_DCERPC RPC_NDR_EPMAPPER NDR_SCHANNEL RPC_NDR_NETLOGON RPC_NDR_MGMT gensec LIBCLI_AUTH smbclient-raw LP_RESOLVE tevent-util dcerpc-binding param_options http', autoproto='rpc/dcerpc_proto.h', public_deps='samba-credentials tevent talloc', - public_headers='''rpc/dcerpc.h ../../librpc/gen_ndr/mgmt.h - ../../librpc/gen_ndr/ndr_mgmt.h ../../librpc/gen_ndr/ndr_mgmt_c.h - ../../librpc/gen_ndr/epmapper.h ../../librpc/gen_ndr/ndr_epmapper.h - ../../librpc/gen_ndr/ndr_epmapper_c.h''', + public_headers='''rpc/dcerpc.h''', # It's very important to keep this form of construction # it force the sambawaf extension to put everything that match the first element # (*gen_ndr*) into the dir named by the second element (gen_ndr). @@ -220,7 +206,7 @@ bld.SAMBA_PYTHON('python_mgmt', bld.SAMBA_PYTHON('python_atsvc', source='../../librpc/gen_ndr/py_atsvc.c', - deps='dcerpc-atsvc pytalloc-util pyrpc_util', + deps='RPC_NDR_ATSVC pytalloc-util pyrpc_util', realname='samba/dcerpc/atsvc.so' ) diff --git a/source4/torture/wscript_build b/source4/torture/wscript_build index d189b62..6cf255b 100755 --- a/source4/torture/wscript_build +++ b/source4/torture/wscript_build @@ -140,7 +140,7 @@ bld.SAMBA_MODULE('torture_rpc', RPC_NDR_ECHO RPC_NDR_SVCCTL RPC_NDR_NETLOGON - dcerpc-atsvc + RPC_NDR_ATSVC RPC_NDR_DRSUAPI RPC_NDR_LSA RPC_NDR_EPMAPPER @@ -286,7 +286,7 @@ bld.SAMBA_SUBSYSTEM('torturemain', bld.SAMBA_BINARY('smbtorture', source=[], manpages='man/smbtorture.1', - public_headers='smbtorture.h', + private_headers='smbtorture.h', deps='torturemain torture popt POPT_SAMBA POPT_CREDENTIALS dcerpc LIBCLI_SMB SMBREADLINE ' + TORTURE_MODULES, pyembed=True ) From 209a8b6f547a2ba8f84e0f6c6661df102b5a2843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Mon, 4 Jan 2016 01:07:27 +0000 Subject: [PATCH 07/13] time_basic.h: Remove unnecessary dependency on replace.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Forward declare struct timeval Signed-off-by: Jelmer Vernooij Reviewed-By: Andrew Bartlett --- lib/util/time_basic.c | 1 + lib/util/time_basic.h | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util/time_basic.c b/lib/util/time_basic.c index 8113bb5..095236b 100644 --- a/lib/util/time_basic.c +++ b/lib/util/time_basic.c @@ -22,6 +22,7 @@ */ #include "replace.h" +#include "system/time.h" #include "lib/util/time_basic.h" /** diff --git a/lib/util/time_basic.h b/lib/util/time_basic.h index d485399..e04cf1c 100644 --- a/lib/util/time_basic.h +++ b/lib/util/time_basic.h @@ -24,8 +24,7 @@ #ifndef _SAMBA_TIME_BASIC_H_ #define _SAMBA_TIME_BASIC_H_ -#include "replace.h" -#include "system/time.h" +struct timeval; /** a gettimeofday wrapper From 13949768b7d54e793518891e44f79f2167f169a4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 28 Dec 2015 18:57:26 +0000 Subject: [PATCH 08/13] ldb: Only set public headers field when installing as a public library. Signed-Off-By: Jelmer Vernooij Reviewed-By: Andrew Bartlett --- lib/ldb/wscript | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/ldb/wscript b/lib/ldb/wscript index 6ff0c7c..b7dd4aa 100755 --- a/lib/ldb/wscript +++ b/lib/ldb/wscript @@ -127,7 +127,7 @@ def build(bld): bld.SAMBA_LIBRARY(name, deps='ldb', source='pyldb_util.c', - public_headers='pyldb.h', + public_headers=('' if private_library else 'pyldb.h'), public_headers_install=not private_library, vnum=VERSION, private_library=private_library, @@ -159,12 +159,14 @@ def build(bld): abi_match = '!ldb_*module_ops !ldb_*backend_ops ldb_*' + ldb_headers = ('include/ldb.h include/ldb_errors.h ' + 'include/ldb_module.h include/ldb_handlers.h') + bld.SAMBA_LIBRARY('ldb', COMMON_SRC + ' ' + LDB_MAP_SRC, deps='tevent LIBLDB_MAIN replace', includes='include', - public_headers='include/ldb.h include/ldb_errors.h '\ - 'include/ldb_module.h include/ldb_handlers.h', + public_headers=('' if private_library else ldb_headers), public_headers_install=not private_library, pc_files='ldb.pc', vnum=VERSION, From b8bfce1ff1dde0002b455080c177d23bb525b4cd Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 28 Dec 2015 19:01:54 +0000 Subject: [PATCH 09/13] Avoid including libds/common/roles.h in public loadparm.h header. Signed-Off-By: Jelmer Vernooij Reviewed-By: Andrew Bartlett --- auth/ntlmssp/gensec_ntlmssp_server.c | 1 + dfs_server/dfs_server_ad.c | 1 + lib/param/loadparm.c | 1 + lib/param/param.h | 2 -- lib/param/param_table.c | 1 + lib/param/util.c | 1 + libcli/auth/netlogon_creds_cli.c | 1 + libds/common/wscript_build | 6 +++--- source4/auth/ntlm/auth.c | 1 + source4/auth/ntlm/auth_sam.c | 1 + source4/cldap_server/cldap_server.c | 1 + source4/dns_server/dns_server.c | 1 + source4/dsdb/dns/dns_update.c | 1 + source4/dsdb/kcc/kcc_service.c | 1 + source4/dsdb/repl/drepl_service.c | 1 + source4/echo_server/echo_server.c | 1 + source4/kdc/kdc.c | 1 + source4/ldap_server/ldap_server.c | 1 + source4/nbt_server/dgram/netlogon.c | 1 + source4/nbt_server/register.c | 1 + source4/param/tests/loadparm.c | 1 + source4/rpc_server/backupkey/dcesrv_backupkey_heimdal.c | 1 + source4/rpc_server/common/server_info.c | 1 + source4/rpc_server/lsa/dcesrv_lsa.c | 1 + source4/rpc_server/samr/dcesrv_samr.h | 1 + source4/smbd/server.c | 1 + 26 files changed, 27 insertions(+), 5 deletions(-) diff --git a/auth/ntlmssp/gensec_ntlmssp_server.c b/auth/ntlmssp/gensec_ntlmssp_server.c index 69c56fb..03d539b 100644 --- a/auth/ntlmssp/gensec_ntlmssp_server.c +++ b/auth/ntlmssp/gensec_ntlmssp_server.c @@ -34,6 +34,7 @@ #include "auth/gensec/gensec_internal.h" #include "auth/common_auth.h" #include "param/param.h" +#include "libds/common/roles.h" /** diff --git a/dfs_server/dfs_server_ad.c b/dfs_server/dfs_server_ad.c index 3a25dff..04aa7e0 100644 --- a/dfs_server/dfs_server_ad.c +++ b/dfs_server/dfs_server_ad.c @@ -27,6 +27,7 @@ #include "lib/tsocket/tsocket.h" #include "dfs_server/dfs_server_ad.h" #include "lib/util/util_net.h" +#include "libds/common/roles.h" #define MAX_DFS_RESPONSE 56*1024 /* 56 Kb */ diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 6a27dcb..e5e3a30 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -68,6 +68,7 @@ #include "libcli/smb/smb_constants.h" #include "tdb.h" #include "librpc/gen_ndr/nbt.h" +#include "libds/common/roles.h" #ifdef HAVE_HTTPCONNECTENCRYPT #include diff --git a/lib/param/param.h b/lib/param/param.h index 25be9dd..500f52d 100644 --- a/lib/param/param.h +++ b/lib/param/param.h @@ -39,8 +39,6 @@ struct smbsrv_connection; #define Auto (2) -#include "libds/common/roles.h" - struct loadparm_context; struct loadparm_service; struct smbcli_options; diff --git a/lib/param/param_table.c b/lib/param/param_table.c index 92a7619..1ebb2f8 100644 --- a/lib/param/param_table.c +++ b/lib/param/param_table.c @@ -32,6 +32,7 @@ #include "lib/param/loadparm.h" #include "lib/param/param_global.h" #include "libcli/smb/smb_constants.h" +#include "libds/common/roles.h" #ifndef N_ #define N_(x) x diff --git a/lib/param/util.c b/lib/param/util.c index 7e4232d..bf9e0b8 100644 --- a/lib/param/util.c +++ b/lib/param/util.c @@ -28,6 +28,7 @@ #include "system/filesys.h" #include "system/dir.h" #include "param/param.h" +#include "libds/common/roles.h" /** * @file diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c index 1ea2f75..7c867cf 100644 --- a/libcli/auth/netlogon_creds_cli.c +++ b/libcli/auth/netlogon_creds_cli.c @@ -35,6 +35,7 @@ #include "netlogon_creds_cli.h" #include "source3/include/messages.h" #include "source3/include/g_lock.h" +#include "libds/common/roles.h" struct netlogon_creds_cli_locked_state; diff --git a/libds/common/wscript_build b/libds/common/wscript_build index d7f8acb..3da3be2 100644 --- a/libds/common/wscript_build +++ b/libds/common/wscript_build @@ -2,6 +2,6 @@ bld.SAMBA_LIBRARY('flag_mapping', public_deps='talloc replace', source='flag_mapping.c', - private_library=True, - public_headers='roles.h', - deps='samba-util') + private_library=True, + private_headers='roles.h', + deps='samba-util') diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c index 1d1bc5e..4627c3d 100644 --- a/source4/auth/ntlm/auth.c +++ b/source4/auth/ntlm/auth.c @@ -32,6 +32,7 @@ #include "system/kerberos.h" #include "auth/kerberos/kerberos.h" #include "auth/kerberos/kerberos_util.h" +#include "libds/common/roles.h" static NTSTATUS auth_generate_session_info_wrapper(struct auth4_context *auth_context, TALLOC_CTX *mem_ctx, diff --git a/source4/auth/ntlm/auth_sam.c b/source4/auth/ntlm/auth_sam.c index 43c7a3d..096359c 100644 --- a/source4/auth/ntlm/auth_sam.c +++ b/source4/auth/ntlm/auth_sam.c @@ -34,6 +34,7 @@ #include "librpc/gen_ndr/ndr_irpc_c.h" #include "lib/messaging/irpc.h" #include "libcli/auth/libcli_auth.h" +#include "libds/common/roles.h" NTSTATUS auth_sam_init(void); diff --git a/source4/cldap_server/cldap_server.c b/source4/cldap_server/cldap_server.c index 682d591..ced2a20 100644 --- a/source4/cldap_server/cldap_server.c +++ b/source4/cldap_server/cldap_server.c @@ -34,6 +34,7 @@ #include "auth/auth.h" #include "param/param.h" #include "../lib/tsocket/tsocket.h" +#include "libds/common/roles.h" NTSTATUS server_service_cldapd_init(void); diff --git a/source4/dns_server/dns_server.c b/source4/dns_server/dns_server.c index 45d28a7..a2dc151 100644 --- a/source4/dns_server/dns_server.c +++ b/source4/dns_server/dns_server.c @@ -47,6 +47,7 @@ #include "auth/credentials/credentials.h" #include "librpc/gen_ndr/ndr_irpc.h" #include "lib/messaging/irpc.h" +#include "libds/common/roles.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_DNS diff --git a/source4/dsdb/dns/dns_update.c b/source4/dsdb/dns/dns_update.c index 972459a..292a825 100644 --- a/source4/dsdb/dns/dns_update.c +++ b/source4/dsdb/dns/dns_update.c @@ -39,6 +39,7 @@ #include "libcli/composite/composite.h" #include "libcli/security/dom_sid.h" #include "librpc/gen_ndr/ndr_irpc.h" +#include "libds/common/roles.h" NTSTATUS server_service_dnsupdate_init(void); diff --git a/source4/dsdb/kcc/kcc_service.c b/source4/dsdb/kcc/kcc_service.c index 2c1a922..985692f 100644 --- a/source4/dsdb/kcc/kcc_service.c +++ b/source4/dsdb/kcc/kcc_service.c @@ -34,6 +34,7 @@ #include "librpc/gen_ndr/ndr_drsuapi.h" #include "librpc/gen_ndr/ndr_drsblobs.h" #include "param/param.h" +#include "libds/common/roles.h" /* establish system creds diff --git a/source4/dsdb/repl/drepl_service.c b/source4/dsdb/repl/drepl_service.c index bd33377..2176da2 100644 --- a/source4/dsdb/repl/drepl_service.c +++ b/source4/dsdb/repl/drepl_service.c @@ -33,6 +33,7 @@ #include "librpc/gen_ndr/ndr_drsblobs.h" #include "librpc/gen_ndr/ndr_irpc.h" #include "param/param.h" +#include "libds/common/roles.h" /** * Call-back data for _drepl_replica_sync_done_cb() diff --git a/source4/echo_server/echo_server.c b/source4/echo_server/echo_server.c index eb049c5..a3e6974 100644 --- a/source4/echo_server/echo_server.c +++ b/source4/echo_server/echo_server.c @@ -31,6 +31,7 @@ #include "libcli/util/ntstatus.h" /* tsocket-related functions */ #include "lib/tsocket/tsocket.h" +#include "libds/common/roles.h" NTSTATUS server_service_echo_init(void); diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c index bb476e1..4a9341f 100644 --- a/source4/kdc/kdc.c +++ b/source4/kdc/kdc.c @@ -35,6 +35,7 @@ #include "kdc/pac-glue.h" #include "dsdb/samdb/samdb.h" #include "auth/session.h" +#include "libds/common/roles.h" NTSTATUS server_service_kdc_init(void); diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index d849ed3..3afbcdb 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -46,6 +46,7 @@ #include "../lib/tsocket/tsocket.h" #include "../lib/util/tevent_ntstatus.h" #include "../libcli/util/tstream.h" +#include "libds/common/roles.h" static void ldapsrv_terminate_connection_done(struct tevent_req *subreq); diff --git a/source4/nbt_server/dgram/netlogon.c b/source4/nbt_server/dgram/netlogon.c index 0e5294c..c88ffb5 100644 --- a/source4/nbt_server/dgram/netlogon.c +++ b/source4/nbt_server/dgram/netlogon.c @@ -31,6 +31,7 @@ #include "dsdb/samdb/ldb_modules/util.h" #include "libcli/security/security.h" #include "nbt_server/dgram/proto.h" +#include "libds/common/roles.h" /* reply to a GETDC request diff --git a/source4/nbt_server/register.c b/source4/nbt_server/register.c index f5517b2..07f4e20 100644 --- a/source4/nbt_server/register.c +++ b/source4/nbt_server/register.c @@ -30,6 +30,7 @@ #include "librpc/gen_ndr/ndr_nbt.h" #include "dsdb/samdb/samdb.h" #include "param/param.h" +#include "libds/common/roles.h" static void nbtd_start_refresh_timer(struct nbtd_iface_name *iname); diff --git a/source4/param/tests/loadparm.c b/source4/param/tests/loadparm.c index 87edc06..6a6e33e 100644 --- a/source4/param/tests/loadparm.c +++ b/source4/param/tests/loadparm.c @@ -22,6 +22,7 @@ #include "param/param.h" #include "torture/torture.h" #include "torture/local/proto.h" +#include "libds/common/roles.h" static bool test_create(struct torture_context *tctx) { diff --git a/source4/rpc_server/backupkey/dcesrv_backupkey_heimdal.c b/source4/rpc_server/backupkey/dcesrv_backupkey_heimdal.c index 7e733b0..90cc4fb 100644 --- a/source4/rpc_server/backupkey/dcesrv_backupkey_heimdal.c +++ b/source4/rpc_server/backupkey/dcesrv_backupkey_heimdal.c @@ -41,6 +41,7 @@ #include "../libcli/security/security.h" #include "librpc/gen_ndr/ndr_security.h" #include "lib/crypto/arcfour.h" +#include "libds/common/roles.h" #include #include #if defined(HAVE_GCRYPT_H) && !defined(HAVE_GNUTLS3) diff --git a/source4/rpc_server/common/server_info.c b/source4/rpc_server/common/server_info.c index afbbb23..e23b108 100644 --- a/source4/rpc_server/common/server_info.c +++ b/source4/rpc_server/common/server_info.c @@ -27,6 +27,7 @@ #include "param/param.h" #include "rpc_server/common/common.h" #include "rpc_server/common/share.h" +#include "libds/common/roles.h" /* Here are common server info functions used by some dcerpc server interfaces diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c index c40322f..c55f679 100644 --- a/source4/rpc_server/lsa/dcesrv_lsa.c +++ b/source4/rpc_server/lsa/dcesrv_lsa.c @@ -33,6 +33,7 @@ #include "libcli/security/session.h" #include "libcli/lsarpc/util_lsarpc.h" #include "lib/messaging/irpc.h" +#include "libds/common/roles.h" /* this type allows us to distinguish handle types diff --git a/source4/rpc_server/samr/dcesrv_samr.h b/source4/rpc_server/samr/dcesrv_samr.h index 8193ee6..261bd05 100644 --- a/source4/rpc_server/samr/dcesrv_samr.h +++ b/source4/rpc_server/samr/dcesrv_samr.h @@ -20,6 +20,7 @@ */ #include "param/param.h" +#include "libds/common/roles.h" /* this type allows us to distinguish handle types diff --git a/source4/smbd/server.c b/source4/smbd/server.c index cb1a20b..0b2adc4 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -44,6 +44,7 @@ #include "dynconfig/dynconfig.h" #include "lib/util/samba_modules.h" #include "nsswitch/winbind_client.h" +#include "libds/common/roles.h" /* recursively delete a directory tree From 885ca868101111543158e1180fe1e5de3ea85f77 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 28 Dec 2015 22:19:21 +0000 Subject: [PATCH 10/13] Make libcli-smb-raw private, for now. Signed-Off-By: Jelmer Vernooij Reviewed-By: Andrew Bartlett --- source4/libcli/ldap/wscript_build | 2 +- source4/libcli/raw/smbclient-raw.pc.in | 10 ---------- source4/libcli/smb2/wscript_build | 2 +- source4/libcli/wscript_build | 10 ++++------ source4/torture/raw/session.c | 2 +- 5 files changed, 7 insertions(+), 19 deletions(-) delete mode 100644 source4/libcli/raw/smbclient-raw.pc.in diff --git a/source4/libcli/ldap/wscript_build b/source4/libcli/ldap/wscript_build index f79cc2b..debec46 100644 --- a/source4/libcli/ldap/wscript_build +++ b/source4/libcli/ldap/wscript_build @@ -4,7 +4,7 @@ bld.SAMBA_LIBRARY('cli-ldap', source='ldap_client.c ldap_bind.c ldap_ildap.c ldap_controls.c', autoproto='ldap_proto.h', public_deps='errors tevent', - public_headers='libcli_ldap.h:ldap-util.h', + private_headers='libcli_ldap.h:ldap-util.h', deps='cli_composite LIBSAMBA_TSOCKET samba_socket NDR_SAMR LIBTLS ndr LP_RESOLVE gensec cli-ldap-common', private_library=True ) diff --git a/source4/libcli/raw/smbclient-raw.pc.in b/source4/libcli/raw/smbclient-raw.pc.in deleted file mode 100644 index 3c0c791..0000000 --- a/source4/libcli/raw/smbclient-raw.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: smbclient-raw -Description: SMB client -Version: @PACKAGE_VERSION@ -Libs: @LIB_RPATH@ -L${libdir} -lsmbclient-raw -Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1 diff --git a/source4/libcli/smb2/wscript_build b/source4/libcli/smb2/wscript_build index 02fc5b8..a15753f 100644 --- a/source4/libcli/smb2/wscript_build +++ b/source4/libcli/smb2/wscript_build @@ -5,6 +5,6 @@ bld.SAMBA_SUBSYSTEM('LIBCLI_SMB2', autoproto='smb2_proto.h', deps='tevent-util cli_smb_common', public_deps='smbclient-raw gensec samba-credentials tevent', - public_headers='smb2.h', + private_headers='smb2.h', ) diff --git a/source4/libcli/wscript_build b/source4/libcli/wscript_build index 59b0bc7..a3c072d 100755 --- a/source4/libcli/wscript_build +++ b/source4/libcli/wscript_build @@ -28,7 +28,7 @@ bld.SAMBA_SUBSYSTEM('LIBCLI_SMB_COMPOSITE', source='smb_composite/loadfile.c smb_composite/savefile.c smb_composite/connect.c smb_composite/sesssetup.c smb_composite/fetchfile.c smb_composite/appendacl.c smb_composite/fsinfo.c smb_composite/smb2.c', deps='LIBCLI_SMB2 tevent-util', public_deps='cli_composite samba-credentials gensec LIBCLI_RESOLVE tevent', - public_headers='smb_composite/smb_composite.h', + private_headers='smb_composite/smb_composite.h', ) bld.SAMBA_PYTHON('pysmb', @@ -75,7 +75,7 @@ bld.SAMBA_SUBSYSTEM('LIBCLI_FINDDCS', bld.SAMBA_SUBSYSTEM('LIBCLI_SMB', source='clireadwrite.c cliconnect.c clifile.c clilist.c clitrans2.c climessage.c clideltree.c', - public_headers='libcli.h:smb_cli.h', + private_headers='libcli.h:smb_cli.h', public_deps='smbclient-raw errors LIBCLI_AUTH LIBCLI_SMB_COMPOSITE cli-nbt samba-security LIBCLI_RESOLVE LIBCLI_DGRAM LIBCLI_SMB2 LIBCLI_FINDDCS samba_socket' ) @@ -85,10 +85,8 @@ bld.SAMBA_LIBRARY('smbclient-raw', autoproto='raw/raw_proto.h', public_deps='samba_socket LIBPACKET LIBCRYPTO', deps='cli_composite LIBCLI_RESOLVE samba-security ndr samba-util errors charset talloc LIBCLI_SMB_COMPOSITE tevent cli_smb_common', - public_headers='raw/request.h:smb_request.h raw/signing.h:smb_raw_signing.h raw/libcliraw.h:smb_cliraw.h raw/interfaces.h:smb_raw_interfaces.h raw/smb.h:smb_raw.h raw/trans2.h:smb_raw_trans2.h', - private_library=False, - pc_files='raw/smbclient-raw.pc', - vnum='0.0.1' + private_headers='raw/request.h:smb_request.h raw/signing.h:smb_raw_signing.h raw/libcliraw.h:smb_cliraw.h raw/interfaces.h:smb_raw_interfaces.h raw/smb.h:smb_raw.h raw/trans2.h:smb_raw_trans2.h', + private_library=True, ) bld.RECURSE('smb2') diff --git a/source4/torture/raw/session.c b/source4/torture/raw/session.c index 1937ef7..6938c88 100644 --- a/source4/torture/raw/session.c +++ b/source4/torture/raw/session.c @@ -19,7 +19,7 @@ #include "includes.h" #include "torture.h" -#include "smb_cli.h" +#include "libcli/libcli.h" #include "torture/raw/proto.h" #include "smb_composite/smb_composite.h" #include "lib/cmdline/popt_common.h" From 8a2485ec0c284fefb9e2c55f22ae2a24bd6cac42 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 28 Dec 2015 22:21:11 +0000 Subject: [PATCH 11/13] Add a new header file for functions in lib/util/util.c. This allows public headers to not include samba_util.h, but rather specific header files under lib/util. Signed-Off-By: Jelmer Vernooij Reviewed-By: Andrew Bartlett --- lib/util/samba_util.h | 31 ++--------------- lib/util/util.h | 53 ++++++++++++++++++++++++++++++ lib/util/wscript_build | 3 +- librpc/ndr/libndr.h | 6 ++-- librpc/ndr/ndr_basic.c | 1 + librpc/rpc/rpc_common.h | 1 + source3/lib/poll_funcs/poll_funcs_tevent.c | 2 +- source3/lib/unix_msg/unix_msg.c | 2 +- 8 files changed, 64 insertions(+), 35 deletions(-) create mode 100644 lib/util/util.h diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h index d2868d7..1f265e8 100644 --- a/lib/util/samba_util.h +++ b/lib/util/samba_util.h @@ -61,6 +61,8 @@ extern const char *panic_action; #include "fault.h" +#include "lib/util/util.h" + /** * Write backtrace to debug log */ @@ -583,35 +585,6 @@ _PUBLIC_ bool process_exists_by_pid(pid_t pid); _PUBLIC_ bool fcntl_lock(int fd, int op, off_t offset, off_t count, int type); /** - * Write dump of binary data to a callback - */ -void dump_data_cb(const uint8_t *buf, int len, - bool omit_zero_bytes, - void (*cb)(const char *buf, void *private_data), - void *private_data); - -/** - * Write dump of binary data to a FILE - */ -void dump_data_file(const uint8_t *buf, int len, bool omit_zero_bytes, - FILE *f); - -/** - * Write dump of binary data to the log file. - * - * The data is only written if the log level is at least level. - */ -_PUBLIC_ void dump_data(int level, const uint8_t *buf,int len); - -/** - * Write dump of binary data to the log file. - * - * The data is only written if the log level is at least level for - * debug class dbgc_class. - */ -_PUBLIC_ void dump_data_dbgc(int dbgc_class, int level, const uint8_t *buf, int len); - -/** * Write dump of binary data to the log file. * * The data is only written if the log level is at least level. diff --git a/lib/util/util.h b/lib/util/util.h new file mode 100644 index 0000000..5a0ce5c --- /dev/null +++ b/lib/util/util.h @@ -0,0 +1,53 @@ +/* + Unix SMB/CIFS implementation. + Utility functions for Samba + Copyright (C) Andrew Tridgell 1992-1999 + Copyright (C) Jelmer Vernooij 2005 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef __UTIL_SAMBA_UTIL_H__ +#define __UTIL_SAMBA_UTIL_H__ + +/** + * Write dump of binary data to a callback + */ +void dump_data_cb(const uint8_t *buf, int len, + bool omit_zero_bytes, + void (*cb)(const char *buf, void *private_data), + void *private_data); + +/** + * Write dump of binary data to a FILE + */ +void dump_data_file(const uint8_t *buf, int len, bool omit_zero_bytes, + FILE *f); + +/** + * Write dump of binary data to the log file. + * + * The data is only written if the log level is at least level. + */ +_PUBLIC_ void dump_data(int level, const uint8_t *buf,int len); + +/** + * Write dump of binary data to the log file. + * + * The data is only written if the log level is at least level for + * debug class dbgc_class. + */ +_PUBLIC_ void dump_data_dbgc(int dbgc_class, int level, const uint8_t *buf, int len); + +#endif diff --git a/lib/util/wscript_build b/lib/util/wscript_build index 226b15e..c8ee8a0 100755 --- a/lib/util/wscript_build +++ b/lib/util/wscript_build @@ -104,9 +104,8 @@ if not bld.env.SAMBA_UTIL_CORE_ONLY: server_id.c dprintf.c bitmap.c pidfile.c tevent_debug.c memcache.c''', deps='samba-util-core DYNCONFIG close-low-fd tini tiniparser genrand', - public_deps='talloc tevent execinfo pthread LIBCRYPTO charset util_setid systemd systemd-daemon', - public_headers='debug.h attr.h byteorder.h data_blob.h memory.h safe_string.h time.h talloc_stack.h xfile.h dlinklist.h samba_util.h string_wrappers.h idtree.h idtree_random.h blocking.h signal.h substitute.h fault.h genrand.h', + public_headers='debug.h attr.h byteorder.h data_blob.h memory.h safe_string.h time.h talloc_stack.h xfile.h string_wrappers.h idtree.h idtree_random.h blocking.h signal.h substitute.h fault.h genrand.h', header_path= [ ('dlinklist.h samba_util.h', '.'), ('*', 'util') ], local_include=False, vnum='0.0.1', diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h index 5c1487b..c6116ed 100644 --- a/librpc/ndr/libndr.h +++ b/librpc/ndr/libndr.h @@ -26,8 +26,10 @@ #define __LIBNDR_H__ #include -#include -#include "../lib/util/samba_util.h" /* for discard_const */ +#include "../lib/util/memory.h" /* for discard_const */ +#include "../lib/util/byteorder.h" +#include "../lib/util/data_blob.h" +#include "../lib/util/time.h" #include "../lib/util/charset/charset.h" /* diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c index ecc0f74..b532cc5 100644 --- a/librpc/ndr/ndr_basic.c +++ b/librpc/ndr/ndr_basic.c @@ -24,6 +24,7 @@ #include "librpc/ndr/libndr.h" #include "lib/util/util_net.h" #include "lib/util/debug.h" +#include "lib/util/util.h" #define NDR_SVAL(ndr, ofs) (NDR_BE(ndr)?RSVAL(ndr->data,ofs):SVAL(ndr->data,ofs)) #define NDR_IVAL(ndr, ofs) (NDR_BE(ndr)?RIVAL(ndr->data,ofs):IVAL(ndr->data,ofs)) diff --git a/librpc/rpc/rpc_common.h b/librpc/rpc/rpc_common.h index 28600c9..b03b9ff 100644 --- a/librpc/rpc/rpc_common.h +++ b/librpc/rpc/rpc_common.h @@ -23,6 +23,7 @@ #define __DEFAULT_LIBRPC_RPCCOMMON_H__ #include "gen_ndr/dcerpc.h" +#include "lib/util/attr.h" struct dcerpc_binding_handle; struct GUID; diff --git a/source3/lib/poll_funcs/poll_funcs_tevent.c b/source3/lib/poll_funcs/poll_funcs_tevent.c index 565cdaf..8fdf080 100644 --- a/source3/lib/poll_funcs/poll_funcs_tevent.c +++ b/source3/lib/poll_funcs/poll_funcs_tevent.c @@ -19,7 +19,7 @@ #include "poll_funcs_tevent.h" #include "tevent.h" #include "system/select.h" -#include "dlinklist.h" +#include "lib/util/dlinklist.h" /* * A poll_watch is asked for by the engine using this library via diff --git a/source3/lib/unix_msg/unix_msg.c b/source3/lib/unix_msg/unix_msg.c index 3221133..cb648ed 100644 --- a/source3/lib/unix_msg/unix_msg.c +++ b/source3/lib/unix_msg/unix_msg.c @@ -21,7 +21,7 @@ #include "system/select.h" #include "system/time.h" #include "system/network.h" -#include "dlinklist.h" +#include "lib/util/dlinklist.h" #include "pthreadpool/pthreadpool.h" #include "lib/util/iov_buf.h" #include "lib/msghdr.h" From d9c8dc20a04f5363dd42b99cf5e5f1e26751515c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Mon, 4 Jan 2016 00:56:10 +0000 Subject: [PATCH 12/13] libcli: Make headers for private libraries private. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jelmer Vernooij Reviewed-By: Andrew Bartlett --- libcli/ldap/wscript_build | 5 ++--- libcli/smb/wscript | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libcli/ldap/wscript_build b/libcli/ldap/wscript_build index 211a320..3050600 100644 --- a/libcli/ldap/wscript_build +++ b/libcli/ldap/wscript_build @@ -3,7 +3,6 @@ bld.SAMBA_LIBRARY('cli-ldap-common', source='ldap_message.c ldap_ndr.c', public_deps='errors talloc ldb', - public_headers='ldap_message.h ldap_errors.h ldap_ndr.h', + private_headers='ldap_message.h ldap_errors.h ldap_ndr.h', deps='samba-util asn1util NDR_SECURITY tevent', - private_library=True - ) + private_library=True) diff --git a/libcli/smb/wscript b/libcli/smb/wscript index dad9821..d6b594a 100755 --- a/libcli/smb/wscript +++ b/libcli/smb/wscript @@ -9,7 +9,7 @@ def build(bld): deps='LIBASYNC_REQ', public_deps='talloc tevent', private_library=True, - public_headers=''' + private_headers=''' read_smb.h ''', ) @@ -48,7 +48,7 @@ def build(bld): ''', public_deps='talloc samba-util iov_buf', private_library=True, - public_headers=''' + private_headers=''' smb_common.h smb2_constants.h smb_constants.h smb_signing.h smb_seal.h smb2_create_blob.h smb2_signing.h From bcda55acf2d34b1b338701debbdf14ae825e7692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Mon, 4 Jan 2016 01:01:53 +0000 Subject: [PATCH 13/13] Rename 'errors' to 'samba-errors' and make it public. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is necessary because it has public headers. Signed-off-by: Jelmer Vernooij Reviewed-By: Andrew Bartlett --- auth/credentials/wscript_build | 2 +- auth/gensec/wscript_build | 2 +- lib/dbwrap/wscript_build | 2 +- lib/ldb-samba/wscript_build | 2 +- lib/torture/wscript_build | 2 +- lib/util/wscript_build | 4 ++-- libcli/auth/wscript_build | 2 +- libcli/ldap/wscript_build | 2 +- libcli/smb/wscript | 2 +- libcli/util/wscript_build | 6 ++++-- librpc/tools/wscript_build | 2 +- librpc/wscript_build | 4 ++-- source3/wscript_build | 2 +- source4/auth/kerberos/wscript_build | 2 +- source4/dns_server/wscript_build | 2 +- source4/dsdb/wscript_build | 4 ++-- source4/lib/socket/wscript_build | 2 +- source4/libcli/ldap/wscript_build | 2 +- source4/libcli/wbclient/wscript_build | 2 +- source4/libcli/wscript_build | 4 ++-- source4/torture/drs/wscript_build | 2 +- 21 files changed, 28 insertions(+), 26 deletions(-) diff --git a/auth/credentials/wscript_build b/auth/credentials/wscript_build index 06d58a7..009f5ec 100755 --- a/auth/credentials/wscript_build +++ b/auth/credentials/wscript_build @@ -5,7 +5,7 @@ bld.SAMBA_LIBRARY('samba-credentials', autoproto='credentials_proto.h', public_headers='credentials.h', pc_files='samba-credentials.pc', - deps='LIBCRYPTO errors events LIBCLI_AUTH samba-security CREDENTIALS_SECRETS CREDENTIALS_KRB5', + deps='LIBCRYPTO samba-errors events LIBCLI_AUTH samba-security CREDENTIALS_SECRETS CREDENTIALS_KRB5', vnum='0.0.1' ) diff --git a/auth/gensec/wscript_build b/auth/gensec/wscript_build index 5ecd280..d8299be 100755 --- a/auth/gensec/wscript_build +++ b/auth/gensec/wscript_build @@ -2,7 +2,7 @@ bld.SAMBA_LIBRARY('gensec', source='gensec.c gensec_start.c gensec_util.c', autoproto='gensec_toplevel_proto.h', - public_deps='tevent-util samba-util errors auth_system_session samba-modules gensec_util asn1util', + public_deps='tevent-util samba-util samba-errors auth_system_session samba-modules gensec_util asn1util', private_headers='gensec.h', deps='com_err', private_library=True, diff --git a/lib/dbwrap/wscript_build b/lib/dbwrap/wscript_build index 195ad4e..b719a60 100644 --- a/lib/dbwrap/wscript_build +++ b/lib/dbwrap/wscript_build @@ -1,6 +1,6 @@ SRC = '''dbwrap.c dbwrap_util.c dbwrap_rbt.c dbwrap_cache.c dbwrap_tdb.c dbwrap_local_open.c''' -DEPS= '''samba-util util_tdb errors tdb tdb-wrap samba-hostconfig''' +DEPS= '''samba-util util_tdb samba-errors tdb tdb-wrap samba-hostconfig''' bld.SAMBA_LIBRARY('dbwrap', source=SRC, diff --git a/lib/ldb-samba/wscript_build b/lib/ldb-samba/wscript_build index 7016b2f..2d9d700 100644 --- a/lib/ldb-samba/wscript_build +++ b/lib/ldb-samba/wscript_build @@ -8,7 +8,7 @@ bld.SAMBA_LIBRARY('ldbsamba', source='ldif_handlers.c', autoproto='ldif_handlers_proto.h', public_deps='ldb', - deps='samba-security ndr NDR_DRSBLOBS NDR_DNSP ldbwrap samdb-common SAMDB_SCHEMA tdb errors', + deps='samba-security ndr NDR_DRSBLOBS NDR_DNSP ldbwrap samdb-common SAMDB_SCHEMA tdb samba-errors', private_library=True ) diff --git a/lib/torture/wscript_build b/lib/torture/wscript_build index 2c0064e..31c3862 100644 --- a/lib/torture/wscript_build +++ b/lib/torture/wscript_build @@ -3,6 +3,6 @@ bld.SAMBA_LIBRARY('torture', private_library=True, source='torture.c subunit.c simple.c', - public_deps='samba-hostconfig samba-util errors talloc tevent', + public_deps='samba-hostconfig samba-util samba-errors talloc tevent', private_headers='torture.h' ) diff --git a/lib/util/wscript_build b/lib/util/wscript_build index c8ee8a0..31e2958 100755 --- a/lib/util/wscript_build +++ b/lib/util/wscript_build @@ -114,7 +114,7 @@ if not bld.env.SAMBA_UTIL_CORE_ONLY: bld.SAMBA_LIBRARY('samba-modules', source='modules.c', - deps='errors samba-util', + deps='samba-errors samba-util', local_include=False, private_library=True) @@ -143,7 +143,7 @@ if not bld.env.SAMBA_UTIL_CORE_ONLY: bld.SAMBA_LIBRARY('tevent-util', source='tevent_ntstatus.c tevent_werror.c', local_include=False, - public_deps='tevent errors tevent-unix-util', + public_deps='tevent samba-errors tevent-unix-util', public_headers='tevent_ntstatus.h tevent_werror.h', header_path=[ ('*', 'util') ], pc_files=[], diff --git a/libcli/auth/wscript_build b/libcli/auth/wscript_build index 51eb293..475b7d6 100755 --- a/libcli/auth/wscript_build +++ b/libcli/auth/wscript_build @@ -2,7 +2,7 @@ bld.SAMBA_LIBRARY('cliauth', source='', - deps='MSRPC_PARSE LIBCLI_AUTH COMMON_SCHANNEL PAM_ERRORS SPNEGO_PARSE krb5samba errors NTLM_CHECK UTIL_LSARPC', + deps='MSRPC_PARSE LIBCLI_AUTH COMMON_SCHANNEL PAM_ERRORS SPNEGO_PARSE krb5samba samba-errors NTLM_CHECK UTIL_LSARPC', private_library=True, grouping_library=True) diff --git a/libcli/ldap/wscript_build b/libcli/ldap/wscript_build index 3050600..db5b1df 100644 --- a/libcli/ldap/wscript_build +++ b/libcli/ldap/wscript_build @@ -2,7 +2,7 @@ bld.SAMBA_LIBRARY('cli-ldap-common', source='ldap_message.c ldap_ndr.c', - public_deps='errors talloc ldb', + public_deps='samba-errors talloc ldb', private_headers='ldap_message.h ldap_errors.h ldap_ndr.h', deps='samba-util asn1util NDR_SECURITY tevent', private_library=True) diff --git a/libcli/smb/wscript b/libcli/smb/wscript index d6b594a..394136b 100755 --- a/libcli/smb/wscript +++ b/libcli/smb/wscript @@ -43,7 +43,7 @@ def build(bld): tstream_smbXcli_np.c ''', deps=''' - LIBCRYPTO NDR_SMB2_LEASE_STRUCT errors gensec krb5samba + LIBCRYPTO NDR_SMB2_LEASE_STRUCT samba-errors gensec krb5samba smb_transport ''', public_deps='talloc samba-util iov_buf', diff --git a/libcli/util/wscript_build b/libcli/util/wscript_build index ccb882d..8123914 100644 --- a/libcli/util/wscript_build +++ b/libcli/util/wscript_build @@ -1,11 +1,13 @@ #!/usr/bin/env python -bld.SAMBA_LIBRARY('errors', +bld.SAMBA_LIBRARY('samba-errors', public_headers='error.h ntstatus.h doserr.h werror.h hresult.h', header_path='core', source='doserr.c errormap.c nterr.c errmap_unix.c hresult.c', public_deps='talloc samba-debug', - private_library=True + # private_library=True, + pc_files=[], + vnum='1', ) diff --git a/librpc/tools/wscript_build b/librpc/tools/wscript_build index a7463a9..a647470 100644 --- a/librpc/tools/wscript_build +++ b/librpc/tools/wscript_build @@ -3,5 +3,5 @@ bld.SAMBA_BINARY('ndrdump', source='ndrdump.c', manpages='ndrdump.1', - deps='samba-hostconfig samba-util popt POPT_SAMBA ndr-table errors NDR_DCERPC' + deps='samba-hostconfig samba-util popt POPT_SAMBA ndr-table samba-errors NDR_DCERPC' ) diff --git a/librpc/wscript_build b/librpc/wscript_build index 93c6ffd..135b307 100644 --- a/librpc/wscript_build +++ b/librpc/wscript_build @@ -316,7 +316,7 @@ bld.SAMBA_SUBSYSTEM('NDR_INITSHUTDOWN', bld.SAMBA_SUBSYSTEM('NDR_COMPRESSION', source='ndr/ndr_compression.c', - public_deps='errors ndr', + public_deps='samba-errors ndr', deps='z LZXPRESS' ) @@ -705,7 +705,7 @@ bld.SAMBA_LIBRARY('dcerpc-samba', bld.SAMBA_LIBRARY('ndr', source='ndr/ndr_string.c ndr/ndr_basic.c ndr/uuid.c ndr/ndr.c ndr/ndr_misc.c gen_ndr/ndr_misc.c ndr/util.c', pc_files='ndr.pc', - public_deps='errors talloc samba-util', + public_deps='samba-errors talloc samba-util', public_headers='gen_ndr/misc.h gen_ndr/ndr_misc.h ndr/libndr.h:ndr.h', header_path= [('*gen_ndr*', 'gen_ndr')], vnum='0.0.5', diff --git a/source3/wscript_build b/source3/wscript_build index d40dd7e..b347b25 100755 --- a/source3/wscript_build +++ b/source3/wscript_build @@ -807,7 +807,7 @@ bld.SAMBA3_LIBRARY('CHARSET3', bld.SAMBA3_SUBSYSTEM('errors3', source='libsmb/errormap.c libsmb/smberr.c lib/errmap_unix.c', - deps='errors') + deps='samba-errors') bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR', source='rpc_client/cli_samr.c', diff --git a/source4/auth/kerberos/wscript_build b/source4/auth/kerberos/wscript_build index ffcb54c..0f886fa 100755 --- a/source4/auth/kerberos/wscript_build +++ b/source4/auth/kerberos/wscript_build @@ -9,7 +9,7 @@ bld.SAMBA_LIBRARY('authkrb5', source='kerberos_pac.c', autoproto='proto.h', public_deps='ndr-krb5pac krb5samba samba_socket LIBCLI_RESOLVE asn1', - deps='auth_sam_reply tevent LIBPACKET ndr ldb krb5samba KRB_INIT_CTX KRB5_PAC errors', + deps='auth_sam_reply tevent LIBPACKET ndr ldb krb5samba KRB_INIT_CTX KRB5_PAC samba-errors', private_library=True ) diff --git a/source4/dns_server/wscript_build b/source4/dns_server/wscript_build index eedbd1d..9f655d9 100644 --- a/source4/dns_server/wscript_build +++ b/source4/dns_server/wscript_build @@ -2,7 +2,7 @@ bld.SAMBA_LIBRARY('dnsserver_common', source='dnsserver_common.c', - deps='samba-util errors ldbsamba clidns', + deps='samba-util samba-errors ldbsamba clidns', private_library=True, enabled=bld.AD_DC_BUILD_IS_ENABLED()) diff --git a/source4/dsdb/wscript_build b/source4/dsdb/wscript_build index d045a81..c8fe975 100755 --- a/source4/dsdb/wscript_build +++ b/source4/dsdb/wscript_build @@ -9,7 +9,7 @@ bld.SAMBA_LIBRARY('samdb', public_deps='krb5', public_headers='', vnum='0.0.1', - deps='ndr NDR_DRSUAPI NDR_DRSBLOBS auth_system_session LIBCLI_AUTH ndr SAMDB_SCHEMA ldbsamba samdb-common LIBCLI_DRSUAPI cli-ldap-common samba-util com_err authkrb5 samba-credentials ldbwrap errors krb5samba', + deps='ndr NDR_DRSUAPI NDR_DRSBLOBS auth_system_session LIBCLI_AUTH ndr SAMDB_SCHEMA ldbsamba samdb-common LIBCLI_DRSUAPI cli-ldap-common samba-util com_err authkrb5 samba-credentials ldbwrap samba-errors krb5samba', ) bld.SAMBA_LIBRARY('samdb-common', @@ -53,7 +53,7 @@ bld.SAMBA_MODULE('service_dns_update', source='dns/dns_update.c', subsystem='service', init_function='server_service_dnsupdate_init', - deps='samdb UTIL_RUNCMD samba-util ldb samdb-common errors talloc auth_system_session samba-hostconfig', + deps='samdb UTIL_RUNCMD samba-util ldb samdb-common samba-errors talloc auth_system_session samba-hostconfig', internal_module=False, enabled=bld.AD_DC_BUILD_IS_ENABLED() ) diff --git a/source4/lib/socket/wscript_build b/source4/lib/socket/wscript_build index da0b380..1cb89c6 100644 --- a/source4/lib/socket/wscript_build +++ b/source4/lib/socket/wscript_build @@ -10,7 +10,7 @@ bld.SAMBA_LIBRARY('netif', bld.SAMBA_MODULE('socket_ip', source='socket_ip.c', subsystem='samba_socket', - deps='errors', + deps='samba-errors', internal_module=True ) diff --git a/source4/libcli/ldap/wscript_build b/source4/libcli/ldap/wscript_build index debec46..1242673 100644 --- a/source4/libcli/ldap/wscript_build +++ b/source4/libcli/ldap/wscript_build @@ -3,7 +3,7 @@ bld.SAMBA_LIBRARY('cli-ldap', source='ldap_client.c ldap_bind.c ldap_ildap.c ldap_controls.c', autoproto='ldap_proto.h', - public_deps='errors tevent', + public_deps='samba-errors tevent', private_headers='libcli_ldap.h:ldap-util.h', deps='cli_composite LIBSAMBA_TSOCKET samba_socket NDR_SAMR LIBTLS ndr LP_RESOLVE gensec cli-ldap-common', private_library=True diff --git a/source4/libcli/wbclient/wscript_build b/source4/libcli/wbclient/wscript_build index cf28887..f3cb3af 100644 --- a/source4/libcli/wbclient/wscript_build +++ b/source4/libcli/wbclient/wscript_build @@ -2,7 +2,7 @@ bld.SAMBA_LIBRARY('LIBWBCLIENT_OLD', source='wbclient.c', - public_deps='errors events', + public_deps='samba-errors events', cflags='-DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR, deps='WB_REQTRANS NDR_WINBIND MESSAGING RPC_NDR_WINBIND', private_library=True diff --git a/source4/libcli/wscript_build b/source4/libcli/wscript_build index a3c072d..2c45cea 100755 --- a/source4/libcli/wscript_build +++ b/source4/libcli/wscript_build @@ -76,7 +76,7 @@ bld.SAMBA_SUBSYSTEM('LIBCLI_FINDDCS', bld.SAMBA_SUBSYSTEM('LIBCLI_SMB', source='clireadwrite.c cliconnect.c clifile.c clilist.c clitrans2.c climessage.c clideltree.c', private_headers='libcli.h:smb_cli.h', - public_deps='smbclient-raw errors LIBCLI_AUTH LIBCLI_SMB_COMPOSITE cli-nbt samba-security LIBCLI_RESOLVE LIBCLI_DGRAM LIBCLI_SMB2 LIBCLI_FINDDCS samba_socket' + public_deps='smbclient-raw samba-errors LIBCLI_AUTH LIBCLI_SMB_COMPOSITE cli-nbt samba-security LIBCLI_RESOLVE LIBCLI_DGRAM LIBCLI_SMB2 LIBCLI_FINDDCS samba_socket' ) @@ -84,7 +84,7 @@ bld.SAMBA_LIBRARY('smbclient-raw', source='raw/rawfile.c raw/smb_signing.c raw/clisocket.c raw/clitransport.c raw/clisession.c raw/clitree.c raw/clierror.c raw/rawrequest.c raw/rawreadwrite.c raw/rawsearch.c raw/rawsetfileinfo.c raw/raweas.c raw/rawtrans.c raw/clioplock.c raw/rawnegotiate.c raw/rawfsinfo.c raw/rawfileinfo.c raw/rawnotify.c raw/rawioctl.c raw/rawacl.c raw/rawdate.c raw/rawlpq.c raw/rawshadow.c', autoproto='raw/raw_proto.h', public_deps='samba_socket LIBPACKET LIBCRYPTO', - deps='cli_composite LIBCLI_RESOLVE samba-security ndr samba-util errors charset talloc LIBCLI_SMB_COMPOSITE tevent cli_smb_common', + deps='cli_composite LIBCLI_RESOLVE samba-security ndr samba-util samba-errors charset talloc LIBCLI_SMB_COMPOSITE tevent cli_smb_common', private_headers='raw/request.h:smb_request.h raw/signing.h:smb_raw_signing.h raw/libcliraw.h:smb_cliraw.h raw/interfaces.h:smb_raw_interfaces.h raw/smb.h:smb_raw.h raw/trans2.h:smb_raw_trans2.h', private_library=True, ) diff --git a/source4/torture/drs/wscript_build b/source4/torture/drs/wscript_build index 0e5578b..cfdd8a2 100644 --- a/source4/torture/drs/wscript_build +++ b/source4/torture/drs/wscript_build @@ -5,7 +5,7 @@ bld.SAMBA_MODULE('TORTURE_DRS', autoproto='proto.h', subsystem='smbtorture', init_function='torture_drs_init', - deps='samba-util ldb POPT_SAMBA errors torture ldbsamba talloc dcerpc ndr NDR_DRSUAPI gensec samba-hostconfig RPC_NDR_DRSUAPI DSDB_MODULE_HELPERS asn1util samdb NDR_DRSBLOBS samba-credentials samdb-common LIBCLI_RESOLVE LP_RESOLVE torturemain', + deps='samba-util ldb POPT_SAMBA samba-errors torture ldbsamba talloc dcerpc ndr NDR_DRSUAPI gensec samba-hostconfig RPC_NDR_DRSUAPI DSDB_MODULE_HELPERS asn1util samdb NDR_DRSBLOBS samba-credentials samdb-common LIBCLI_RESOLVE LP_RESOLVE torturemain', internal_module=True )