summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/auth_unix.c12
-rw-r--r--source4/auth/gensec/gensec.c4
-rw-r--r--source4/auth/gensec/gensec.h2
-rw-r--r--source4/client/cifsdd.c2
-rw-r--r--source4/client/client.c2
-rw-r--r--source4/lib/ldb/tools/cmdline.c5
-rw-r--r--source4/librpc/rpc/dcerpc.c3
-rw-r--r--source4/scripting/ejs/smbscript.c2
-rw-r--r--source4/smbd/server.c2
-rw-r--r--source4/torture/gentest.c2
-rw-r--r--source4/torture/locktest.c2
-rw-r--r--source4/torture/masktest.c2
-rw-r--r--source4/utils/ntlm_auth.c2
13 files changed, 24 insertions, 18 deletions
diff --git a/source4/auth/auth_unix.c b/source4/auth/auth_unix.c
index d06c73cc34..4cbe3723a8 100644
--- a/source4/auth/auth_unix.c
+++ b/source4/auth/auth_unix.c
@@ -427,7 +427,8 @@ static NTSTATUS smb_pam_setcred(pam_handle_t *pamh, const char * user)
return pam_to_nt_status(pam_error);
}
-static NTSTATUS check_unix_password(TALLOC_CTX *ctx, const struct auth_usersupplied_info *user_info, struct passwd **pws)
+static NTSTATUS check_unix_password(TALLOC_CTX *ctx, struct loadparm_context *lp_ctx,
+ const struct auth_usersupplied_info *user_info, struct passwd **pws)
{
struct smb_pam_user_info *info;
struct pam_conv *pamconv;
@@ -590,7 +591,8 @@ static NTSTATUS password_check(const char *username, const char *password,
#endif /* HAVE_BIGCRYPT && HAVE_CRYPT && USE_BOTH_CRYPT_CALLS */
}
-static NTSTATUS check_unix_password(TALLOC_CTX *ctx, const struct auth_usersupplied_info *user_info, struct passwd **ret_passwd)
+static NTSTATUS check_unix_password(TALLOC_CTX *ctx, struct loadparm_context *lp_ctx,
+ const struct auth_usersupplied_info *user_info, struct passwd **ret_passwd)
{
char *username;
char *password;
@@ -599,7 +601,7 @@ static NTSTATUS check_unix_password(TALLOC_CTX *ctx, const struct auth_usersuppl
char *crypted;
struct passwd *pws;
NTSTATUS nt_status;
- int level = lp_passwordlevel(global_loadparm);
+ int level = lp_passwordlevel(lp_ctx);
*ret_passwd = NULL;
@@ -702,7 +704,7 @@ static NTSTATUS check_unix_password(TALLOC_CTX *ctx, const struct auth_usersuppl
#endif
if (crypted[0] == '\0') {
- if (!lp_null_passwords(global_loadparm)) {
+ if (!lp_null_passwords(lp_ctx)) {
DEBUG(2, ("Disallowing %s with null password\n", username));
return NT_STATUS_LOGON_FAILURE;
}
@@ -802,7 +804,7 @@ static NTSTATUS authunix_check_password(struct auth_method_context *ctx,
return NT_STATUS_NO_MEMORY;
}
- nt_status = check_unix_password(check_ctx, user_info, &pwd);
+ nt_status = check_unix_password(check_ctx, global_loadparm, user_info, &pwd);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(check_ctx);
return nt_status;
diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c
index 4821e6a19b..1da0cf631b 100644
--- a/source4/auth/gensec/gensec.c
+++ b/source4/auth/gensec/gensec.c
@@ -1259,7 +1259,7 @@ static int sort_gensec(struct gensec_security_ops **gs1, struct gensec_security_
/*
initialise the GENSEC subsystem
*/
-NTSTATUS gensec_init(void)
+NTSTATUS gensec_init(struct loadparm_context *lp_ctx)
{
static bool initialized = false;
@@ -1269,7 +1269,7 @@ NTSTATUS gensec_init(void)
if (initialized) return NT_STATUS_OK;
initialized = true;
- shared_init = load_samba_modules(NULL, global_loadparm, "gensec");
+ shared_init = load_samba_modules(NULL, lp_ctx, "gensec");
run_init_functions(static_init);
run_init_functions(shared_init);
diff --git a/source4/auth/gensec/gensec.h b/source4/auth/gensec/gensec.h
index bda740cc86..6263edd687 100644
--- a/source4/auth/gensec/gensec.h
+++ b/source4/auth/gensec/gensec.h
@@ -165,6 +165,8 @@ struct gensec_critical_sizes {
int sizeof_gensec_security;
};
+struct loadparm_context;
+
#include "auth/gensec/gensec_proto.h"
#endif /* __GENSEC_H__ */
diff --git a/source4/client/cifsdd.c b/source4/client/cifsdd.c
index 5735d127e4..a48235d047 100644
--- a/source4/client/cifsdd.c
+++ b/source4/client/cifsdd.c
@@ -574,7 +574,7 @@ int main(int argc, const char ** argv)
}
}
- gensec_init();
+ gensec_init(global_loadparm);
dump_args();
if (check_arg_numeric("ibs") == 0 || check_arg_numeric("ibs") == 0) {
diff --git a/source4/client/client.c b/source4/client/client.c
index 4415361602..571caa68db 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -3180,7 +3180,7 @@ static int do_message_op(const char *desthost, const char *destip, int name_type
}
}
- gensec_init();
+ gensec_init(global_loadparm);
if(poptPeekArg(pc)) {
char *s = strdup(poptGetArg(pc));
diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c
index 01ef04f5d2..5e3013600a 100644
--- a/source4/lib/ldb/tools/cmdline.c
+++ b/source4/lib/ldb/tools/cmdline.c
@@ -31,11 +31,12 @@
#include "auth/gensec/gensec.h"
#include "auth/auth.h"
#include "ldb_wrap.h"
+#include "param/param.h"
#endif
-/*
+/**
process command line options
*/
struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const char **argv,
@@ -208,7 +209,7 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const
#if (_SAMBA_BUILD_ >= 4)
/* Must be after we have processed command line options */
- gensec_init();
+ gensec_init(global_loadparm);
if (ldb_set_opaque(ldb, "sessionInfo", system_session(ldb))) {
goto failed;
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index ef63cb381b..74dc2562ed 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -28,10 +28,11 @@
#include "librpc/gen_ndr/ndr_dcerpc.h"
#include "libcli/composite/composite.h"
#include "auth/gensec/gensec.h"
+#include "param/param.h"
NTSTATUS dcerpc_init(void)
{
- gensec_init();
+ gensec_init(global_loadparm);
return NT_STATUS_OK;
}
diff --git a/source4/scripting/ejs/smbscript.c b/source4/scripting/ejs/smbscript.c
index 29ce763f96..db6e0eeb10 100644
--- a/source4/scripting/ejs/smbscript.c
+++ b/source4/scripting/ejs/smbscript.c
@@ -60,7 +60,7 @@ int main(int argc, const char **argv)
ldb_global_init();
- gensec_init();
+ gensec_init(global_loadparm);
mprSetCtx(mem_ctx);
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index 8f5c3b66ec..5dac250ee8 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -286,7 +286,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
share_init();
- gensec_init(); /* FIXME: */
+ gensec_init(global_loadparm); /* FIXME: */
ntptr_init(); /* FIXME: maybe run this in the initialization function
of the spoolss RPC server instead? */
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c
index 79eb7eb0e9..132cfd6134 100644
--- a/source4/torture/gentest.c
+++ b/source4/torture/gentest.c
@@ -2265,7 +2265,7 @@ static bool split_unc_name(const char *unc, char **server, char **share)
}
}
- gensec_init();
+ gensec_init(global_loadparm);
if (username_count == 0) {
usage();
diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c
index 24b9606961..810a21cb9e 100644
--- a/source4/torture/locktest.c
+++ b/source4/torture/locktest.c
@@ -637,7 +637,7 @@ static void usage(void)
servers[1] = servers[0];
}
- gensec_init();
+ gensec_init(global_loadparm);
argc -= optind;
argv += optind;
diff --git a/source4/torture/masktest.c b/source4/torture/masktest.c
index fec7657afe..d9ac271119 100644
--- a/source4/torture/masktest.c
+++ b/source4/torture/masktest.c
@@ -358,7 +358,7 @@ static void usage(void)
}
}
- gensec_init();
+ gensec_init(global_loadparm);
argc -= optind;
argv += optind;
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c
index c51b35aa03..80ecfff572 100644
--- a/source4/utils/ntlm_auth.c
+++ b/source4/utils/ntlm_auth.c
@@ -1081,7 +1081,7 @@ int main(int argc, const char **argv)
return 1;
}
- gensec_init();
+ gensec_init(global_loadparm);
if (opt_domain == NULL) {
opt_domain = lp_workgroup(global_loadparm);