From 776117baf3c9250ee81409e2532ab2d60338eb4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Thu, 22 Jul 2010 14:52:23 +0200 Subject: [PATCH] Fixed processing of options silent and no_def_opts --- src/lowntfs-3g.c | 3 ++- src/ntfs-3g.8.in | 13 +++++++------ src/ntfs-3g.c | 3 ++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c index 7d12c1c5..90197d7e 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -242,7 +242,7 @@ static struct options { } opts; static const char *EXEC_NAME = "ntfs-3g"; -static char def_opts[] = "silent,allow_other,nonempty,"; +static char def_opts[] = "allow_other,nonempty,"; static ntfs_fuse_context_t *ctx; static u32 ntfs_sequence; static const char ghostformat[] = ".ghost-ntfs-3g-%020llu"; @@ -3807,6 +3807,7 @@ static char *parse_mount_options(const char *orig_opts) if (bogus_option_value(val, "no_def_opts")) goto err_exit; no_def_opts = TRUE; /* Don't add default options. */ + ctx->silent = FALSE; /* cancel default silent */ } else if (!strcmp(opt, "default_permissions")) { default_permissions = 1; } else if (!strcmp(opt, "permissions")) { diff --git a/src/ntfs-3g.8.in b/src/ntfs-3g.8.in index 66a38f7d..0473c049 100644 --- a/src/ntfs-3g.8.in +++ b/src/ntfs-3g.8.in @@ -227,13 +227,15 @@ The default is infinite. Note that the size of read requests is limited anyway to 32 pages (which is 128kbyte on i386). .TP .B silent -Do nothing on chmod and chown operations, but do not return error +Do nothing, without returning any error, on chmod and chown operations, when the user mapping file required by these operations is not defined. This option is on by default. .TP .B no_def_opts -By default ntfs-3g acts as if "silent" were set, and -this option cancel this default behavior. +By default ntfs-3g acts as if "silent" (ignore errors on chmod and chown), +"allow_other" (allow any user to access files) and "nonempty" +(allow mounting on non-empty directories) were set, and "no_def_opts" +cancels these default options. .TP .BI streams_interface= value This option controls how the user can access Alternate Data Streams (ADS) @@ -269,11 +271,10 @@ marked for compression. Existing compressed files can still be read and updated. Currently this is the default option. .TP .B debug -Makes ntfs-3g to not detach from terminal and print a lot of debug output from -libntfs-3g and FUSE. +Makes ntfs-3g to print a lot of debug output from libntfs-3g and FUSE. .TP .B no_detach -Same as above but with less debug output. +Makes ntfs-3g to not detach from terminal and print some debug output. .SH USER MAPPING NTFS uses specific ids to record the ownership of files instead of the \fBuid\fP and \fBgid\fP used by Linux. As a consequence a mapping diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index fe491f84..30d3d927 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -200,7 +200,7 @@ static struct options { } opts; static const char *EXEC_NAME = "ntfs-3g"; -static char def_opts[] = "silent,allow_other,nonempty,"; +static char def_opts[] = "allow_other,nonempty,"; static ntfs_fuse_context_t *ctx; static u32 ntfs_sequence; @@ -3753,6 +3753,7 @@ static char *parse_mount_options(const char *orig_opts) if (bogus_option_value(val, "no_def_opts")) goto err_exit; no_def_opts = TRUE; /* Don't add default options. */ + ctx->silent = FALSE; /* cancel default silent */ } else if (!strcmp(opt, "default_permissions")) { default_permissions = 1; } else if (!strcmp(opt, "permissions")) {