summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-07 00:40:18 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-07 00:40:18 +0000
commit029144cd8c07aa82100b545574e3af1201426b58 (patch)
tree2a697ebd47777454608140515ee15a5be226d10e
parent0cf1ea4e2eafff8a65ef8766fe7351281d2dd53b (diff)
downloadsamba-029144cd8c07aa82100b545574e3af1201426b58.tar.gz
samba-029144cd8c07aa82100b545574e3af1201426b58.tar.bz2
samba-029144cd8c07aa82100b545574e3af1201426b58.zip
do an anonymous login if the username/password is rejected.
(This used to be commit 0ee3e0c62378bdf7a8e145de0727ea85763af95a)
-rw-r--r--source3/libsmb/clientgen.c1
-rw-r--r--source3/smbwrapper/smbw.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 70231e3c94..38b4b5ffeb 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -764,6 +764,7 @@ BOOL cli_send_tconX(struct cli_state *cli,
fstrcpy(cli->share, share);
+ /* in user level security don't send a password now */
if (cli->sec_mode & 1) {
passlen = 1;
pass = "";
diff --git a/source3/smbwrapper/smbw.c b/source3/smbwrapper/smbw.c
index 6b8796fb5d..a4d2033c49 100644
--- a/source3/smbwrapper/smbw.c
+++ b/source3/smbwrapper/smbw.c
@@ -427,7 +427,9 @@ struct smbw_server *smbw_server(char *server, char *share)
if (!cli_session_setup(&c, username,
password, strlen(password),
password, strlen(password),
- workgroup)) {
+ workgroup) &&
+ /* try an anonymous login if it failed */
+ !cli_session_setup(&c, "", "", 1,"", 0, workgroup)) {
cli_shutdown(&c);
errno = EPERM;
return NULL;