this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use darling-overlay, remove previous tricks

+4 -11
+4 -11
src/startup/darling.c
··· 58 58 const char* DARLING_INIT_COMM = "darling-init"; 59 59 char *prefix; 60 60 uid_t g_originalUid, g_originalGid; 61 - bool g_fixPermissions = false; 62 61 char **g_argv, **g_envp; 63 62 char g_workingDirectory[4096]; 64 63 ··· 107 106 if (!checkPrefixDir()) 108 107 { 109 108 setupPrefix(); 110 - g_fixPermissions = true; 111 109 } 112 110 checkPrefixOwner(); 113 111 ··· 767 765 768 766 opts = (char*) malloc(strlen(prefix)*2 + sizeof(LIBEXEC_PATH) + 100); 769 767 770 - const char* opts_fmt = "lowerdir=%s,upperdir=%s,workdir=%s.workdir,metacopy=on"; 771 - if (linux_release() < LINUX_RELEASE(4, 19, 0)) 772 - opts_fmt = "lowerdir=%s,upperdir=%s,workdir=%s.workdir"; 768 + const char* opts_fmt = "lowerdir=%s,upperdir=%s,workdir=%s.workdir,nfs_export=on,uid=%d"; 773 769 774 - sprintf(opts, opts_fmt, LIBEXEC_PATH, prefix, prefix); 770 + sprintf(opts, opts_fmt, LIBEXEC_PATH, prefix, prefix, g_originalUid); 775 771 776 772 // Mount overlay onto our prefix 777 - if (mount("overlay", prefix, "overlay", 0, opts) != 0) 773 + if (mount("darling-overlay", prefix, "darling-overlay", 0, opts) != 0) 778 774 { 779 775 fprintf(stderr, "Cannot mount overlay: %s\n", strerror(errno)); 780 776 exit(1); 781 777 } 782 778 783 779 free(opts); 784 - 785 - // This is executed once at prefix creation 786 - if (g_fixPermissions) 787 - fixDirectoryPermissions(prefix); 788 780 789 781 snprintf(putOld, sizeof(putOld), "%s/proc", prefix); 790 782 ··· 1058 1050 "/usr/local/share", 1059 1051 "/private", 1060 1052 "/private/var", 1053 + "/private/var/log", 1061 1054 "/private/var/db", 1062 1055 "/var", 1063 1056 "/var/run",