int flags;
const char* options;
} mountpoints[] = {
+ { "pakfire_root", "", "tmpfs", 0, NULL },
+
{ "pakfire_proc", "proc", "proc", MS_NOSUID|MS_NOEXEC|MS_NODEV, NULL },
// Bind mount /proc/sys as read-only with the following exceptions:
int r;
for (const struct pakfire_mountpoint* mp = mountpoints; mp->source; mp++) {
+ // Skip mounting root when operating in /
+ if (strcmp(pakfire->path, "/") == 0 && !*mp->target)
+ continue;
+
DEBUG(pakfire, "Mounting /%s\n", mp->target);
char* target = pakfire_path_join(pakfire->path, mp->target);
// Destroy everything when done
p->destroy_on_free = 1;
-
- // Mount tmpfs
- r = __mount(p, "pakfire_root", path, "tmpfs", 0, NULL);
- if (r)
- goto ERROR;
}
// Set path