diff options
author | Jeremy Allison <jra@samba.org> | 2010-05-19 21:28:08 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-05-19 21:28:08 -0700 |
commit | 2c61c93a51a8e8c41da8a54945dc67d6dc416141 (patch) | |
tree | d346e8681ddf46d41d2aa84adcfe23bd6a5f908d /source3/smbd | |
parent | fad5d33bf880bcc137f7cb47e72cd0e07d92eec3 (diff) | |
download | samba-2c61c93a51a8e8c41da8a54945dc67d6dc416141.tar.gz samba-2c61c93a51a8e8c41da8a54945dc67d6dc416141.tar.bz2 samba-2c61c93a51a8e8c41da8a54945dc67d6dc416141.zip |
Fix bug 7442 - Samba returns incorrect SMB2 QFS device info.
Add the correct devicetype and characteristics for this info level.
Jeremy.
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/trans2.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index dec9d7f8f9..6e1defaac2 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -3123,10 +3123,17 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned case SMB_QUERY_FS_DEVICE_INFO: case SMB_FS_DEVICE_INFORMATION: + { + uint32_t characteristics = FILE_DEVICE_IS_MOUNTED; + + if (!CAN_WRITE(conn)) { + characteristics |= FILE_READ_ONLY_DEVICE; + } data_len = 8; - SIVAL(pdata,0,0); /* dev type */ - SIVAL(pdata,4,0); /* characteristics */ + SIVAL(pdata,0,FILE_DEVICE_DISK); /* dev type */ + SIVAL(pdata,4,characteristics); break; + } #ifdef HAVE_SYS_QUOTAS case SMB_FS_QUOTA_INFORMATION: |