From c358191f9185526d070a8c6df715659f88ea30e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Tue, 2 Sep 2014 09:50:27 +0200 Subject: [PATCH] Disabled option remove_hiberfile on read-only mounts The mount options remove_hiberfile and read-only are contradictory. When both are mentioned, ignore remove_hiberfile. --- src/ntfs-3g_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ntfs-3g_common.c b/src/ntfs-3g_common.c index ca805d6f..ed6b01a1 100644 --- a/src/ntfs-3g_common.c +++ b/src/ntfs-3g_common.c @@ -531,8 +531,10 @@ char *parse_mount_options(ntfs_fuse_context_t *ctx, ctx->secure_flags |= (1 << SECURITY_ACL); if (want_permissions) ctx->secure_flags |= (1 << SECURITY_WANTED); - if (ctx->ro) + if (ctx->ro) { ctx->secure_flags &= ~(1 << SECURITY_ADDSECURIDS); + ctx->hiberfile = FALSE; + } exit: free(options); return ret;