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;
#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;
char *crypted;
struct passwd *pws;
NTSTATUS nt_status;
- int level = lp_passwordlevel(global_loadparm);
+ int level = lp_passwordlevel(lp_ctx);
*ret_passwd = NULL;
#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;
}
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;
/*
initialise the GENSEC subsystem
*/
-NTSTATUS gensec_init(void)
+NTSTATUS gensec_init(struct loadparm_context *lp_ctx)
{
static bool initialized = false;
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);
int sizeof_gensec_security;
};
+struct loadparm_context;
+
#include "auth/gensec/gensec_proto.h"
#endif /* __GENSEC_H__ */
}
}
- gensec_init();
+ gensec_init(global_loadparm);
dump_args();
if (check_arg_numeric("ibs") == 0 || check_arg_numeric("ibs") == 0) {
}
}
- gensec_init();
+ gensec_init(global_loadparm);
if(poptPeekArg(pc)) {
char *s = strdup(poptGetArg(pc));
#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,
#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;
#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;
}
ldb_global_init();
- gensec_init();
+ gensec_init(global_loadparm);
mprSetCtx(mem_ctx);
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? */
}
}
- gensec_init();
+ gensec_init(global_loadparm);
if (username_count == 0) {
usage();
servers[1] = servers[0];
}
- gensec_init();
+ gensec_init(global_loadparm);
argc -= optind;
argv += optind;
}
}
- gensec_init();
+ gensec_init(global_loadparm);
argc -= optind;
argv += optind;
return 1;
}
- gensec_init();
+ gensec_init(global_loadparm);
if (opt_domain == NULL) {
opt_domain = lp_workgroup(global_loadparm);