From f9a5ad134836cf2e9acf6a93dd8460c9fd5b8833 Mon Sep 17 00:00:00 2001 From: Akihiro Sagawa Date: Sun, 1 Oct 2017 21:23:10 +0900 Subject: [PATCH] ntdll: Treat CIFS/SMB2 file systems as remote devices. Signed-off-by: Akihiro Sagawa Signed-off-by: Alexandre Julliard --- dlls/ntdll/directory.c | 2 ++ dlls/ntdll/file.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 9d5cf92b2aa..3b76f9bfd3f 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -640,6 +640,7 @@ static char *parse_mount_entries( FILE *f, dev_t dev, ino_t ino ) { /* don't even bother stat'ing network mounts, there's no meaningful device anyway */ if (!strcmp( entry->mnt_type, "nfs" ) || + !strcmp( entry->mnt_type, "cifs" ) || !strcmp( entry->mnt_type, "smbfs" ) || !strcmp( entry->mnt_type, "ncpfs" )) continue; @@ -918,6 +919,7 @@ static char *get_device_mount_point( dev_t dev ) { /* don't even bother stat'ing network mounts, there's no meaningful device anyway */ if (!strcmp( entry->mnt_type, "nfs" ) || + !strcmp( entry->mnt_type, "cifs" ) || !strcmp( entry->mnt_type, "smbfs" ) || !strcmp( entry->mnt_type, "ncpfs" )) continue; diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index d4985812301..c12110ea93e 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -3114,7 +3114,9 @@ static NTSTATUS get_device_info( int fd, FILE_FS_DEVICE_INFORMATION *info ) info->Characteristics |= FILE_REMOVABLE_MEDIA|FILE_READ_ONLY_DEVICE; break; case 0x6969: /* nfs */ - case 0x517B: /* smbfs */ + case 0xff534d42: /* cifs */ + case 0xfe534d42: /* smb2 */ + case 0x517b: /* smbfs */ case 0x564c: /* ncpfs */ info->DeviceType = FILE_DEVICE_NETWORK_FILE_SYSTEM; info->Characteristics |= FILE_REMOTE_DEVICE;