summaryrefslogtreecommitdiff
path: root/source4/utils
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-16 11:36:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:15 -0500
commitaf237084ecd4f9928c6c282b9c5c73598d5c73d6 (patch)
treea11f156dd4a4d20deaf74c16d90ae20d0f59f365 /source4/utils
parent3b9dfb0da3e6e7afff7be60b571493bb288d385f (diff)
downloadsamba-af237084ecd4f9928c6c282b9c5c73598d5c73d6.tar.gz
samba-af237084ecd4f9928c6c282b9c5c73598d5c73d6.tar.bz2
samba-af237084ecd4f9928c6c282b9c5c73598d5c73d6.zip
r7633: this patch started as an attempt to make the dcerpc code use a given
event_context for the socket_connect() call, so that when things that use dcerpc are running alongside anything else it doesn't block the whole process during a connect. Then of course I needed to change any code that created a dcerpc connection (such as the auth code) to also take an event context, and anything that called that and so on .... thus the size of the patch. There were 3 places where I punted: - abartlet wanted me to add a gensec_set_event_context() call instead of adding it to the gensec init calls. Andrew, my apologies for not doing this. I didn't do it as adding a new parameter allowed me to catch all the callers with the compiler. Now that its done, we could go back and use gensec_set_event_context() - the ejs code calls auth initialisation, which means it should pass in the event context from the web server. I punted on that. Needs fixing. - I used a NULL event context in dcom_get_pipe(). This is equivalent to what we did already, but should be fixed to use a callers event context. Jelmer, can you think of a clean way to do that? I also cleaned up a couple of things: - libnet_context_destroy() makes no sense. I removed it. - removed some unused vars in various places (This used to be commit 3a3025485bdb8f600ab528c0b4b4eef0c65e3fc9)
Diffstat (limited to 'source4/utils')
-rw-r--r--source4/utils/net/net_join.c4
-rw-r--r--source4/utils/net/net_password.c8
-rw-r--r--source4/utils/net/net_time.c4
-rw-r--r--source4/utils/net/net_user.c4
-rw-r--r--source4/utils/net/net_vampire.c4
-rw-r--r--source4/utils/ntlm_auth.c7
6 files changed, 16 insertions, 15 deletions
diff --git a/source4/utils/net/net_join.c b/source4/utils/net/net_join.c
index 717a9364a5..7f9ab0c635 100644
--- a/source4/utils/net/net_join.c
+++ b/source4/utils/net/net_join.c
@@ -57,7 +57,7 @@ int net_join(struct net_context *ctx, int argc, const char **argv)
domain_name = tmp;
- libnetctx = libnet_context_init();
+ libnetctx = libnet_context_init(NULL);
if (!libnetctx) {
return -1;
}
@@ -78,7 +78,7 @@ int net_join(struct net_context *ctx, int argc, const char **argv)
return -1;
}
- libnet_context_destroy(&libnetctx);
+ talloc_free(libnetctx);
return 0;
}
diff --git a/source4/utils/net/net_password.c b/source4/utils/net/net_password.c
index 68fe9223a1..1912beeb41 100644
--- a/source4/utils/net/net_password.c
+++ b/source4/utils/net/net_password.c
@@ -53,7 +53,7 @@ static int net_password_change(struct net_context *ctx, int argc, const char **a
new_password = getpass(password_prompt);
}
- libnetctx = libnet_context_init();
+ libnetctx = libnet_context_init(NULL);
if (!libnetctx) {
return -1;
}
@@ -73,7 +73,7 @@ static int net_password_change(struct net_context *ctx, int argc, const char **a
return -1;
}
- libnet_context_destroy(&libnetctx);
+ talloc_free(libnetctx);
return 0;
}
@@ -128,7 +128,7 @@ static int net_password_set(struct net_context *ctx, int argc, const char **argv
new_password = getpass(password_prompt);
}
- libnetctx = libnet_context_init();
+ libnetctx = libnet_context_init(NULL);
if (!libnetctx) {
return -1;
}
@@ -147,7 +147,7 @@ static int net_password_set(struct net_context *ctx, int argc, const char **argv
return -1;
}
- libnet_context_destroy(&libnetctx);
+ talloc_free(libnetctx);
return 0;
}
diff --git a/source4/utils/net/net_time.c b/source4/utils/net/net_time.c
index 507cfd5f6d..8bdef1f762 100644
--- a/source4/utils/net/net_time.c
+++ b/source4/utils/net/net_time.c
@@ -43,7 +43,7 @@ int net_time(struct net_context *ctx, int argc, const char **argv)
return net_time_usage(ctx, argc, argv);
}
- libnetctx = libnet_context_init();
+ libnetctx = libnet_context_init(NULL);
if (!libnetctx) {
return -1;
}
@@ -66,7 +66,7 @@ int net_time(struct net_context *ctx, int argc, const char **argv)
printf("%s\n",timestr);
- libnet_context_destroy(&libnetctx);
+ talloc_free(libnetctx);
return 0;
}
diff --git a/source4/utils/net/net_user.c b/source4/utils/net/net_user.c
index b1bf85d6f2..dabb4a0d61 100644
--- a/source4/utils/net/net_user.c
+++ b/source4/utils/net/net_user.c
@@ -44,7 +44,7 @@ static int net_user_add(struct net_context *ctx, int argc, const char **argv)
}
/* libnet context init and its params */
- lnet_ctx = libnet_context_init();
+ lnet_ctx = libnet_context_init(NULL);
if (!lnet_ctx) return -1;
lnet_ctx->cred = ctx->credentials;
@@ -61,7 +61,7 @@ static int net_user_add(struct net_context *ctx, int argc, const char **argv)
return -1;
}
- libnet_context_destroy(&lnet_ctx);
+ talloc_free(lnet_ctx);
return 0;
}
diff --git a/source4/utils/net/net_vampire.c b/source4/utils/net/net_vampire.c
index 5a17544e82..e60fd85a7d 100644
--- a/source4/utils/net/net_vampire.c
+++ b/source4/utils/net/net_vampire.c
@@ -31,7 +31,7 @@ int net_samdump(struct net_context *ctx, int argc, const char **argv)
struct libnet_context *libnetctx;
union libnet_SamDump r;
- libnetctx = libnet_context_init();
+ libnetctx = libnet_context_init(NULL);
if (!libnetctx) {
return -1;
}
@@ -50,7 +50,7 @@ int net_samdump(struct net_context *ctx, int argc, const char **argv)
return -1;
}
- libnet_context_destroy(&libnetctx);
+ talloc_free(libnetctx);
return 0;
}
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c
index 8e858e2970..3a94d82c0c 100644
--- a/source4/utils/ntlm_auth.c
+++ b/source4/utils/ntlm_auth.c
@@ -341,8 +341,9 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode,
case GSS_SPNEGO_CLIENT:
case NTLMSSP_CLIENT_1:
/* setup the client side */
-
- if (!NT_STATUS_IS_OK(gensec_client_start(NULL, gensec_state))) {
+
+ nt_status = gensec_client_start(NULL, gensec_state, NULL);
+ if (!NT_STATUS_IS_OK(nt_status)) {
exit(1);
}
@@ -367,7 +368,7 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode,
break;
case GSS_SPNEGO_SERVER:
case SQUID_2_5_NTLMSSP:
- if (!NT_STATUS_IS_OK(gensec_server_start(NULL, gensec_state))) {
+ if (!NT_STATUS_IS_OK(gensec_server_start(NULL, gensec_state, NULL))) {
exit(1);
}
break;