diff options
author | Gerald Carter <jerry@samba.org> | 2007-04-09 16:04:07 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2007-04-09 16:04:07 +0000 |
commit | 7dcb89c1236f9712f9018744bea2e016b5cdfab9 (patch) | |
tree | 69b6dd928b31818c82a7368be3cff169cc8b8a61 /source/smbd/reply.c | |
parent | 099d375891d4444320bd451486e8bf7d9afdbe0f (diff) | |
download | samba-7dcb89c1236f9712f9018744bea2e016b5cdfab9.tar.gz samba-7dcb89c1236f9712f9018744bea2e016b5cdfab9.tar.xz samba-7dcb89c1236f9712f9018744bea2e016b5cdfab9.zip |
r22138: * Sync up with the SAMBA_3_0_25 as of svn r22132.
* Set VERSION to 3.0.25rc1
* Update release notes.
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r-- | source/smbd/reply.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 14b16e1ae23..98d72ba742b 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -451,6 +451,7 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt int passlen = SVAL(inbuf,smb_vwv3); pstring path; char *p, *q; + uint16 tcon_flags = SVAL(inbuf,smb_vwv2); START_PROFILE(SMBtconX); @@ -521,7 +522,27 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt /* NT sets the fstype of IPC$ to the null string */ const char *fstype = IS_IPC(conn) ? "" : lp_fstype(SNUM(conn)); - set_message(outbuf,3,0,True); + if (tcon_flags & TCONX_FLAG_EXTENDED_RESPONSE) { + /* Return permissions. */ + uint32 perm1 = 0; + uint32 perm2 = 0; + + set_message(outbuf,7,0,True); + + if (IS_IPC(conn)) { + perm1 = FILE_ALL_ACCESS; + perm2 = FILE_ALL_ACCESS; + } else { + perm1 = CAN_WRITE(conn) ? + SHARE_ALL_ACCESS : + SHARE_READ_ONLY; + } + + SIVAL(outbuf, smb_vwv3, perm1); + SIVAL(outbuf, smb_vwv5, perm2); + } else { + set_message(outbuf,3,0,True); + } p = smb_buf(outbuf); p += srvstr_push(outbuf, p, server_devicetype, -1, |