summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-04-16 08:42:12 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-05-20 17:39:10 +1000
commitfeb9ffdac82c0e30ea61b7ac0d3dae2fcd3bcedd (patch)
tree09d4f5dc951c453cb9dddd385b30ab8d15da7a94 /source4
parent72ccbcacddd2c3fdc6bfb61b8efb78625368365d (diff)
downloadsamba-feb9ffdac82c0e30ea61b7ac0d3dae2fcd3bcedd.tar.gz
samba-feb9ffdac82c0e30ea61b7ac0d3dae2fcd3bcedd.tar.bz2
samba-feb9ffdac82c0e30ea61b7ac0d3dae2fcd3bcedd.zip
s4:auth Add dependency from the operational module onto auth
We had to split up the auth module into a module loaded by main deamon and a subsystem we manually init in the operational module. Andrew Bartlett
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/auth.h1
-rw-r--r--source4/auth/ntlm/auth.c5
-rw-r--r--source4/auth/ntlm/auth_server_service.c26
-rw-r--r--source4/auth/ntlm/wscript_build9
-rw-r--r--source4/dsdb/samdb/ldb_modules/operational.c5
-rw-r--r--source4/dsdb/samdb/ldb_modules/wscript_build2
6 files changed, 39 insertions, 9 deletions
diff --git a/source4/auth/auth.h b/source4/auth/auth.h
index 2678d2ca66..0e32c504dd 100644
--- a/source4/auth/auth.h
+++ b/source4/auth/auth.h
@@ -283,6 +283,7 @@ NTSTATUS auth_check_password(struct auth_context *auth_ctx,
struct auth_serversupplied_info **server_info);
NTSTATUS auth_init(void);
NTSTATUS auth_register(const struct auth_operations *ops);
+NTSTATUS server_service_auth_init(void);
NTSTATUS authenticate_username_pw(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct messaging_context *msg,
diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c
index b5f3afc86d..3f1ee669c9 100644
--- a/source4/auth/ntlm/auth.c
+++ b/source4/auth/ntlm/auth.c
@@ -645,8 +645,3 @@ _PUBLIC_ NTSTATUS auth_init(void)
return NT_STATUS_OK;
}
-
-NTSTATUS server_service_auth_init(void)
-{
- return auth_init();
-}
diff --git a/source4/auth/ntlm/auth_server_service.c b/source4/auth/ntlm/auth_server_service.c
new file mode 100644
index 0000000000..df47117ba4
--- /dev/null
+++ b/source4/auth/ntlm/auth_server_service.c
@@ -0,0 +1,26 @@
+/*
+ Unix SMB/CIFS implementation.
+ Password and authentication handling
+ Copyright (C) Andrew Bartlett 2010
+
+ 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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "includes.h"
+#include "auth/auth.h"
+
+NTSTATUS server_service_auth_init(void)
+{
+ return auth_init();
+}
diff --git a/source4/auth/ntlm/wscript_build b/source4/auth/ntlm/wscript_build
index 03a812f577..673b5fc7fe 100644
--- a/source4/auth/ntlm/wscript_build
+++ b/source4/auth/ntlm/wscript_build
@@ -52,12 +52,17 @@ bld.SAMBA_SUBSYSTEM('PAM_ERRORS',
)
-bld.SAMBA_MODULE('auth',
+bld.SAMBA_SUBSYSTEM('auth',
source='auth.c auth_util.c auth_simple.c',
autoproto='auth_proto.h',
+ deps='LIBSAMBA-UTIL LIBSECURITY SAMDB CREDENTIALS UTIL_TEVENT',
+ )
+
+bld.SAMBA_MODULE('auth_server_service',
+ source='auth_server_service.c',
subsystem='service',
init_function='server_service_auth_init',
- deps='LIBSAMBA-UTIL LIBSECURITY SAMDB CREDENTIALS UTIL_TEVENT',
+ deps='auth',
internal_module=True
)
diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c
index e17409e078..acd8b80161 100644
--- a/source4/dsdb/samdb/ldb_modules/operational.c
+++ b/source4/dsdb/samdb/ldb_modules/operational.c
@@ -784,7 +784,10 @@ static int operational_search(struct ldb_module *module, struct ldb_request *req
static int operational_init(struct ldb_module *ctx)
{
struct operational_data *data;
- int ret = ldb_next_init(ctx);
+ int ret;
+ auth_init();
+
+ ret = ldb_next_init(ctx);
if (ret != LDB_SUCCESS) {
return ret;
diff --git a/source4/dsdb/samdb/ldb_modules/wscript_build b/source4/dsdb/samdb/ldb_modules/wscript_build
index 370b548eb2..0a222fea45 100644
--- a/source4/dsdb/samdb/ldb_modules/wscript_build
+++ b/source4/dsdb/samdb/ldb_modules/wscript_build
@@ -262,7 +262,7 @@ bld.SAMBA_MODULE('ldb_operational',
source='operational.c',
subsystem='LIBLDB',
init_function='LDB_MODULE(operational)',
- deps='talloc tevent LIBSAMBA-UTIL SAMDB_COMMON DSDB_MODULE_HELPERS auth'
+ deps='talloc tevent LIBSAMBA-UTIL SAMDB_COMMON DSDB_MODULE_HELPERS auth auth_session'
)