diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-07-10 10:24:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:55 -0500 |
commit | efb010202f8c2edb35ab6fbbb57650140c21734a (patch) | |
tree | 48af98c918285a7bad79a43ac903fa66b3e357de /source4/libcli | |
parent | 102f5bc17da8948f1d6133a6874bf81f1145a395 (diff) | |
download | samba-efb010202f8c2edb35ab6fbbb57650140c21734a.tar.gz samba-efb010202f8c2edb35ab6fbbb57650140c21734a.tar.xz samba-efb010202f8c2edb35ab6fbbb57650140c21734a.zip |
r1429: enable spnego in smbclient too.
metze
(This used to be commit ae2e6b58629397d75a3e446ff0c50b594d029206)
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/cliconnect.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c index e2d96657921..8b064f161ec 100644 --- a/source4/libcli/cliconnect.c +++ b/source4/libcli/cliconnect.c @@ -76,12 +76,17 @@ NTSTATUS cli_session_setup(struct cli_state *cli, setup.generic.level = RAW_SESSSETUP_GENERIC; setup.generic.in.sesskey = cli->transport->negotiate.sesskey; - setup.generic.in.capabilities = CAP_UNICODE | CAP_STATUS32 | - CAP_LARGE_FILES | CAP_NT_SMBS | CAP_LEVEL_II_OPLOCKS | - CAP_W2K_SMBS | CAP_LARGE_READX | CAP_LARGE_WRITEX; - setup.generic.in.password = password; - setup.generic.in.user = user; - setup.generic.in.domain = domain; + setup.generic.in.capabilities = cli->transport->negotiate.capabilities; + if (!user || !user[0]) { + setup.generic.in.password = NULL; + setup.generic.in.user = ""; + setup.generic.in.domain = ""; + setup.generic.in.capabilities &= ~CAP_EXTENDED_SECURITY; + } else { + setup.generic.in.password = password; + setup.generic.in.user = user; + setup.generic.in.domain = domain; + } status = smb_raw_session_setup(cli->session, mem_ctx, &setup); |