auth: move credentials layer to the top level
authorAndrew Bartlett <abartlet@samba.org>
Fri, 7 Oct 2011 06:20:33 +0000 (17:20 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 11 Oct 2011 02:41:36 +0000 (13:41 +1100)
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

18 files changed:
auth/credentials/credentials.c [moved from source4/auth/credentials/credentials.c with 100% similarity]
auth/credentials/credentials.h [moved from source4/auth/credentials/credentials.h with 100% similarity]
auth/credentials/credentials_krb5.c [moved from source4/auth/credentials/credentials_krb5.c with 100% similarity]
auth/credentials/credentials_krb5.h [moved from source4/auth/credentials/credentials_krb5.h with 100% similarity]
auth/credentials/credentials_ntlm.c [moved from source4/auth/credentials/credentials_ntlm.c with 100% similarity]
auth/credentials/credentials_secrets.c [moved from source4/auth/credentials/credentials_secrets.c with 100% similarity]
auth/credentials/pycredentials.c [moved from source4/auth/credentials/pycredentials.c with 100% similarity]
auth/credentials/pycredentials.h [moved from source4/auth/credentials/pycredentials.h with 100% similarity]
auth/credentials/samba-credentials.pc.in [moved from source4/auth/credentials/samba-credentials.pc.in with 100% similarity]
auth/credentials/tests/bind.py [moved from source4/auth/credentials/tests/bind.py with 100% similarity]
auth/credentials/tests/simple.c [moved from source4/auth/credentials/tests/simple.c with 100% similarity]
auth/credentials/wscript_build [moved from source4/auth/credentials/wscript_build with 100% similarity]
auth/wscript_build
source3/auth/auth_samba4.c
source4/auth/gensec/gensec_start.c
source4/auth/wscript_build
source4/selftest/tests.py
source4/torture/local/wscript_build

index 976e8ab..540317a 100644 (file)
@@ -8,3 +8,4 @@ bld.SAMBA_LIBRARY('auth_sam_reply',
                   )
 
 bld.RECURSE('gensec')
+bld.RECURSE('credentials')
index 371d4b7..994bde1 100644 (file)
@@ -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
index d400685..3150cce 100644 (file)
@@ -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;
index 079857d..ebee49b 100644 (file)
@@ -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',
index ce747ce..7dae7a2 100755 (executable)
@@ -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'])
index 0c269d7..c5d897a 100644 (file)
@@ -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'''