From 3b6818862eea1f9be8ea4826b7eabf3ad40658af Mon Sep 17 00:00:00 2001 From: szaka Date: Thu, 9 Aug 2007 21:15:28 +0000 Subject: [PATCH] don't turn on permission checking if umask, fmask or dmask is zero since the effect were just the opposite users wanted --- src/ntfs-3g.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index 838d7029..aa09d080 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -1768,7 +1768,8 @@ static char *parse_mount_options(const char *orig_opts) } sscanf(val, "%o", &ctx->fmask); ctx->dmask = ctx->fmask; - default_permissions = 1; + if (ctx->fmask) + default_permissions = 1; } else if (!strcmp(opt, "fmask")) { if (!val) { ntfs_log_error("'fmask' option should have " @@ -1776,7 +1777,8 @@ static char *parse_mount_options(const char *orig_opts) goto err_exit; } sscanf(val, "%o", &ctx->fmask); - default_permissions = 1; + if (ctx->fmask) + default_permissions = 1; } else if (!strcmp(opt, "dmask")) { if (!val) { ntfs_log_error("'dmask' option should have " @@ -1784,7 +1786,8 @@ static char *parse_mount_options(const char *orig_opts) goto err_exit; } sscanf(val, "%o", &ctx->dmask); - default_permissions = 1; + if (ctx->dmask) + default_permissions = 1; } else if (!strcmp(opt, "uid")) { if (!val) { ntfs_log_error("'uid' option should have "