From ae4a797473fb3a991b4217fc62c08a48a3895432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Mon, 23 Jun 2014 10:59:38 +0200 Subject: [PATCH] Disabled the default user mapping when Windows inheritance is used Windows-type inheritance is meaningful only when used with user identifications known to Windows, so avoid using default ones. --- src/lowntfs-3g.c | 1 + src/ntfs-3g.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c index 7a8213c8..04a239c5 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -4026,6 +4026,7 @@ int main(int argc, char *argv[]) if (!ntfs_build_mapping(&ctx->security,ctx->usermap_path, (ctx->vol->secure_flags & ((1 << SECURITY_DEFAULT) | (1 << SECURITY_ACL))) + && !ctx->inherit && !(ctx->vol->secure_flags & (1 << SECURITY_WANTED)))) { #if POSIXACLS /* use basic permissions if requested */ diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index aedb56b6..558d2577 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -3872,6 +3872,7 @@ int main(int argc, char *argv[]) if (!ntfs_build_mapping(&ctx->security,ctx->usermap_path, (ctx->vol->secure_flags & ((1 << SECURITY_DEFAULT) | (1 << SECURITY_ACL))) + && !ctx->inherit && !(ctx->vol->secure_flags & (1 << SECURITY_WANTED)))) { #if POSIXACLS /* use basic permissions if requested */