diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-03-03 00:23:09 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-03-03 00:23:09 +0100 |
commit | c7dc53b8514f83800184d2b20b1897e54843a614 (patch) | |
tree | 4f09d783271dc5e38809ed02c8252d73f8b147e5 /source4/libcli/raw | |
parent | 375df425c5014dc852995038e8e5668f98af8ba3 (diff) | |
parent | 85d53f7b603f7c15b007f8c3fdde1989f07a6eb2 (diff) | |
download | samba-c7dc53b8514f83800184d2b20b1897e54843a614.tar.gz samba-c7dc53b8514f83800184d2b20b1897e54843a614.tar.bz2 samba-c7dc53b8514f83800184d2b20b1897e54843a614.zip |
Merge branch 'v4-0-test' into id10ts-registry
(This used to be commit f98b59021a5ea39c7970ebc5520d17775e500b8c)
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r-- | source4/libcli/raw/clisession.c | 4 | ||||
-rw-r--r-- | source4/libcli/raw/clisocket.c | 4 | ||||
-rw-r--r-- | source4/libcli/raw/libcliraw.h | 6 |
3 files changed, 13 insertions, 1 deletions
diff --git a/source4/libcli/raw/clisession.c b/source4/libcli/raw/clisession.c index 55cb3ef305..5a33d9cffc 100644 --- a/source4/libcli/raw/clisession.c +++ b/source4/libcli/raw/clisession.c @@ -22,6 +22,7 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" #include "system/filesys.h" +#include "param/param.h" #define SETUP_REQUEST_SESSION(cmd, wct, buflen) do { \ req = smbcli_request_setup_session(session, cmd, wct, buflen); \ @@ -51,6 +52,9 @@ struct smbcli_session *smbcli_session_init(struct smbcli_transport *transport, } session->pid = (uint16_t)getpid(); session->vuid = UID_FIELD_INVALID; + session->options.lanman_auth = lp_client_lanman_auth(global_loadparm); + session->options.ntlmv2_auth = lp_client_ntlmv2_auth(global_loadparm); + session->options.plaintext_auth = lp_client_plaintext_auth(global_loadparm); capabilities = transport->negotiate.capabilities; diff --git a/source4/libcli/raw/clisocket.c b/source4/libcli/raw/clisocket.c index 8fcb8bb48c..eaa02e1047 100644 --- a/source4/libcli/raw/clisocket.c +++ b/source4/libcli/raw/clisocket.c @@ -33,6 +33,7 @@ struct sock_connect_state { const char *host_name; int num_ports; uint16_t *ports; + const char *socket_options; struct smbcli_socket *result; }; @@ -80,6 +81,7 @@ struct composite_context *smbcli_sock_connect_send(TALLOC_CTX *mem_ctx, for (i=0;ports[i];i++) { state->ports[i] = atoi(ports[i]); } + state->socket_options = lp_socket_options(global_loadparm); ctx = socket_connect_multi_send(state, host_addr, state->num_ports, state->ports, @@ -108,7 +110,7 @@ static void smbcli_sock_connect_recv_conn(struct composite_context *ctx) if (!composite_is_ok(state->ctx)) return; state->ctx->status = - socket_set_option(sock, lp_socket_options(global_loadparm), NULL); + socket_set_option(sock, state->socket_options, NULL); if (!composite_is_ok(state->ctx)) return; diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 7111649fc1..0578a9eab1 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -186,6 +186,12 @@ struct smbcli_session { /* the spnego context if we use extented security */ struct gensec_security *gensec; + + struct smbcli_session_options { + uint_t lanman_auth:1; + uint_t ntlmv2_auth:1; + uint_t plaintext_auth:1; + } options; }; /* |