• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/corennnnn


Commit MetaInfo

Révision1576854573b0ee5525f4a3476d0f58d2f45eeae1 (tree)
l'heure2016-07-26 19:04:16
AuteurSteve Kondik <steve@cyng...>
CommiterSteve Kondik

Message de Log

sdcard: Pass the umask to sdcardfs correctly

  • Google version of the kernel code expects unsigned int rather than
    1. Don't confuse it.

Change-Id: I40f060dc5212ec587e612dc275001e1a660cce67

Change Summary

Modification

--- a/sdcard/sdcard.c
+++ b/sdcard/sdcard.c
@@ -1792,7 +1792,7 @@ static int fuse_setup(struct fuse* fuse, gid_t gid, mode_t mask, bool use_sdcard
17921792
17931793 if (use_sdcardfs) {
17941794 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",
17961796 (fuse->global->multi_user ? "multiuser," : ""),
17971797 fuse->global->uid, fuse->global->gid,
17981798 fuse->global->root.userid, gid, mask);
@@ -1909,11 +1909,6 @@ static void run(const char* source_path, const char* label, uid_t uid,
19091909 }
19101910 }
19111911
1912- // Nothing else for us to do if sdcardfs is in use!
1913- if (use_sdcardfs) {
1914- exit(0);
1915- }
1916-
19171912 /* Drop privs */
19181913 if (setgroups(sizeof(kGroups) / sizeof(kGroups[0]), kGroups) < 0) {
19191914 ERROR("cannot setgroups: %s\n", strerror(errno));
@@ -1932,6 +1927,11 @@ static void run(const char* source_path, const char* label, uid_t uid,
19321927 fs_prepare_dir(global.obb_path, 0775, uid, gid);
19331928 }
19341929
1930+ // Nothing else for us to do if sdcardfs is in use!
1931+ if (use_sdcardfs) {
1932+ exit(0);
1933+ }
1934+
19351935 if (pthread_create(&thread_default, NULL, start_handler, &handler_default)
19361936 || pthread_create(&thread_read, NULL, start_handler, &handler_read)
19371937 || pthread_create(&thread_write, NULL, start_handler, &handler_write)) {