summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/trans2.c11
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: