diff options
author | Richard Sharpe <sharpe@samba.org> | 2003-03-05 23:55:11 +0000 |
---|---|---|
committer | Richard Sharpe <sharpe@samba.org> | 2003-03-05 23:55:11 +0000 |
commit | 6149dfd3e7b9848720d18ad2c095b1f5e58ffd86 (patch) | |
tree | 1ffb163519721024df783f21122cc19b153bd51f /source3 | |
parent | 48e3bf2e9579abcf8dc07d7a33a1e44b4abc1a12 (diff) | |
download | samba-6149dfd3e7b9848720d18ad2c095b1f5e58ffd86.tar.gz samba-6149dfd3e7b9848720d18ad2c095b1f5e58ffd86.tar.bz2 samba-6149dfd3e7b9848720d18ad2c095b1f5e58ffd86.zip |
Add *SMBSERVER fallback code to smbtorture ...
(This used to be commit 460339db2246b0213252ee34f507eb8e55ecbecb)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/torture/torture.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 1744d3109c..2f779b9c89 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -124,9 +124,23 @@ static BOOL open_nbt_connection(struct cli_state *c) if (use_level_II_oplocks) c->use_level_II_oplocks = True; if (!cli_session_request(c, &calling, &called)) { - printf("%s rejected the session\n",host); - cli_shutdown(c); - return False; + /* + * Well, that failed, try *SMBSERVER ... + * However, we must reconnect as well ... + */ + if (!cli_connect(c, host, &ip)) { + printf("Failed to connect with %s\n", host); + return False; + } + + make_nmb_name(&called, "*SMBSERVER", 0x20); + if (!cli_session_request(c, &calling, &called)) { + printf("%s rejected the session\n",host); + printf("We tried with a called name of %s & %s\n", + host, "*SMBSERVER"); + cli_shutdown(c); + return False; + } } return True; |