summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-08-01 12:01:07 +0200
committerStefan Metzmacher <metze@samba.org>2012-08-01 18:25:26 +0200
commitb93e6ef5e70bd90a06ae80b209a10456ca461a62 (patch)
treed083033dcc25b6db83f5deb16d079373ed470a75
parent3fb6549db0b12565413a89ef0662e7e8af3b389a (diff)
downloadsamba-b93e6ef5e70bd90a06ae80b209a10456ca461a62.tar.gz
samba-b93e6ef5e70bd90a06ae80b209a10456ca461a62.tar.bz2
samba-b93e6ef5e70bd90a06ae80b209a10456ca461a62.zip
s3:smbd: add a optional_support helper variable to reply_tcon_and_X()
metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Aug 1 18:25:26 CEST 2012 on sn-devel-104
-rw-r--r--source3/smbd/reply.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index dfb279db61..a89338082f 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -840,6 +840,7 @@ void reply_tcon_and_X(struct smb_request *req)
} else {
/* NT sets the fstype of IPC$ to the null string */
const char *fstype = IS_IPC(conn) ? "" : lp_fstype(ctx, SNUM(conn));
+ uint16_t optional_support = 0;
if (tcon_flags & TCONX_FLAG_EXTENDED_RESPONSE) {
/* Return permissions. */
@@ -872,15 +873,17 @@ void reply_tcon_and_X(struct smb_request *req)
/* what does setting this bit do? It is set by NT4 and
may affect the ability to autorun mounted cdroms */
- SSVAL(req->outbuf, smb_vwv2, SMB_SUPPORT_SEARCH_BITS|
- (lp_csc_policy(SNUM(conn)) << 2));
+ optional_support |= SMB_SUPPORT_SEARCH_BITS;
+ optional_support |=
+ (lp_csc_policy(SNUM(conn)) << SMB_CSC_POLICY_SHIFT);
if (lp_msdfs_root(SNUM(conn)) && lp_host_msdfs()) {
DEBUG(2,("Serving %s as a Dfs root\n",
lp_servicename(ctx, SNUM(conn)) ));
- SSVAL(req->outbuf, smb_vwv2,
- SMB_SHARE_IN_DFS | SVAL(req->outbuf, smb_vwv2));
+ optional_support |= SMB_SHARE_IN_DFS;
}
+
+ SSVAL(req->outbuf, smb_vwv2, optional_support);
}
SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */