diff options
author | Alex Kiernan <alex.kiernan@gmail.com> | 2018-09-23 17:21:00 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-25 23:15:49 +0100 |
commit | 72cd62e66e2f65876415ed9ac91d899d22ed7ddc (patch) | |
tree | 576c82abe63a86dd93499d292c92fb0635703205 /meta | |
parent | 705941f8c3d2b522cd4bef7c5fe72771c40c8688 (diff) | |
download | poky-72cd62e66e2f65876415ed9ac91d899d22ed7ddc.tar.gz |
glib-2.0: Drop allow /run/media for root patch
Upstream implemented an equivalent fix in:
c672fcc0a8d6 ("gunixmounts: Allow root to display mounts under /run/media/$username")
As a result, this change is completely broken when running as root, as
user_name is unitialised when testing strcmp(user_name, "root") so just
segfaults.
(From OE-Core rev: 547e81b678a616ebbdf2e5cc86e918966fafb894)
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch | 37 | ||||
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0_2.58.0.bb | 1 |
2 files changed, 0 insertions, 38 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch b/meta/recipes-core/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch deleted file mode 100644 index 3040479422..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From 66e5fd5e870a2de04ec0f0c5dbfa23db496bad43 Mon Sep 17 00:00:00 2001 | ||
2 | From: Marius Avram <marius.avram@intel.com> | ||
3 | Date: Wed, 27 Aug 2014 12:10:41 +0300 | ||
4 | Subject: [PATCH] Allow /run/media/sdX drive mount if username root | ||
5 | |||
6 | In case that the username logged in the system is root | ||
7 | the drives are directly mounted in /run/media/sdX and | ||
8 | not /run/media/<username>/sdX as the function | ||
9 | g_unix_mount_guess_should_display() expects. | ||
10 | |||
11 | Without this change USB stick mounts are not accesible from | ||
12 | graphical applications such as the File Manager (pcmanfm). | ||
13 | |||
14 | Upstream-Status: Inappropriate | ||
15 | |||
16 | Signed-off-by: Marius Avram <marius.avram@intel.com> | ||
17 | |||
18 | --- | ||
19 | gio/gunixmounts.c | 5 +++++ | ||
20 | 1 file changed, 5 insertions(+) | ||
21 | |||
22 | diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c | ||
23 | index 355329c..6467fc5 100644 | ||
24 | --- a/gio/gunixmounts.c | ||
25 | +++ b/gio/gunixmounts.c | ||
26 | @@ -2745,6 +2745,11 @@ g_unix_mount_guess_should_display (GUnixMountEntry *mount_entry) | ||
27 | is_in_runtime_dir = TRUE; | ||
28 | } | ||
29 | |||
30 | + /* Allow no username in path in /run/media if current user is root */ | ||
31 | + if (strcmp(user_name, "root") == 0 && | ||
32 | + strncmp (mount_path, "/run/media/", sizeof("run/media")) == 0) | ||
33 | + is_in_runtime_dir = TRUE; | ||
34 | + | ||
35 | if (is_in_runtime_dir || g_str_has_prefix (mount_path, "/media/")) | ||
36 | { | ||
37 | char *path; | ||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.58.0.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.58.0.bb index 92c7997a27..6ebf1d2599 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.58.0.bb +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.58.0.bb | |||
@@ -8,7 +8,6 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ | |||
8 | file://configure-libtool.patch \ | 8 | file://configure-libtool.patch \ |
9 | file://run-ptest \ | 9 | file://run-ptest \ |
10 | file://uclibc_musl_translation.patch \ | 10 | file://uclibc_musl_translation.patch \ |
11 | file://allow-run-media-sdX-drive-mount-if-username-root.patch \ | ||
12 | file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ | 11 | file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ |
13 | file://Enable-more-tests-while-cross-compiling.patch \ | 12 | file://Enable-more-tests-while-cross-compiling.patch \ |
14 | file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ | 13 | file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ |