Fixed processing of options silent and no_def_opts

PERMISSION_HANDLING_BRANCH
Jean-Pierre André 2010-07-22 14:52:23 +02:00
parent 891b7e97b3
commit 776117baf3
3 changed files with 11 additions and 8 deletions

View File

@ -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")) {

View File

@ -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

View File

@ -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")) {