summaryrefslogtreecommitdiff
path: root/source4/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source4/utils')
-rw-r--r--source4/utils/net/net_join.c2
-rw-r--r--source4/utils/ntlm_auth.c20
-rw-r--r--source4/utils/testparm.c20
3 files changed, 21 insertions, 21 deletions
diff --git a/source4/utils/net/net_join.c b/source4/utils/net/net_join.c
index 59b35d70fa..1352fb7d9b 100644
--- a/source4/utils/net/net_join.c
+++ b/source4/utils/net/net_join.c
@@ -67,7 +67,7 @@ int net_join(struct net_context *ctx, int argc, const char **argv)
return -1;
}
/* prepare parameters for the join */
- r->in.netbios_name = lp_netbios_name();
+ r->in.netbios_name = lp_netbios_name(global_loadparm);
r->in.domain_name = domain_name;
r->in.join_type = secure_channel_type;
r->in.level = LIBNET_JOIN_AUTOMATIC;
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c
index 72bd94e630..8d9ff4ff0c 100644
--- a/source4/utils/ntlm_auth.c
+++ b/source4/utils/ntlm_auth.c
@@ -125,7 +125,7 @@ static bool parse_ntlm_auth_domain_user(const char *domuser, fstring domain,
fstring user)
{
- char *p = strchr(domuser,*lp_winbind_separator());
+ char *p = strchr(domuser,*lp_winbind_separator(global_loadparm));
if (!p) {
return False;
@@ -220,7 +220,7 @@ static NTSTATUS local_pw_check_specified(const char *username,
if (unix_name) {
asprintf(unix_name,
"%s%c%s", domain,
- *lp_winbind_separator(),
+ *lp_winbind_separator(global_loadparm),
username);
}
} else {
@@ -474,7 +474,7 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode,
}
creds = cli_credentials_init(state->gensec_state);
- cli_credentials_set_conf(creds);
+ cli_credentials_set_conf(creds, global_loadparm);
if (opt_username) {
cli_credentials_set_username(creds, opt_username, CRED_SPECIFIED);
}
@@ -659,7 +659,7 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode,
reply_code = "AF";
reply_arg = talloc_asprintf(state->gensec_state,
"%s%s%s", session_info->server_info->domain_name,
- lp_winbind_separator(), session_info->server_info->account_name);
+ lp_winbind_separator(global_loadparm), session_info->server_info->account_name);
talloc_free(session_info);
}
} else if (state->gensec_state->gensec_role == GENSEC_CLIENT) {
@@ -710,7 +710,7 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod
} else if (plaintext_password) {
/* handle this request as plaintext */
if (!full_username) {
- if (asprintf(&full_username, "%s%c%s", domain, *lp_winbind_separator(), username) == -1) {
+ if (asprintf(&full_username, "%s%c%s", domain, *lp_winbind_separator(global_loadparm), username) == -1) {
mux_printf(mux_id, "Error: Out of memory in asprintf!\n.\n");
return;
}
@@ -745,7 +745,7 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod
}
if (!domain) {
- domain = smb_xstrdup(lp_workgroup());
+ domain = smb_xstrdup(lp_workgroup(global_loadparm));
}
if (ntlm_server_1_lm_session_key)
@@ -757,7 +757,7 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod
if (!NT_STATUS_IS_OK(
local_pw_check_specified(username,
domain,
- lp_netbios_name(),
+ lp_netbios_name(global_loadparm),
&challenge,
&lm_response,
&nt_response,
@@ -1084,7 +1084,7 @@ int main(int argc, const char **argv)
gensec_init();
if (opt_domain == NULL) {
- opt_domain = lp_workgroup();
+ opt_domain = lp_workgroup(global_loadparm);
}
if (helper_protocol) {
@@ -1111,7 +1111,7 @@ int main(int argc, const char **argv)
}
if (opt_workstation == NULL) {
- opt_workstation = lp_netbios_name();
+ opt_workstation = lp_netbios_name(global_loadparm);
}
if (!opt_password) {
@@ -1121,7 +1121,7 @@ int main(int argc, const char **argv)
{
char *user;
- asprintf(&user, "%s%c%s", opt_domain, *lp_winbind_separator(), opt_username);
+ asprintf(&user, "%s%c%s", opt_domain, *lp_winbind_separator(global_loadparm), opt_username);
if (!check_plaintext_auth(user, opt_password, True)) {
return 1;
}
diff --git a/source4/utils/testparm.c b/source4/utils/testparm.c
index d8b6069791..71ff937a51 100644
--- a/source4/utils/testparm.c
+++ b/source4/utils/testparm.c
@@ -44,28 +44,28 @@
configuration settings.
************************************************/
-static int do_global_checks(void)
+static int do_global_checks(struct loadparm_context *lp_ctx)
{
int ret = 0;
- if (!directory_exist(lp_lockdir())) {
+ if (!directory_exist(lp_lockdir(lp_ctx))) {
fprintf(stderr, "ERROR: lock directory %s does not exist\n",
- lp_lockdir());
+ lp_lockdir(lp_ctx));
ret = 1;
}
- if (!directory_exist(lp_piddir())) {
+ if (!directory_exist(lp_piddir(lp_ctx))) {
fprintf(stderr, "ERROR: pid directory %s does not exist\n",
- lp_piddir());
+ lp_piddir(lp_ctx));
ret = 1;
}
- if (strlen(lp_winbind_separator()) != 1) {
+ if (strlen(lp_winbind_separator(lp_ctx)) != 1) {
fprintf(stderr,"ERROR: the 'winbind separator' parameter must be a single character.\n");
ret = 1;
}
- if (*lp_winbind_separator() == '+') {
+ if (*lp_winbind_separator(lp_ctx) == '+') {
fprintf(stderr,"'winbind separator = +' might cause problems with group membership.\n");
}
@@ -139,16 +139,16 @@ static int do_global_checks(void)
/* We need this to force the output */
lp_set_cmdline(global_loadparm, "log level", "2");
- fprintf(stderr,"Load smb config files from %s\n",lp_configfile());
+ fprintf(stderr, "Loaded smb config files from %s\n", lp_configfile(global_loadparm));
- if (!lp_load()) {
+ if (!lp_load(lp_configfile(global_loadparm))) {
fprintf(stderr,"Error loading services.\n");
return(1);
}
fprintf(stderr,"Loaded services file OK.\n");
- ret = do_global_checks();
+ ret = do_global_checks(global_loadparm);
for (s=0;s<lp_numservices(global_loadparm);s++) {
struct loadparm_service *service = lp_servicebynum(global_loadparm, s);