From 0ccd90f2fbe13400d06e57b49db2f04d7fe7d5eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Thu, 22 May 2014 09:45:46 +0200 Subject: [PATCH] Fixed ignoring the umask mount option when permissions are used When permissions are used, umask(2) is supposed to be active and the umask mount option is supposed to be ignored, but it was still wrongly applied. This caused permission restrictions when an external disk was automatically mounted with standard options. --- 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 3cff727d..7a8213c8 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -4058,6 +4058,7 @@ int main(int argc, char *argv[]) } permissions_mode = "User mapping built"; #endif /* POSIXACLS */ + ctx->dmask = ctx->fmask = 0; } else { ctx->security.uid = ctx->uid; ctx->security.gid = ctx->gid; diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index bef29e1b..aedb56b6 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -3903,6 +3903,7 @@ int main(int argc, char *argv[]) #endif /* KERNELPERMS */ permissions_mode = "User mapping built"; #endif /* POSIXACLS */ + ctx->dmask = ctx->fmask = 0; } else { ctx->security.uid = ctx->uid; ctx->security.gid = ctx->gid;