summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-12-22 10:28:56 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-12-22 15:58:36 +0100
commitde74ec83f3656c7655898f0e3c2c911d453ab1cb (patch)
tree237619cffb2f31829c450290c6d83a8a01034d6d
parent664a1926af81e49396bfe268118969ec2b8718cb (diff)
lxdm: fix crash on first boot
The very first start of LXDM always crashes due to an empty last_session configuration in /var/lib/lxdm/lxdm.conf. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
-rw-r--r--recipes-lxde/lxdm/lxdm/0001-do-not-crash-if-there-is-no-last_session.patch27
-rw-r--r--recipes-lxde/lxdm/lxdm_%.bbappend1
2 files changed, 28 insertions, 0 deletions
diff --git a/recipes-lxde/lxdm/lxdm/0001-do-not-crash-if-there-is-no-last_session.patch b/recipes-lxde/lxdm/lxdm/0001-do-not-crash-if-there-is-no-last_session.patch
new file mode 100644
index 0000000..9099d4b
--- /dev/null
+++ b/recipes-lxde/lxdm/lxdm/0001-do-not-crash-if-there-is-no-last_session.patch
@@ -0,0 +1,27 @@
+From 28e38e6fc6efcee28ea1c85589ebcece3e9a5efe Mon Sep 17 00:00:00 2001
+From: Stefan Agner <stefan@agner.ch>
+Date: Fri, 22 Dec 2017 09:58:41 +0100
+Subject: [LXDM][PATCH] do not crash if there is no last_session
+
+Upstream-Status: Pending
+
+---
+ src/lxdm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lxdm.c b/src/lxdm.c
+index a37f051..b36debf 100644
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -1276,7 +1276,7 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang, char *option)
+ LXSession *s,*prev;
+
+ lxdm_save_login(session,lang);
+- if(!strcmp(session,"__default__"))
++ if(session && !strcmp(session,"__default__"))
+ session=NULL;
+
+ if(!session ||!session[0] || !lang || !lang[0])
+--
+2.15.1
+
diff --git a/recipes-lxde/lxdm/lxdm_%.bbappend b/recipes-lxde/lxdm/lxdm_%.bbappend
index eb9906d..c5f52fd 100644
--- a/recipes-lxde/lxdm/lxdm_%.bbappend
+++ b/recipes-lxde/lxdm/lxdm_%.bbappend
@@ -4,4 +4,5 @@ SRC_URI += " \
file://logout-fixes.patch \
file://root-autologin.patch \
file://0001-lxdm.service-kill-lxsession-explicitely-with-sigkill.patch \
+ file://0001-do-not-crash-if-there-is-no-last_session.patch \
"