summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker/0001-launch-improve-error-handling-for-opendir.patch
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2019-10-29 16:48:15 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2019-10-29 16:48:21 +0300
commit93c3acf56fcecefef579497263e98c15b6b0e34a (patch)
treeb2b86526293298bb30af7587d17d62405832b930 /meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker/0001-launch-improve-error-handling-for-opendir.patch
parentb350a87270ee007fb1da2c564c050184abd5ba1e (diff)
downloadopenbmc-93c3acf56fcecefef579497263e98c15b6b0e34a.tar.xz
meta-openembedded: subtree update:18506b797b..c986cbed93
Adrian Bunk (7): gpsd: Backport a memory leak fix gpsd: Stop depending on chrpath-native klibc: Upgrade 2.0.6 -> 2.0.7 gerbera: Upgrade 1.3.0 -> 1.3.2 gstd: Fix the version number webrtc-audio-processing: Upgrade 0.3 -> 0.3.1 vlc: Upgrade 3.0.6 -> 3.0.8 Andreas Müller (15): itstool: rework native shebang and add class to make native itstool work yelp-tools: use itstools.bbclass yelp-xsl: use itstool.bbclass yelp: use itstool.bbclass gnome-help.bbclass: Handle gnome-help files with new distro feature 'helpfiles' zenity: rework recipe dconf: extend to native build for upcoming gdm dconf-editor: upgrade 3.32.0 -> 3.34.0 gtksourceview4: upgrade 4.2.0 -> 4.4.0 gnome-menus3: upgrade 3.10.1 -> 3.32.0 gnome-desktop3: upgrade 3.34.0 -> 3.34.1 gnome-bluetooth: upgrade 3.32.1 -> 3.34.0 gspell: upgrade 1.8.1 -> 1.8.2 gnome-system-monitor: upgrade 3.32.0 -> 3.32.1 network-manager-applet: upgrade 1.8.22 -> 1.8.23 / build with meson / cleanup Luca Boccassi (4): dbus-broker: 19 -> 21 dbus-broker: backport patches from master dbus-broker: build with SELinux if it's enabled via DISTRO_FEATURES dbus-broker: add patch to fix build with musl libc Trevor Gamblin (1): rsyslog: upgrade from v8.1908.0 to v8.1910.0 Zang Ruochen (4): python-bitarray: upgrade 0.8.3 -> 1.0.1 python-can: upgrade 2.2.1 -> 3.3.2 python-daemonize: upgrade 2.4.7 -> 2.5.0 xmlsec1: upgrade 1.2.28 -> 1.2.29 Zheng Ruoqin (2): keepalived: upgrade 2.0.16 -> 2.0.19 postfix: upgrade 3.4.5 -> 3.4.7 Change-Id: Ibff272f163bb42473022825cfb17a284a0019e83 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker/0001-launch-improve-error-handling-for-opendir.patch')
-rw-r--r--meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker/0001-launch-improve-error-handling-for-opendir.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker/0001-launch-improve-error-handling-for-opendir.patch b/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker/0001-launch-improve-error-handling-for-opendir.patch
new file mode 100644
index 000000000..ccc175bb8
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-core/dbus/dbus-broker/0001-launch-improve-error-handling-for-opendir.patch
@@ -0,0 +1,48 @@
+From f42d5e38859c65a186acd0da94bbeeca12faf7a2 Mon Sep 17 00:00:00 2001
+From: David Rheinsberg <david.rheinsberg@gmail.com>
+Date: Thu, 2 May 2019 17:33:34 +0200
+Subject: [PATCH] launch: improve error handling for opendir()
+
+This improves the error-handling of opendir() by always printing
+diagnostics. Furthermore, it aligns the behavior with dbus-deamon and
+ignores EACCES.
+
+Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>
+Upstream-Status: dbus-broker@f42d5e38859c65a186acd0da94bbeeca12faf7a2
+---
+ src/launch/launcher.c | 17 +++++++++++++++--
+ 1 file changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/src/launch/launcher.c b/src/launch/launcher.c
+index 31a5364..2ec4bda 100644
+--- a/src/launch/launcher.c
++++ b/src/launch/launcher.c
+@@ -749,10 +749,23 @@ static int launcher_load_service_dir(Launcher *launcher, const char *dirpath, NS
+
+ dir = opendir(dirpath);
+ if (!dir) {
+- if (errno == ENOENT || errno == ENOTDIR)
++ if (errno == ENOENT || errno == ENOTDIR) {
+ return 0;
+- else
++ } else if (errno == EACCES) {
++ log_append_here(&launcher->log, LOG_ERR, 0, NULL);
++ r = log_commitf(&launcher->log, "Access denied to service directory '%s'\n", dirpath);
++ if (r)
++ return error_fold(r);
++
++ return 0;
++ } else {
++ log_append_here(&launcher->log, LOG_ERR, errno, NULL);
++ r = log_commitf(&launcher->log, "Unable to open service directory '%s': %m\n", dirpath);
++ if (r)
++ return error_fold(r);
++
+ return error_origin(-errno);
++ }
+ }
+
+ r = dirwatch_add(launcher->dirwatch, dirpath);
+--
+2.20.1
+