system/corennnnn
Révision | 1576854573b0ee5525f4a3476d0f58d2f45eeae1 (tree) |
---|---|
l'heure | 2016-07-26 19:04:16 |
Auteur | Steve Kondik <steve@cyng...> |
Commiter | Steve Kondik |
sdcard: Pass the umask to sdcardfs correctly
Change-Id: I40f060dc5212ec587e612dc275001e1a660cce67
@@ -1792,7 +1792,7 @@ static int fuse_setup(struct fuse* fuse, gid_t gid, mode_t mask, bool use_sdcard | ||
1792 | 1792 | |
1793 | 1793 | if (use_sdcardfs) { |
1794 | 1794 | snprintf(opts, sizeof(opts), |
1795 | - "%sfsuid=%d,fsgid=%d,userid=%d,gid=%d,mask=%04o,reserved_mb=20", | |
1795 | + "%sfsuid=%u,fsgid=%u,userid=%d,gid=%u,mask=%u,reserved_mb=20", | |
1796 | 1796 | (fuse->global->multi_user ? "multiuser," : ""), |
1797 | 1797 | fuse->global->uid, fuse->global->gid, |
1798 | 1798 | fuse->global->root.userid, gid, mask); |
@@ -1909,11 +1909,6 @@ static void run(const char* source_path, const char* label, uid_t uid, | ||
1909 | 1909 | } |
1910 | 1910 | } |
1911 | 1911 | |
1912 | - // Nothing else for us to do if sdcardfs is in use! | |
1913 | - if (use_sdcardfs) { | |
1914 | - exit(0); | |
1915 | - } | |
1916 | - | |
1917 | 1912 | /* Drop privs */ |
1918 | 1913 | if (setgroups(sizeof(kGroups) / sizeof(kGroups[0]), kGroups) < 0) { |
1919 | 1914 | ERROR("cannot setgroups: %s\n", strerror(errno)); |
@@ -1932,6 +1927,11 @@ static void run(const char* source_path, const char* label, uid_t uid, | ||
1932 | 1927 | fs_prepare_dir(global.obb_path, 0775, uid, gid); |
1933 | 1928 | } |
1934 | 1929 | |
1930 | + // Nothing else for us to do if sdcardfs is in use! | |
1931 | + if (use_sdcardfs) { | |
1932 | + exit(0); | |
1933 | + } | |
1934 | + | |
1935 | 1935 | if (pthread_create(&thread_default, NULL, start_handler, &handler_default) |
1936 | 1936 | || pthread_create(&thread_read, NULL, start_handler, &handler_read) |
1937 | 1937 | || pthread_create(&thread_write, NULL, start_handler, &handler_write)) { |