summaryrefslogtreecommitdiffstats
path: root/source/utils
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-16 11:36:09 +0000
committerAndrew Tridgell <tridge@samba.org>2005-06-16 11:36:09 +0000
commit462c8329277d0289710b0c40ebe5ba92db9ab1bd (patch)
tree165400e8faa38e8fc91f0028322c97eb1167b631 /source/utils
parent7820c0108f6271d5f0d82c04ccf530eb994fdef8 (diff)
downloadsamba-462c8329277d0289710b0c40ebe5ba92db9ab1bd.tar.gz
samba-462c8329277d0289710b0c40ebe5ba92db9ab1bd.tar.xz
samba-462c8329277d0289710b0c40ebe5ba92db9ab1bd.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
Diffstat (limited to 'source/utils')
-rw-r--r--source/utils/net/net_join.c4
-rw-r--r--source/utils/net/net_password.c8
-rw-r--r--source/utils/net/net_time.c4
-rw-r--r--source/utils/net/net_user.c4
-rw-r--r--source/utils/net/net_vampire.c4
-rw-r--r--source/utils/ntlm_auth.c7
6 files changed, 16 insertions, 15 deletions
diff --git a/source/utils/net/net_join.c b/source/utils/net/net_join.c
index 717a9364a5b..7f9ab0c6351 100644
--- a/source/utils/net/net_join.c
+++ b/source/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/source/utils/net/net_password.c b/source/utils/net/net_password.c
index 68fe9223a12..1912beeb41b 100644
--- a/source/utils/net/net_password.c
+++ b/source/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/source/utils/net/net_time.c b/source/utils/net/net_time.c
index 507cfd5f6d6..8bdef1f7620 100644
--- a/source/utils/net/net_time.c
+++ b/source/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/source/utils/net/net_user.c b/source/utils/net/net_user.c
index b1bf85d6f2b..dabb4a0d61d 100644
--- a/source/utils/net/net_user.c
+++ b/source/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/source/utils/net/net_vampire.c b/source/utils/net/net_vampire.c
index 5a17544e82e..e60fd85a7de 100644
--- a/source/utils/net/net_vampire.c
+++ b/source/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/source/utils/ntlm_auth.c b/source/utils/ntlm_auth.c
index 8e858e2970d..3a94d82c0ca 100644
--- a/source/utils/ntlm_auth.c
+++ b/source/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;