From da62eccc46a2c1b617eb7c3de18a406e67b817cc Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 5 Mar 2015 11:22:16 +0100 Subject: [PATCH] Mount /run/media if mount-host-fs This is where things like usb sticks etc, show up, so its important to include. --- xdg-app-helper.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xdg-app-helper.c b/xdg-app-helper.c index b3a46aa6..77142655 100644 --- a/xdg-app-helper.c +++ b/xdg-app-helper.c @@ -325,6 +325,7 @@ static const create_table_t create[] = { { FILE_TYPE_DIR, "self", 0755}, { FILE_TYPE_DIR, "run", 0755}, { FILE_TYPE_DIR, "run/dbus", 0755}, + { FILE_TYPE_DIR, "run/media", 0755}, { FILE_TYPE_DIR, "run/user", 0755}, { FILE_TYPE_DIR, "run/user/%1$d", 0700, NULL}, { FILE_TYPE_DIR, "run/user/%1$d/pulse", 0700, NULL}, @@ -1553,7 +1554,10 @@ main (int argc, } if (mount_host_fs) - mount_extra_root_dirs (mount_host_fs_ro); + { + mount_extra_root_dirs (mount_host_fs_ro); + bind_mount ("/run/media", "run/media", BIND_RECURSIVE | (mount_host_fs_ro ? BIND_READONLY : 0)); + } if (!mount_host_fs) create_homedir (mount_home, app_id);