diff options
author | Jeremy Allison <jra@samba.org> | 2019-10-29 12:11:01 -0700 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2019-10-30 20:44:31 +0000 |
commit | 1cfcad6283da855d3e97237a7a6fd6f4d2436ee2 (patch) | |
tree | a029dceeea46582a2c3c5b4113f91e579e00822d /source3/libsmb | |
parent | 41edeff416407d3eae21c7ad43d891dbacc32662 (diff) | |
download | samba-1cfcad6283da855d3e97237a7a6fd6f4d2436ee2.tar.gz |
s3: libsmb: Ensure we don't call cli_RNetShareEnum() on an SMB1 connection.
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/libsmb')
-rw-r--r-- | source3/libsmb/libsmb_dir.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c index df606c4adfe..ab20a127c49 100644 --- a/source3/libsmb/libsmb_dir.c +++ b/source3/libsmb/libsmb_dir.c @@ -856,7 +856,12 @@ SMBC_opendir_ctx(SMBCCTX *context, list_fn, (void *)dir); if (rc != 0 && - lp_client_min_protocol() <= PROTOCOL_NT1) { + smbXcli_conn_protocol(srv->cli->conn) <= + PROTOCOL_NT1) { + /* + * Only call cli_RNetShareEnum() + * on SMB1 connections, not SMB2+. + */ rc = cli_RNetShareEnum(srv->cli, list_fn, (void *)dir); |