From de74ec83f3656c7655898f0e3c2c911d453ab1cb Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 22 Dec 2017 10:28:56 +0100 Subject: 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 Acked-by: Dominik Sliwa --- ...-do-not-crash-if-there-is-no-last_session.patch | 27 ++++++++++++++++++++++ recipes-lxde/lxdm/lxdm_%.bbappend | 1 + 2 files changed, 28 insertions(+) create mode 100644 recipes-lxde/lxdm/lxdm/0001-do-not-crash-if-there-is-no-last_session.patch (limited to 'recipes-lxde') 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 +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 \ " -- cgit v1.2.3