[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Thu Sep 8 05:38:03 MDT 2011
The branch, master has been updated
via 30e11d5 build: Add duplicate symbol checking as part of make test
via 3346af1 build: netapi does not depend on TOKEN_UTIL
via 21c2e8b build: make LIBWBCLIENT_OLD and auth_unix_token libraries
via 2bc6339 librpc: put NDR_NTPRINTING into ndr-samba grouping library
via a005acf libgpo: call security_token_has_sid() directly
from 3e227d8 s3:libsmb: pass CLI_FULL_CONNECTION_* flags via cli_connect_nb()
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 30e11d55b526632f93fb60ff944c771f452ab5b4
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Sep 8 19:07:47 2011 +1000
build: Add duplicate symbol checking as part of make test
This ensures we do not get duplicate symbols again, when run as
./configure.developer on non-build farm machines.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet at samba.org>
Autobuild-Date: Thu Sep 8 13:37:40 CEST 2011 on sn-devel-104
commit 3346af16752a08ea134059f75c003b01a7b7f7ec
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Sep 8 17:14:44 2011 +1000
build: netapi does not depend on TOKEN_UTIL
This means we avoid dupliate symbols between libgpo and netapi.
Andrew Bartlett
commit 21c2e8b378dda0ea9a5af6b90bc1a50eda1b9534
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Sep 8 17:10:27 2011 +1000
build: make LIBWBCLIENT_OLD and auth_unix_token libraries
This assists with avoiding duplicate symbols.
Andrew Bartlett
commit 2bc6339ed8a954bf7ffd999230449cc3d924bdb9
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Sep 8 17:09:47 2011 +1000
librpc: put NDR_NTPRINTING into ndr-samba grouping library
This assists with avoiding duplicate symobls now that ntprinting_migrate is a library.
Andrew Bartlett
commit a005acfe8ed0d2bf4cfc69ef59ba513a4409060b
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Sep 8 17:08:52 2011 +1000
libgpo: call security_token_has_sid() directly
-----------------------------------------------------------------------
Summary of changes:
Makefile | 8 ++++----
buildtools/wafsamba/symbols.py | 28 ++++++++++++++++++++++------
buildtools/wafsamba/wscript | 4 ++++
libgpo/gpo_sec.c | 4 ++--
librpc/wscript_build | 2 +-
source3/wscript_build | 2 +-
source4/auth/wscript_build | 11 ++++++-----
source4/libcli/wbclient/wscript_build | 9 +++++----
wscript | 1 +
wscript_build | 1 +
10 files changed, 47 insertions(+), 23 deletions(-)
Changeset truncated at 500 lines:
diff --git a/Makefile b/Makefile
index 3b40c73..0552052 100644
--- a/Makefile
+++ b/Makefile
@@ -13,20 +13,20 @@ uninstall:
$(WAF) uninstall
test:
- $(WAF) test $(TEST_OPTIONS)
+ $(WAF) test --dup-symbol-check $(TEST_OPTIONS)
help:
@echo NOTE: to run extended waf options use $(WAF_BINARY) or modify your PATH
$(WAF) --help
subunit-test:
- $(WAF) test --filtered-subunit $(TEST_OPTIONS)
+ $(WAF) test --dup-symbol-check --filtered-subunit $(TEST_OPTIONS)
testenv:
- $(WAF) test --testenv $(TEST_OPTIONS)
+ $(WAF) test --dup-symbol-check --testenv $(TEST_OPTIONS)
quicktest:
- $(WAF) test --quick $(TEST_OPTIONS)
+ $(WAF) test --dup-symbol-check --quick $(TEST_OPTIONS)
dist:
touch .tmplock
diff --git a/buildtools/wafsamba/symbols.py b/buildtools/wafsamba/symbols.py
index dfab71c..8775735 100644
--- a/buildtools/wafsamba/symbols.py
+++ b/buildtools/wafsamba/symbols.py
@@ -567,7 +567,7 @@ def symbols_whyneeded(task):
Logs.info("target '%s' uses symbols %s from '%s'" % (target, overlap, subsystem))
-def report_duplicate(bld, binname, sym, libs):
+def report_duplicate(bld, binname, sym, libs, fail_on_error):
'''report duplicated symbols'''
if sym in ['_init', '_fini']:
return
@@ -577,10 +577,13 @@ def report_duplicate(bld, binname, sym, libs):
libnames.append(bld.env.library_dict[lib])
else:
libnames.append(lib)
- print("%s: Symbol %s linked in multiple libraries %s" % (binname, sym, libnames))
+ if fail_on_error:
+ raise Utils.WafError("%s: Symbol %s linked in multiple libraries %s" % (binname, sym, libnames))
+ else:
+ print("%s: Symbol %s linked in multiple libraries %s" % (binname, sym, libnames))
-def symbols_dupcheck_binary(bld, binname):
+def symbols_dupcheck_binary(bld, binname, fail_on_error):
'''check for duplicated symbols in one binary'''
libs = get_libs_recursive(bld, binname, set())
@@ -596,10 +599,10 @@ def symbols_dupcheck_binary(bld, binname):
if len(symmap[sym]) > 1:
for libpath in symmap[sym]:
if libpath in bld.env.library_dict:
- report_duplicate(bld, binname, sym, symmap[sym])
+ report_duplicate(bld, binname, sym, symmap[sym], fail_on_error)
break
-def symbols_dupcheck(task):
+def symbols_dupcheck(task, fail_on_error=False):
'''check for symbols defined in two different subsystems'''
bld = task.env.bld
tgt_list = get_tgt_list(bld)
@@ -610,8 +613,12 @@ def symbols_dupcheck(task):
for t in tgt_list:
if t.samba_type == 'BINARY':
binname = os_path_relpath(t.link_task.outputs[0].abspath(bld.env), os.getcwd())
- symbols_dupcheck_binary(bld, binname)
+ symbols_dupcheck_binary(bld, binname, fail_on_error)
+
+def symbols_dupcheck_fatal(task):
+ '''check for symbols defined in two different subsystems (and fail if duplicates are found)'''
+ symbols_dupcheck(task, fail_on_error=True)
def SYMBOL_CHECK(bld):
@@ -636,3 +643,12 @@ def SYMBOL_CHECK(bld):
Build.BuildContext.SYMBOL_CHECK = SYMBOL_CHECK
+
+def DUP_SYMBOL_CHECK(bld):
+ if Options.options.DUP_SYMBOLCHECK and bld.env.DEVELOPER and not bld.env.BUILD_FARM:
+ '''check for duplicate symbols'''
+ bld.SET_BUILD_GROUP('syslibcheck')
+ task = bld(rule=symbols_dupcheck_fatal, always=True, name='symbol duplicate checking')
+ task.env.bld = bld
+
+Build.BuildContext.DUP_SYMBOL_CHECK = DUP_SYMBOL_CHECK
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index ecc2ae5..1a7f3eb 100755
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -121,6 +121,10 @@ def set_options(opt):
help=("check symbols in object files against project rules"),
action='store_true', dest='SYMBOLCHECK', default=False)
+ gr.add_option('--dup-symbol-check',
+ help=("check for duplicate symbols in object files and system libs (must be configured with --enable-developer)"),
+ action='store_true', dest='DUP_SYMBOLCHECK', default=False)
+
gr.add_option('--why-needed',
help=("TARGET:DEPENDENCY check why TARGET needs DEPENDENCY"),
action='store', type='str', dest='WHYNEEDED', default=None)
diff --git a/libgpo/gpo_sec.c b/libgpo/gpo_sec.c
index c27ca55..456a218 100644
--- a/libgpo/gpo_sec.c
+++ b/libgpo/gpo_sec.c
@@ -103,7 +103,7 @@ static NTSTATUS gpo_sd_check_ace_denied_object(const struct security_ace *ace,
if (gpo_sd_check_agp_object(ace) &&
gpo_sd_check_agp_access_bits(ace->access_mask) &&
- nt_token_check_sid(&ace->trustee, token)) {
+ security_token_has_sid(token, &ace->trustee)) {
sid_str = dom_sid_string(NULL, &ace->trustee);
DEBUG(10,("gpo_sd_check_ace_denied_object: "
"Access denied as of ace for %s\n",
@@ -125,7 +125,7 @@ static NTSTATUS gpo_sd_check_ace_allowed_object(const struct security_ace *ace,
if (gpo_sd_check_agp_object(ace) &&
gpo_sd_check_agp_access_bits(ace->access_mask) &&
- nt_token_check_sid(&ace->trustee, token)) {
+ security_token_has_sid(token, &ace->trustee)) {
sid_str = dom_sid_string(NULL, &ace->trustee);
DEBUG(10,("gpo_sd_check_ace_allowed_object: "
"Access granted as of ace for %s\n",
diff --git a/librpc/wscript_build b/librpc/wscript_build
index 1ac6645..e5c8092 100644
--- a/librpc/wscript_build
+++ b/librpc/wscript_build
@@ -561,7 +561,7 @@ bld.SAMBA_SUBSYSTEM('RPC_NDR_DNSP',
# a grouping library for NDR subsystems that may be used by more than one target
bld.SAMBA_LIBRARY('ndr-samba',
source=[],
- deps='NDR_DRSBLOBS NDR_DRSUAPI NDR_IDMAP NDR_NTLMSSP NDR_SCHANNEL NDR_MGMT NDR_DNSP NDR_EPMAPPER NDR_XATTR NDR_UNIXINFO NDR_NAMED_PIPE_AUTH NDR_DCOM',
+ deps='NDR_DRSBLOBS NDR_DRSUAPI NDR_IDMAP NDR_NTLMSSP NDR_SCHANNEL NDR_MGMT NDR_DNSP NDR_EPMAPPER NDR_XATTR NDR_UNIXINFO NDR_NAMED_PIPE_AUTH NDR_DCOM NDR_NTPRINTING',
private_library=True,
grouping_library=True
)
diff --git a/source3/wscript_build b/source3/wscript_build
index 7a9fdcc..9f3eb05 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -665,7 +665,7 @@ bld.SAMBA3_LIBRARY('netapi',
public_deps='''talloc tdb_compat cap wbclient smbd_shim libsmb KRBCLIENT
pdb SMBLDAP param samba-util
LIBMSRPC_GEN msrpc3 ads LIBNET DCUTIL NDR_LIBNETAPI
- RPC_CLIENT_SCHANNEL smbconf REG_SMBCONF TOKEN_UTIL
+ RPC_CLIENT_SCHANNEL smbconf REG_SMBCONF
LIBCLI_SAMR libcli_lsa3 LIBRPCCLI_NETLOGON
RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_INITSHUTDOWN
INIT_NETLOGON INIT_SAMR popt_samba3''',
diff --git a/source4/auth/wscript_build b/source4/auth/wscript_build
index 91ec1eb..079857d 100644
--- a/source4/auth/wscript_build
+++ b/source4/auth/wscript_build
@@ -15,11 +15,12 @@ bld.SAMBA_SUBSYSTEM('auth_session',
deps='samdb auth4_sam'
)
-bld.SAMBA_SUBSYSTEM('auth_unix_token',
- source='unix_token.c',
- autoproto='unix_token_proto.h',
- public_deps='LIBWBCLIENT_OLD',
- )
+bld.SAMBA_LIBRARY('auth_unix_token',
+ source='unix_token.c',
+ autoproto='unix_token_proto.h',
+ public_deps='LIBWBCLIENT_OLD',
+ private_library=True,
+ )
bld.SAMBA_SUBSYSTEM('samba_server_gensec',
diff --git a/source4/libcli/wbclient/wscript_build b/source4/libcli/wbclient/wscript_build
index 8451ca3..85439fc 100644
--- a/source4/libcli/wbclient/wscript_build
+++ b/source4/libcli/wbclient/wscript_build
@@ -1,8 +1,9 @@
#!/usr/bin/env python
-bld.SAMBA_SUBSYSTEM('LIBWBCLIENT_OLD',
- source='wbclient.c',
- public_deps='errors events',
- deps='NDR_WINBIND MESSAGING RPC_NDR_WINBIND'
+bld.SAMBA_LIBRARY('LIBWBCLIENT_OLD',
+ source='wbclient.c',
+ public_deps='errors events',
+ deps='NDR_WINBIND MESSAGING RPC_NDR_WINBIND',
+ private_library=True
)
diff --git a/wscript b/wscript
index 0b5e68f..548f8ec 100755
--- a/wscript
+++ b/wscript
@@ -52,6 +52,7 @@ def configure(conf):
if Options.options.developer:
conf.ADD_CFLAGS('-DDEVELOPER -DDEBUG_PASSWORD')
+ conf.env.DEVELOPER = True
# this enables smbtorture.static for s3 in the build farm
conf.env.BUILD_FARM = Options.options.BUILD_FARM or os.environ.get('RUN_FROM_BUILD_FARM')
diff --git a/wscript_build b/wscript_build
index 9e2737d..1b6fb31 100644
--- a/wscript_build
+++ b/wscript_build
@@ -123,3 +123,4 @@ bld.RECURSE('source3')
bld.RECURSE('testsuite/headers')
bld.SYMBOL_CHECK()
+bld.DUP_SYMBOL_CHECK()
--
Samba Shared Repository
More information about the samba-cvs
mailing list