diff options
author | Jeremy Allison <jra@samba.org> | 2019-10-29 12:11:49 -0700 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2019-10-30 20:44:31 +0000 |
commit | f30b8b3aa1309e9daeb9a3601b537dead81e5dbb (patch) | |
tree | 2275cb3ca06cb4569a79f6c00e7531b692af5ad1 /source3 | |
parent | 1cfcad6283da855d3e97237a7a6fd6f4d2436ee2 (diff) | |
download | samba-f30b8b3aa1309e9daeb9a3601b537dead81e5dbb.tar.gz |
s3: utils: smbtree. Ensure we don't call cli_RNetShareEnum() on an SMB1 connection.
Last unprotected call of cli_RNetShareEnum(). Not a libsmbclient
bug here but might as well fix the last caller as part of the
fix for the bug.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14174
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/smbtree.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c index 0a0dac0f9d5..8e4caf0e80b 100644 --- a/source3/utils/smbtree.c +++ b/source3/utils/smbtree.c @@ -26,6 +26,7 @@ #include "libsmb/libsmb.h" #include "libsmb/namequery.h" #include "libsmb/clirap.h" +#include "../libcli/smb/smbXcli_base.h" static int use_bcast; @@ -231,6 +232,10 @@ static bool get_shares(char *server_name, const struct user_auth_info *user_info if (get_rpc_shares(cli, add_name, &shares)) return True; + if (smbXcli_conn_protocol(cli->conn) > PROTOCOL_NT1) { + return false; + } + if (!cli_RNetShareEnum(cli, add_name, &shares)) return False; |