From: Andrew Bartlett Date: Fri, 7 Oct 2011 06:20:33 +0000 (+1100) Subject: auth: move credentials layer to the top level X-Git-Tag: ldb-1.1.4~1179 X-Git-Url: http://git.samba.org/samba.git/?p=kai%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=561d834123a2a8a96954f7cca556f8838ab38b72 auth: move credentials layer to the top level This will allow gensec_start.c to move to the top level. This does not change what code uses the cli_credentials code, but allows the gensec code to be more broadly. Andrew Bartlett --- diff --git a/source4/auth/credentials/credentials.c b/auth/credentials/credentials.c similarity index 100% rename from source4/auth/credentials/credentials.c rename to auth/credentials/credentials.c diff --git a/source4/auth/credentials/credentials.h b/auth/credentials/credentials.h similarity index 100% rename from source4/auth/credentials/credentials.h rename to auth/credentials/credentials.h diff --git a/source4/auth/credentials/credentials_krb5.c b/auth/credentials/credentials_krb5.c similarity index 100% rename from source4/auth/credentials/credentials_krb5.c rename to auth/credentials/credentials_krb5.c diff --git a/source4/auth/credentials/credentials_krb5.h b/auth/credentials/credentials_krb5.h similarity index 100% rename from source4/auth/credentials/credentials_krb5.h rename to auth/credentials/credentials_krb5.h diff --git a/source4/auth/credentials/credentials_ntlm.c b/auth/credentials/credentials_ntlm.c similarity index 100% rename from source4/auth/credentials/credentials_ntlm.c rename to auth/credentials/credentials_ntlm.c diff --git a/source4/auth/credentials/credentials_secrets.c b/auth/credentials/credentials_secrets.c similarity index 100% rename from source4/auth/credentials/credentials_secrets.c rename to auth/credentials/credentials_secrets.c diff --git a/source4/auth/credentials/pycredentials.c b/auth/credentials/pycredentials.c similarity index 100% rename from source4/auth/credentials/pycredentials.c rename to auth/credentials/pycredentials.c diff --git a/source4/auth/credentials/pycredentials.h b/auth/credentials/pycredentials.h similarity index 100% rename from source4/auth/credentials/pycredentials.h rename to auth/credentials/pycredentials.h diff --git a/source4/auth/credentials/samba-credentials.pc.in b/auth/credentials/samba-credentials.pc.in similarity index 100% rename from source4/auth/credentials/samba-credentials.pc.in rename to auth/credentials/samba-credentials.pc.in diff --git a/source4/auth/credentials/tests/bind.py b/auth/credentials/tests/bind.py similarity index 100% rename from source4/auth/credentials/tests/bind.py rename to auth/credentials/tests/bind.py diff --git a/source4/auth/credentials/tests/simple.c b/auth/credentials/tests/simple.c similarity index 100% rename from source4/auth/credentials/tests/simple.c rename to auth/credentials/tests/simple.c diff --git a/source4/auth/credentials/wscript_build b/auth/credentials/wscript_build similarity index 100% rename from source4/auth/credentials/wscript_build rename to auth/credentials/wscript_build diff --git a/auth/wscript_build b/auth/wscript_build index 976e8ab0901..540317a4013 100644 --- a/auth/wscript_build +++ b/auth/wscript_build @@ -8,3 +8,4 @@ bld.SAMBA_LIBRARY('auth_sam_reply', ) bld.RECURSE('gensec') +bld.RECURSE('credentials') diff --git a/source3/auth/auth_samba4.c b/source3/auth/auth_samba4.c index 371d4b7a338..994bde17132 100644 --- a/source3/auth/auth_samba4.c +++ b/source3/auth/auth_samba4.c @@ -26,7 +26,7 @@ #include "source4/lib/events/events.h" #include "source4/lib/messaging/messaging.h" #include "auth/gensec/gensec.h" -#include "source4/auth/credentials/credentials.h" +#include "auth/credentials/credentials.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_AUTH diff --git a/source4/auth/gensec/gensec_start.c b/source4/auth/gensec/gensec_start.c index d400685a49a..3150cced973 100644 --- a/source4/auth/gensec/gensec_start.c +++ b/source4/auth/gensec/gensec_start.c @@ -928,8 +928,12 @@ _PUBLIC_ NTSTATUS gensec_init(void) { static bool initialized = false; #define _MODULE_PROTO(init) extern NTSTATUS init(void); +#if _SAMBA_BUILD_ == 4 STATIC_gensec_MODULES_PROTO; init_module_fn static_init[] = { STATIC_gensec_MODULES }; +#else + init_module_fn *static_init = NULL; +#endif init_module_fn *shared_init; if (initialized) return NT_STATUS_OK; diff --git a/source4/auth/wscript_build b/source4/auth/wscript_build index 079857dbb7e..ebee49b89c3 100644 --- a/source4/auth/wscript_build +++ b/source4/auth/wscript_build @@ -4,7 +4,6 @@ bld.RECURSE('gensec') bld.RECURSE('kerberos') bld.RECURSE('ntlmssp') bld.RECURSE('ntlm') -bld.RECURSE('credentials') bld.SAMBA_SUBSYSTEM('auth_session', source='session.c', diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index ce747cee9e5..7dae7a2e764 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -455,7 +455,7 @@ plantestsuite("samba4.blackbox.setpassword.py", "none", ["PYTHON=%s" % python, o plantestsuite("samba4.blackbox.newuser.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_newuser.sh"), '$PREFIX/provision']) plantestsuite("samba4.blackbox.group.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_group.sh"), '$PREFIX/provision']) plantestsuite("samba4.blackbox.spn.py(dc:local)", "dc:local", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_spn.sh"), '$PREFIX/dc']) -plantestsuite("samba4.ldap.bind(dc)", "dc", [python, os.path.join(samba4srcdir, "auth/credentials/tests/bind.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"']) +plantestsuite("samba4.ldap.bind(dc)", "dc", [python, os.path.join(srcdir(), "auth/credentials/tests/bind.py"), '$SERVER', '-U"$USERNAME%$PASSWORD"']) # DRS python tests plansambapythontestsuite("samba4.blackbox.samba-tool.drs(vampire_dc)", "vampire_dc", os.path.join(samba4srcdir, 'scripting/python'), "samba.tests.blackbox.samba_tool_drs", environ={'DC1': '$DC_SERVER', 'DC2': '$VAMPIRE_DC_SERVER'}, extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD']) diff --git a/source4/torture/local/wscript_build b/source4/torture/local/wscript_build index 0c269d73105..c5d897a1237 100644 --- a/source4/torture/local/wscript_build +++ b/source4/torture/local/wscript_build @@ -13,7 +13,7 @@ TORTURE_LOCAL_SOURCE = '''../../../lib/util/charset/tests/iconv.c ../../../lib/util/charset/tests/convert_string.c ../../libcli/security/tests/sddl.c ../../../lib/tdr/testsuite.c ../../../lib/tevent/testsuite.c ../../param/tests/share.c - ../../param/tests/loadparm.c ../../auth/credentials/tests/simple.c local.c + ../../param/tests/loadparm.c ../../../auth/credentials/tests/simple.c local.c dbspeed.c torture.c ../ldb/ldb.c ../../dsdb/common/tests/dsdb_dn.c ../../dsdb/schema/tests/schema_syntax.c ../../../lib/util/tests/anonymous_shared.c'''