From 8144a70bd7e38de0fa72bc821d79dac2e7388463 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 1 Feb 2016 21:27:54 +0100 Subject: [PATCH] helper: Make ~/.local/share/xdg-app writable again (if you have homedir access) This makes the gnome-software app work, and if you have homedir access you have all sort of ways to mess up apps anyway, so this is fake security. --- common/xdg-app-helper.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/common/xdg-app-helper.c b/common/xdg-app-helper.c index 0e5c163c0..1bdc75879 100644 --- a/common/xdg-app-helper.c +++ b/common/xdg-app-helper.c @@ -2496,22 +2496,8 @@ main (int argc, if (mount_host_fs || mount_home) { - const char *home = getenv("HOME"); char *dconf_run_path = strdup_printf ("/run/user/%d/dconf", uid); - /* There really is no need for an app to install or modify other - apps, so lets forbid it directly */ - if (home) - { - char *xdg_app_dir; - - xdg_app_dir = strconcat (home, "/.local/share/xdg-app"); - - if (bind_mount (xdg_app_dir, get_relative_path (xdg_app_dir), BIND_READONLY) && errno != ENOENT) - die_with_error ("Unable to remount xdg-app dir readonly\n"); - free (xdg_app_dir); - } - /* If the user has homedir access, also allow dconf run dir access */ bind_mount (dconf_run_path, get_relative_path (dconf_run_path), 0); free (dconf_run_path);