diff options
author | relan <relan@users.noreply.github.com> | 2015-01-14 09:53:19 +0000 |
---|---|---|
committer | relan <relan@users.noreply.github.com> | 2015-08-24 08:26:17 +0300 |
commit | 54c378168620c79f5292e98dbe46074728bbe9ce (patch) | |
tree | 49755a715e619c49afd8b328aa81226390d661a5 | |
parent | 50c3ff853752c55a6acc144d1dd6406950750801 (diff) | |
download | android_external_exfat-54c378168620c79f5292e98dbe46074728bbe9ce.tar.gz android_external_exfat-54c378168620c79f5292e98dbe46074728bbe9ce.tar.bz2 android_external_exfat-54c378168620c79f5292e98dbe46074728bbe9ce.zip |
Pass default_permissions to FUSE.
This makes umask, dmask and fmask options work out-of-the-box.
Signed-off-by: Helg Bredow <xx404@msn.com>
-rw-r--r-- | fuse/main.c | 2 | ||||
-rw-r--r-- | libexfat/mount.c | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/fuse/main.c b/fuse/main.c index 58b7b2f..08acea5 100644 --- a/fuse/main.c +++ b/fuse/main.c @@ -41,7 +41,7 @@ #endif const char* default_options = "ro_fallback,allow_other,blkdev,big_writes," - "defer_permissions"; + "default_permissions"; struct exfat ef; diff --git a/libexfat/mount.c b/libexfat/mount.c index 2ebf436..bb4dd09 100644 --- a/libexfat/mount.c +++ b/libexfat/mount.c @@ -84,13 +84,11 @@ static bool match_option(const char* options, const char* option_name) static void parse_options(struct exfat* ef, const char* options) { - int sys_umask = umask(0); int opt_umask; - umask(sys_umask); /* restore umask */ - opt_umask = get_int_option(options, "umask", 8, sys_umask); - ef->dmask = get_int_option(options, "dmask", 8, opt_umask) & 0777; - ef->fmask = get_int_option(options, "fmask", 8, opt_umask) & 0777; + opt_umask = get_int_option(options, "umask", 8, 0); + ef->dmask = get_int_option(options, "dmask", 8, opt_umask); + ef->fmask = get_int_option(options, "fmask", 8, opt_umask); ef->uid = get_int_option(options, "uid", 10, geteuid()); ef->gid = get_int_option(options, "gid", 10, getegid()); |