[lxdm] Update to 0.4.1 (#758480), fixes #596360, #635897, #652697, #683728, #758480
Christoph Wickert
cwickert at fedoraproject.org
Wed Mar 21 17:16:30 UTC 2012
commit be4b08f3be4dbaf5e34b35c99b60111eedd09655
Author: Christoph Wickert <cwickert at fedoraproject.org>
Date: Wed Mar 21 17:47:22 2012 +0100
Update to 0.4.1 (#758480), fixes #596360, #635897, #652697, #683728, #758480
and #758484
- Fix softlock bug causing 100% CPU (#767861, #794478)
- Fix SELinux problem with xauth (#635897)
.gitignore | 1 +
lxdm-0.3.0-background.patch | 64 --------
lxdm-0.3.0-config.patch | 11 --
lxdm-0.4.1-GDK_KEY_Escape.patch | 228 ++++++++++++++++++++++++++++
lxdm-0.4.1-LXSESSION-variable.patch | 47 ++++++
lxdm-0.4.1-config.patch | 15 ++
lxdm-0.4.1-exec-dbus.patch | 37 +++++
lxdm-0.4.1-missing-semicolons.patch | 39 +++++
lxdm-0.4.1-no-password.patch | 193 +++++++++++++++++++++++
lxdm-0.4.1-null-pointer.patch | 51 ++++++
lxdm-0.4.1-old-plymouth.patch | 29 ++++
lxdm-0.4.1-pam.patch | 30 ++++
lxdm-0.4.1-restart-xserver-on-logout.patch | 28 ++++
lxdm-0.4.1-softlockup.patch | 21 +++
lxdm-0.4.1-spelling-mistake.patch | 25 +++
lxdm-0.4.1-tcp-listen.patch | 53 +++++++
lxdm-0.4.1-xauth.patch | 59 +++++++
lxdm.spec | 86 +++++++++--
sources | 2 +-
19 files changed, 928 insertions(+), 91 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 6b2344a..8d7897e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
lxdm-0.2.0.tar.gz
/lxdm-20100921gitcf9b2cbb.tar.bz2
/lxdm-0.3.0.tar.gz
+/lxdm-0.4.1.tar.gz
diff --git a/lxdm-0.4.1-GDK_KEY_Escape.patch b/lxdm-0.4.1-GDK_KEY_Escape.patch
new file mode 100644
index 0000000..dd64845
--- /dev/null
+++ b/lxdm-0.4.1-GDK_KEY_Escape.patch
@@ -0,0 +1,228 @@
+From bd27836969912adbe6ae8d87f9bb6fe369772b88 Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa at gmail.com>
+Date: Sat, 25 Feb 2012 11:09:52 +0800
+Subject: [PATCH] deal GDK_KEY_Escape when input username or password
+
+---
+ src/greeter-utils.c | 8 ++++++
+ src/greeter.c | 69 ++++++++++++++++++++++++++++++++------------------
+ src/lxdm.c | 39 ++++++++++++++++++++++------
+ 3 files changed, 82 insertions(+), 34 deletions(-)
+
+diff --git a/src/greeter-utils.c b/src/greeter-utils.c
+index 78b71dd..28c80c6 100644
+--- a/src/greeter-utils.c
++++ b/src/greeter-utils.c
+@@ -139,12 +139,20 @@ void ui_add_cursor(void)
+ XDefineCursor(gdk_x11_get_default_xdisplay(),
+ GDK_WINDOW_XID(gdk_get_default_root_window()),
+ GDK_CURSOR_XCURSOR(cur));
++#if GTK_CHECK_VERSION(3,0,0)
++ g_object_unref(cur);
++#else
+ gdk_cursor_unref(cur);
++#endif
+ }
+
+ void ui_set_cursor(GdkWindow *win,int which)
+ {
+ GdkCursor *cursor=gdk_cursor_new(which);
+ gdk_window_set_cursor (win,cursor);
++#if GTK_CHECK_VERSION(3,0,0)
++ g_object_unref(cursor);
++#else
+ gdk_cursor_unref(cursor);
++#endif
+ }
+diff --git a/src/greeter.c b/src/greeter.c
+index fd76607..c0c150d 100644
+--- a/src/greeter.c
++++ b/src/greeter.c
+@@ -25,6 +25,10 @@
+
+ #include <gtk/gtk.h>
+ #include <gdk/gdkx.h>
++#include <gdk/gdkkeysyms.h>
++#ifdef ENABLE_GTK3
++#include <gdk/gdkkeysyms-compat.h>
++#endif
+ #include <glib/gi18n.h>
+ #include <X11/XKBlib.h>
+
+@@ -120,6 +124,33 @@ static char *get_session_exec(void)
+ return res;
+ }
+
++static void switch_to_input_user(void)
++{
++ if(user)
++ {
++ g_free(user);
++ user=NULL;
++ }
++ if(pass)
++ {
++ g_free(pass);
++ pass=NULL;
++ }
++ gtk_label_set_text( GTK_LABEL(prompt), _("User:"));
++ gtk_widget_show(prompt);
++ if(user_list)
++ {
++ gtk_widget_hide(login_entry);
++ gtk_widget_show(user_list);
++ gtk_widget_grab_focus(user_list);
++ }
++ else
++ {
++ gtk_widget_show(login_entry);
++ gtk_widget_grab_focus(login_entry);
++ }
++}
++
+ static void switch_to_input_passwd(void)
+ {
+ if(user_list!=NULL)
+@@ -142,8 +173,7 @@ static void try_login_user(const char *user)
+ g_free(session_lang);
+ g_free(session_exec);
+
+-}
+-
++}
+
+ static void on_entry_activate(GtkEntry* entry)
+ {
+@@ -1025,6 +1055,13 @@ static void on_screen_size_changed(GdkScreen *screen,GtkWidget *win)
+ ui_set_bg(window,config);
+ }
+
++static gint login_entry_on_key_press (GtkWidget *widget,GdkEventKey *event)
++{
++ if(event->keyval == GDK_Escape)
++ switch_to_input_user();
++ return FALSE;
++}
++
+ static void create_win()
+ {
+ GSList* objs, *l;
+@@ -1077,6 +1114,10 @@ static void create_win()
+
+ prompt = (GtkWidget*)gtk_builder_get_object(builder, "prompt");
+ login_entry = (GtkWidget*)gtk_builder_get_object(builder, "login_entry");
++ if(login_entry!=NULL)
++ {
++ g_signal_connect_after(login_entry,"key-press-event",G_CALLBACK(login_entry_on_key_press),NULL);
++ }
+
+ g_signal_connect(login_entry, "activate", G_CALLBACK(on_entry_activate), NULL);
+
+@@ -1186,29 +1227,7 @@ static gboolean on_lxdm_command(GIOChannel *source, GIOCondition condition, gpoi
+ gtk_main_quit();
+ else if( !strncmp(str, "reset", 5) )
+ {
+- if(user)
+- {
+- g_free(user);
+- user=NULL;
+- }
+- if(pass)
+- {
+- g_free(pass);
+- pass=NULL;
+- }
+- gtk_label_set_text( GTK_LABEL(prompt), _("User:"));
+- gtk_widget_show(prompt);
+- if(user_list)
+- {
+- gtk_widget_hide(login_entry);
+- gtk_widget_show(user_list);
+- gtk_widget_grab_focus(user_list);
+- }
+- else
+- {
+- gtk_widget_show(login_entry);
+- gtk_widget_grab_focus(login_entry);
+- }
++ switch_to_input_user();
+ }
+ else if( !strncmp(str, "password", 8))
+ {
+diff --git a/src/lxdm.c b/src/lxdm.c
+index 6d6f18e..8d98d37 100644
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -654,6 +654,19 @@ static void replace_env(char** env, const char* name, const char* new_val)
+ *(penv + 1) = NULL;
+ }
+
++static const char *get_env(char **env, const char *name)
++{
++ register char** penv;
++ for(penv = env; *penv; ++penv)
++ {
++ if(g_str_has_prefix(*penv, name))
++ {
++ return *penv+strlen(name);
++ }
++ }
++ return NULL;
++}
++
+ #ifndef DISABLE_XAUTH
+
+ static inline void xauth_write_uint16(int fd,uint16_t data)
+@@ -707,7 +720,7 @@ static void create_server_auth(LXSession *s)
+
+ authfile = g_strdup_printf("/var/run/lxdm/lxdm-:%d.auth",s->display);
+
+- setenv("XAUTHORITY",authfile,1);
++ //setenv("XAUTHORITY",authfile,1);
+ remove(authfile);
+ xauth_write_file(authfile,s->display,s->mcookie);
+ g_free(authfile);
+@@ -718,24 +731,32 @@ static void create_client_auth(char *home,char **env)
+ LXSession *s;
+ char *authfile;
+ uid_t user;
+- char *path;
+
+- if((user=getuid())== 0 ) /* root don't need it */
++ if((user=getuid())==0) /* root don't need it */
+ return;
+
+ s=lxsession_find_user(user);
+ if(!s)
+ return;
+-
+- path=g_key_file_get_string(config,"base","xauth_path",NULL);
+- if(path)
++
++ /* pam_mktemp may provide XAUTHORITY to DM, just use it */
++ if((authfile=(char*)get_env(env,"XAUTHORITY="))!=NULL)
+ {
+- authfile = g_strdup_printf("%s/.Xauth%d", path,getuid());
+- g_free(path);
++ authfile=g_strdup(authfile);
+ }
+ else
+ {
+- authfile = g_strdup_printf("%s/.Xauthority", home);
++ char *path;
++ path=g_key_file_get_string(config,"base","xauth_path",NULL);
++ if(path)
++ {
++ authfile = g_strdup_printf("%s/.Xauth%d", path,user);
++ g_free(path);
++ }
++ else
++ {
++ authfile = g_strdup_printf("%s/.Xauthority", home);
++ }
+ }
+ remove(authfile);
+ xauth_write_file(authfile,s->display,s->mcookie);
+--
+1.7.4.1
+
diff --git a/lxdm-0.4.1-LXSESSION-variable.patch b/lxdm-0.4.1-LXSESSION-variable.patch
new file mode 100644
index 0000000..17cf462
--- /dev/null
+++ b/lxdm-0.4.1-LXSESSION-variable.patch
@@ -0,0 +1,47 @@
+From 0c6d56ba1bfab9d13425a5ab088dd8a31a782bae Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa at gmail.com>
+Date: Mon, 27 Feb 2012 19:32:21 +0800
+Subject: [PATCH] Remove the quoting of LXSESSION variable to properly interpret spaces in Exec key of xsession desktop entry files
+
+---
+ data/Xsession | 4 ++--
+ data/lxdm.conf.in | 2 ++
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/data/Xsession b/data/Xsession
+index 8fe0c79..03887ca 100755
+--- a/data/Xsession
++++ b/data/Xsession
+@@ -20,7 +20,7 @@ if [ -f /etc/X11/xinit/xinitrc-common ]; then
+ elif [ -x /usr/bin/ck-launch-session -a -z "$CK_XINIT_SESSION" ]; then
+ CK_XINIT_SESSION="/usr/bin/ck-launch-session"
+ fi
+- exec -l $SHELL -c "$CK_XINIT_SESSION \"$LXSESSION\""
++ exec -l $SHELL -c "$CK_XINIT_SESSION $LXSESSION"
+ elif [ -x /etc/X11/xinit/Xsession ]; then
+ # fedora
+ exec /etc/X11/xinit/Xsession "$LXSESSION"
+@@ -47,6 +47,6 @@ else
+ eval "$(dbus-launch --sh-syntax --exit-with-session)"
+ fi
+
+- exec -l $SHELL -c "$CK_XINIT_SESSION \"$LXSESSION\""
++ exec -l $SHELL -c "$CK_XINIT_SESSION $LXSESSION"
+ fi
+
+diff --git a/data/lxdm.conf.in b/data/lxdm.conf.in
+index 2ca4851..d93f280 100644
+--- a/data/lxdm.conf.in
++++ b/data/lxdm.conf.in
+@@ -26,6 +26,8 @@ greeter=@FULL_LIBEXECDIR@/lxdm-greeter-gtk
+ # arg=/usr/bin/X -background vt1
+ # uncomment this if you really want xserver listen to tcp
+ # tcp_listen=1
++# uncoment this if you want reset the xserver after logou
++# reset=1
+
+ [display]
+ ## gtk theme used by greeter
+--
+1.7.4.1
+
diff --git a/lxdm-0.4.1-config.patch b/lxdm-0.4.1-config.patch
new file mode 100644
index 0000000..6d1cc7f
--- /dev/null
+++ b/lxdm-0.4.1-config.patch
@@ -0,0 +1,15 @@
+--- lxdm-0.4.1.orig/data/lxdm.conf.in 2012-03-21 17:31:21.524659586 +0100
++++ lxdm-0.4.1/data/lxdm.conf.in 2012-03-21 17:34:31.601351294 +0100
+@@ -23,9 +23,11 @@
+
+ [server]
+ ## arg used to start xserver, not fully function
+-# arg=/usr/bin/X -background vt1
++arg=/usr/bin/X -background none vt1
++
+ # uncomment this if you really want xserver listen to tcp
+ # tcp_listen=1
++
+ # uncoment this if you want reset the xserver after logou
+ # reset=1
+
diff --git a/lxdm-0.4.1-exec-dbus.patch b/lxdm-0.4.1-exec-dbus.patch
new file mode 100644
index 0000000..3449d86
--- /dev/null
+++ b/lxdm-0.4.1-exec-dbus.patch
@@ -0,0 +1,37 @@
+From f11ae65ebc732df2e0e5f69200a396db61657d16 Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa at gmail.com>
+Date: Sun, 29 Jan 2012 10:32:13 +0800
+Subject: [PATCH] exec dbus-launch as bug3477356 suggested
+
+---
+ data/Xsession | 8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/data/Xsession b/data/Xsession
+index 287db71..8fe0c79 100755
+--- a/data/Xsession
++++ b/data/Xsession
+@@ -34,13 +34,19 @@ elif [ -x /etc/X11/xinit/xinitrc ]; then
+ else
+ # unknown, user should custom /etc/lxdm/xinitrc self
+ if [ -x /etc/lxdm/xinitrc ]; then
+- . /etc/lxdm/xinitrc
++ . /etc/lxdm/xinitrc "$LXSESSION"
+ fi
+ if ! [ -z "$XDG_SESSION_COOKIE" ]; then
+ CK_XINIT_SESSION=
+ elif [ -x /usr/bin/ck-launch-session ]; then
+ CK_XINIT_SESSION="/usr/bin/ck-launch-session"
+ fi
++
++ if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS";
++ then
++ eval "$(dbus-launch --sh-syntax --exit-with-session)"
++ fi
++
+ exec -l $SHELL -c "$CK_XINIT_SESSION \"$LXSESSION\""
+ fi
+
+--
+1.7.4.1
+
diff --git a/lxdm-0.4.1-missing-semicolons.patch b/lxdm-0.4.1-missing-semicolons.patch
new file mode 100644
index 0000000..a203c19
--- /dev/null
+++ b/lxdm-0.4.1-missing-semicolons.patch
@@ -0,0 +1,39 @@
+From bed2fed70278a1f4b28c51de42c513199c00e6f2 Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa at gmail.com>
+Date: Sat, 20 Aug 2011 23:02:29 +0800
+Subject: [PATCH] add missing semicolons in gtk.css
+
+---
+ data/themes/Industrial/gtk.css | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/data/themes/Industrial/gtk.css b/data/themes/Industrial/gtk.css
+index eefe846..dc9f4fb 100644
+--- a/data/themes/Industrial/gtk.css
++++ b/data/themes/Industrial/gtk.css
+@@ -3,18 +3,18 @@
+ }
+
+ #bottom_pane {
+- background-image: url("shade.png")
++ background-image: url("shade.png");
+ }
+
+ #time {
+ font: Sans 12;
+- color: #ffffff
++ color: #ffffff;
+ }
+
+ #user_list, #login_entry {
+- background-image: none
++ background-image: none;
+ }
+
+ #prompt, #bottom_pane GtkLabel {
+- color: #ffffff
++ color: #ffffff;
+ }
+--
+1.7.4.1
+
diff --git a/lxdm-0.4.1-no-password.patch b/lxdm-0.4.1-no-password.patch
new file mode 100644
index 0000000..0bea7bf
--- /dev/null
+++ b/lxdm-0.4.1-no-password.patch
@@ -0,0 +1,193 @@
+From 9dc81f33988cda29627d41d2d09409749b8fe371 Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa at gmail.com>
+Date: Fri, 17 Feb 2012 21:29:37 +0800
+Subject: [PATCH] add option of not ask password for users who have empty password
+
+---
+ data/lxdm.conf.in | 3 +++
+ src/greeter.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
+ src/lxdm.c | 19 +++++++++++++++----
+ src/ui.c | 9 +++++++--
+ 4 files changed, 73 insertions(+), 6 deletions(-)
+
+diff --git a/data/lxdm.conf.in b/data/lxdm.conf.in
+index 2de2b94..2ca4851 100644
+--- a/data/lxdm.conf.in
++++ b/data/lxdm.conf.in
+@@ -15,6 +15,9 @@
+ ## set this if you don't want to put xauth file at ~/.Xauthority
+ # xauth_path=/tmp
+
++# not ask password for users who have empty password
++# skip_password=1
++
+ ## greeter used to welcome the user
+ greeter=@FULL_LIBEXECDIR@/lxdm-greeter-gtk
+
+diff --git a/src/greeter.c b/src/greeter.c
+index 095227b..fd76607 100644
+--- a/src/greeter.c
++++ b/src/greeter.c
+@@ -120,12 +120,39 @@ static char *get_session_exec(void)
+ return res;
+ }
+
++static void switch_to_input_passwd(void)
++{
++ if(user_list!=NULL)
++ gtk_widget_hide(user_list);
++ gtk_label_set_text( GTK_LABEL(prompt), _("Password:") );
++ gtk_entry_set_text(GTK_ENTRY(login_entry), "");
++ gtk_entry_set_visibility(GTK_ENTRY(login_entry), FALSE);
++ gtk_widget_show(login_entry);
++ gtk_widget_grab_focus(login_entry);
++}
++
++static void try_login_user(const char *user)
++{
++ char *session_exec=get_session_exec();
++ char *session_lang=get_session_lang();
++
++ printf("login user=%s session=%s lang=%s\n",
++ user, session_exec, session_lang);
++
++ g_free(session_lang);
++ g_free(session_exec);
++
++}
++
++
+ static void on_entry_activate(GtkEntry* entry)
+ {
+ char* tmp;
+ if( !user )
+ {
+ user = g_strdup( gtk_entry_get_text( GTK_ENTRY(entry) ) );
++
++#if 0
+ gtk_entry_set_text(GTK_ENTRY(entry), "");
+ gtk_label_set_text( GTK_LABEL(prompt), _("Password:") );
+ if(strchr(user, ' '))
+@@ -135,6 +162,16 @@ static void on_entry_activate(GtkEntry* entry)
+ return;
+ }
+ gtk_entry_set_visibility(entry, FALSE);
++#endif
++ if(g_key_file_get_integer(config,"base","skip_password",NULL)!=0)
++ {
++ gtk_label_set_text( GTK_LABEL(prompt), "");
++ try_login_user(user);
++ }
++ else
++ {
++ switch_to_input_passwd();
++ }
+ }
+ else
+ {
+@@ -825,6 +862,13 @@ static void on_user_select(GtkIconView *iconview)
+ gtk_widget_hide( GTK_WIDGET(login_entry) );
+ return;
+ }
++ if(g_key_file_get_integer(config,"base","skip_password",NULL)!=0)
++ {
++ gtk_label_set_text( GTK_LABEL(prompt), "");
++ user=name;
++ try_login_user(user);
++ return;
++ }
+ gtk_entry_set_text(GTK_ENTRY(login_entry),name);
+ g_free(name);
+ on_entry_activate(GTK_ENTRY(login_entry));
+@@ -1166,6 +1210,10 @@ static gboolean on_lxdm_command(GIOChannel *source, GIOCondition condition, gpoi
+ gtk_widget_grab_focus(login_entry);
+ }
+ }
++ else if( !strncmp(str, "password", 8))
++ {
++ switch_to_input_passwd();
++ }
+ g_free(str);
+ return TRUE;
+ }
+diff --git a/src/lxdm.c b/src/lxdm.c
+index 0c84ef9..6d6f18e 100644
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -760,7 +760,8 @@ static int do_conv(int num, const struct pam_message **msg,struct pam_response *
+ resp[i]->resp=strdup(user_pass[0]?user_pass[0]:"");
+ break;
+ case PAM_PROMPT_ECHO_OFF:
+- resp[i]->resp=strdup(user_pass[1]?user_pass[1]:"");
++ //resp[i]->resp=strdup(user_pass[1]?user_pass[1]:"");
++ resp[i]->resp=user_pass[1]?strdup(user_pass[1]):NULL;
+ break;
+ case PAM_ERROR_MSG:
+ case PAM_TEXT_INFO:
+@@ -801,7 +802,7 @@ int lxdm_auth_user(char *user, char *pass, struct passwd **ppw)
+ g_debug("user %s not found\n",user);
+ return AUTH_BAD_USER;
+ }
+- if( !pass )
++ if( !pass && !g_key_file_get_integer(config,"base","skip_password",NULL))
+ {
+ *ppw = pw;
+ g_debug("user %s auth ok\n",user);
+@@ -820,7 +821,7 @@ int lxdm_auth_user(char *user, char *pass, struct passwd **ppw)
+ real = sp->sp_pwdp;
+ if( !real || !real[0] )
+ {
+- if( !pass[0] )
++ if( !pass || !pass[0] )
+ {
+ *ppw = pw;
+ g_debug("user %s auth with no password ok\n",user);
+@@ -1463,7 +1464,17 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang, char *option)
+ "x11-display", &n,
+ "is-local",&is_local,
+ NULL))
+- setenv("XDG_SESSION_COOKIE", ck_connector_get_cookie(s->ckc), 1);
++ {
++ setenv("XDG_SESSION_COOKIE", ck_connector_get_cookie(s->ckc), 1);
++ }
++ else
++ {
++ g_message("create ConsoleKit session fail\n");
++ }
++ }
++ else
++ {
++ g_message("create ConsoleKit connector fail\n");
+ }
+ #endif
+ char** env, *path;
+diff --git a/src/ui.c b/src/ui.c
+index 2691a03..376aca0 100644
+--- a/src/ui.c
++++ b/src/ui.c
+@@ -153,7 +153,7 @@ static gboolean on_greeter_input(GIOChannel *source, GIOCondition condition, gpo
+ char *pass = greeter_param(str, "pass");
+ char *session = greeter_param(str, "session");
+ char *lang = greeter_param(str, "lang");
+- if( user && pass )
++ if( user/* && pass */)
+ {
+ struct passwd *pw;
+ int ret = lxdm_auth_user(user, pass, &pw);
+@@ -163,7 +163,12 @@ static gboolean on_greeter_input(GIOChannel *source, GIOCondition condition, gpo
+ lxdm_do_login(pw, session, lang,NULL);
+ }
+ else
+- xwrite(greeter_pipe[0], "reset\n", 6);
++ {
++ if(pass!=NULL)
++ xwrite(greeter_pipe[0], "reset\n", 6);
++ else
++ xwrite(greeter_pipe[0], "password\n", 9);
++ }
+ }
+ g_free(user);
+ g_free(pass);
+--
+1.7.4.1
+
diff --git a/lxdm-0.4.1-null-pointer.patch b/lxdm-0.4.1-null-pointer.patch
new file mode 100644
index 0000000..65ee4f0
--- /dev/null
+++ b/lxdm-0.4.1-null-pointer.patch
@@ -0,0 +1,51 @@
+From 19f82a206b2cec964cea0475395d63dedf183788 Mon Sep 17 00:00:00 2001
+From: Andrea Florio <andrea at opensuse.org>
+Date: Fri, 29 Jul 2011 23:59:32 +0200
+Subject: [PATCH] fix null pointer dereference
+
+---
+ src/config.c | 25 ++++++++++---------------
+ 1 files changed, 10 insertions(+), 15 deletions(-)
+
+diff --git a/src/config.c b/src/config.c
+index 3f92f7b..4603ab4 100644
+--- a/src/config.c
++++ b/src/config.c
+@@ -125,24 +125,19 @@ static gboolean image_file_valid(const char *filename)
+ static void update_face_image(GtkWidget *w)
+ {
+ GdkPixbuf *pixbuf;
+- char *path;
+- path=g_build_filename(user->pw_dir,".face",NULL);
+- if(access(path,R_OK))
+- {
+- g_free(path);
+- if(ui_nobody)
+- pixbuf=gdk_pixbuf_new_from_file_at_scale(ui_nobody,48,48,FALSE,NULL);
+- if(!pixbuf)
+- pixbuf=gtk_icon_theme_load_icon(gtk_icon_theme_get_default(),
++ char *path=g_build_filename(user->pw_dir,".face",NULL);
++ pixbuf=gdk_pixbuf_new_from_file_at_scale(path,48,48,FALSE,NULL);
++ g_free(path);
++ if(!pixbuf && ui_nobody)
++ pixbuf=gdk_pixbuf_new_from_file_at_scale(ui_nobody,48,48,FALSE,NULL);
++ if(!pixbuf)
++ pixbuf=gtk_icon_theme_load_icon(gtk_icon_theme_get_default(),
+ "avatar-default", 48,GTK_ICON_LOOKUP_FORCE_SIZE,NULL);
+- }
+- else
++ if(pixbuf)
+ {
+- pixbuf=gdk_pixbuf_new_from_file_at_scale(path,48,48,FALSE,NULL);
+- g_free(path);
++ gtk_image_set_from_pixbuf(GTK_IMAGE(w),pixbuf);
++ g_object_unref(pixbuf);
+ }
+- gtk_image_set_from_pixbuf(GTK_IMAGE(w),pixbuf);
+- g_object_unref(pixbuf);
+ }
+
+ static void set_face_file(const char *filename)
+--
+1.7.4.1
+
diff --git a/lxdm-0.4.1-old-plymouth.patch b/lxdm-0.4.1-old-plymouth.patch
new file mode 100644
index 0000000..dd6f92c
--- /dev/null
+++ b/lxdm-0.4.1-old-plymouth.patch
@@ -0,0 +1,29 @@
+From d3a858030f1945cad6961157ddac42308675adb9 Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa at gmail.com>
+Date: Mon, 27 Feb 2012 19:37:49 +0800
+Subject: [PATCH] remove old support for plymouth
+
+---
+ src/lxdm.c | 4 +---
+ 1 files changed, 1 insertions(+), 3 deletions(-)
+
+diff --git a/src/lxdm.c b/src/lxdm.c
+index 8d98d37..e61d529 100644
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -529,11 +529,9 @@ void lxdm_get_tty(void)
+ if(!gotvtarg)
+ {
+ /* support plymouth */
+- nr_tty = g_file_test("/var/spool/gdm/force-display-on-active-vt", G_FILE_TEST_EXISTS);
+- if( nr_tty || g_key_file_get_integer(config, "server", "active_vt", 0) )
++ if(g_key_file_get_integer(config, "server", "active_vt", 0) )
+ /* use the active vt */
+ def_tty = old_tty;
+- if( nr_tty ) unlink("/var/spool/gdm/force-display-on-active-vt");
+ if(plymouth)
+ {
+ nr_tty=1;
+--
+1.7.4.1
+
diff --git a/lxdm-0.4.1-pam.patch b/lxdm-0.4.1-pam.patch
new file mode 100644
index 0000000..2fb0928
--- /dev/null
+++ b/lxdm-0.4.1-pam.patch
@@ -0,0 +1,30 @@
+--- lxdm-0.4.1.orig/pam/lxdm 2011-07-29 15:42:33.000000000 +0200
++++ lxdm-0.4.1/pam/lxdm 2012-03-21 16:19:09.521796770 +0100
+@@ -1,9 +1,19 @@
+ #%PAM-1.0
+-auth substack system-auth
+-auth optional pam_gnome_keyring.so
+-account include system-auth
+-session optional pam_keyinit.so force revoke
+-session include system-auth
+-session required pam_loginuid.so
+-session optional pam_console.so
+-session optional pam_gnome_keyring.so auto_start
++auth [success=done ignore=ignore default=bad] pam_selinux_permit.so
++auth required pam_succeed_if.so user != root quiet
++auth required pam_env.so
++auth substack system-auth
++auth optional pam_gnome_keyring.so
++auth include postlogin
++account required pam_nologin.so
++account include system-auth
++password include system-auth
++session required pam_selinux.so close
++session required pam_loginuid.so
++session optional pam_console.so
++session required pam_selinux.so open
++session optional pam_keyinit.so force revoke
++session required pam_namespace.so
++session optional pam_gnome_keyring.so auto_start
++session include system-auth
++session include postlogin
diff --git a/lxdm-0.4.1-restart-xserver-on-logout.patch b/lxdm-0.4.1-restart-xserver-on-logout.patch
new file mode 100644
index 0000000..7c6316c
--- /dev/null
+++ b/lxdm-0.4.1-restart-xserver-on-logout.patch
@@ -0,0 +1,28 @@
+From 8c71ffc87305a5742d3ed9f98134cee31117ddd3 Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa at gmail.com>
+Date: Mon, 27 Feb 2012 20:02:16 +0800
+Subject: [PATCH] add option to restart xserver when logout
+
+---
+ src/lxdm.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/src/lxdm.c b/src/lxdm.c
+index e61d529..13e1cef 100644
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -1232,6 +1232,11 @@ static void on_session_stop(void *data,int pid, int status)
+ {
+ lxsession_free(s);
+ }
++ else if(g_key_file_get_integer(config,"server","reset",NULL)==1)
++ {
++ lxsession_free(s);
++ lxsession_greeter();
++ }
+ gchar *argv[] = { "/etc/lxdm/PostLogout", NULL };
+ g_spawn_async(NULL, argv, s->env, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
+ }
+--
+1.7.4.1
+
diff --git a/lxdm-0.4.1-softlockup.patch b/lxdm-0.4.1-softlockup.patch
new file mode 100644
index 0000000..034707c
--- /dev/null
+++ b/lxdm-0.4.1-softlockup.patch
@@ -0,0 +1,21 @@
+From: dgod <dgod.osa at gmail.com>
+Date: Sun, 25 Dec 2011 07:23:19 +0000 (+0800)
+Subject: fix event check bug caused cpu 100%
+X-Git-Url: http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde%2Flxdm;a=commitdiff_plain;h=d4e41ecb36a1ea29482b75674d804bb0f05540b2;hp=f0951bdf736026b041001e846d2cb93f7f2852e1
+
+fix event check bug caused cpu 100%
+---
+
+diff --git a/src/lxcom.c b/src/lxcom.c
+index 02763eb..18ee12e 100644
+--- a/src/lxcom.c
++++ b/src/lxcom.c
+@@ -89,7 +89,7 @@ static gboolean lxcom_prepare (GSource *source,gint *timeout)
+
+ static gboolean lxcom_check(GSource *source)
+ {
+- return TRUE;
++ return (((LXComSource*)source)->poll.revents&G_IO_IN)?TRUE:FALSE;
+ }
+
+ static gboolean lxcom_dispatch (GSource *source,GSourceFunc callback,gpointer user_data)
diff --git a/lxdm-0.4.1-spelling-mistake.patch b/lxdm-0.4.1-spelling-mistake.patch
new file mode 100644
index 0000000..64516bc
--- /dev/null
+++ b/lxdm-0.4.1-spelling-mistake.patch
@@ -0,0 +1,25 @@
+From 14b6c10344429227b9a2aa85dd5dcdd569853377 Mon Sep 17 00:00:00 2001
+From: Martin Bagge / brother <brother at bsnet.se>
+Date: Thu, 24 Nov 2011 15:34:10 +0100
+Subject: [PATCH] Corrected spelling mistake; Show languanges menu => Show languages menu.
+
+---
+ data/config.ui | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/data/config.ui b/data/config.ui
+index 423fe56..08aeb73 100644
+--- a/data/config.ui
++++ b/data/config.ui
+@@ -176,7 +176,7 @@
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="lxdm-show-lang">
+- <property name="label" translatable="yes">Show languanges menu</property>
++ <property name="label" translatable="yes">Show languages menu</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+--
+1.7.4.1
+
diff --git a/lxdm-0.4.1-tcp-listen.patch b/lxdm-0.4.1-tcp-listen.patch
new file mode 100644
index 0000000..d654d59
--- /dev/null
+++ b/lxdm-0.4.1-tcp-listen.patch
@@ -0,0 +1,53 @@
+From 13a92c1d78aa678a87691042148022dacc9c4f22 Mon Sep 17 00:00:00 2001
+From: root <root at dgod.(none)>
+Date: Thu, 29 Dec 2011 17:19:49 +0800
+Subject: [PATCH] readd the tcp_listen option
+
+---
+ data/lxdm.conf.in | 2 ++
+ src/lxdm.c | 9 ++++++---
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/data/lxdm.conf.in b/data/lxdm.conf.in
+index dd94686..2de2b94 100644
+--- a/data/lxdm.conf.in
++++ b/data/lxdm.conf.in
+@@ -21,6 +21,8 @@ greeter=@FULL_LIBEXECDIR@/lxdm-greeter-gtk
+ [server]
+ ## arg used to start xserver, not fully function
+ # arg=/usr/bin/X -background vt1
++# uncomment this if you really want xserver listen to tcp
++# tcp_listen=1
+
+ [display]
+ ## gtk theme used by greeter
+diff --git a/src/lxdm.c b/src/lxdm.c
+index 5c279af..b5a90be 100644
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -467,7 +467,7 @@ static char *lxsession_xserver_command(LXSession *s)
+ i++;
+ }
+ }
+-printf("arc %d\n",arc);
++
+ arg = g_renew(char *, arg, arc + 10);
+ if(nr_tty)
+ {
+@@ -477,8 +477,11 @@ printf("arc %d\n",arc);
+ arg[arc++] = g_strdup_printf(":%d",s->display);
+ if(s->tty>0)
+ arg[arc++] = g_strdup_printf("vt%02d", s->tty);
+- arg[arc++] = g_strdup("-nolisten");
+- arg[arc++] = g_strdup("tcp");
++ if(g_key_file_get_integer(config,"server","tcp_listen",0)!=1)
++ {
++ arg[arc++] = g_strdup("-nolisten");
++ arg[arc++] = g_strdup("tcp");
++ }
+ arg[arc] = NULL;
+ p=g_strjoinv(" ", arg);
+ g_strfreev(arg);
+--
+1.7.4.1
+
diff --git a/lxdm-0.4.1-xauth.patch b/lxdm-0.4.1-xauth.patch
new file mode 100644
index 0000000..fe13a64
--- /dev/null
+++ b/lxdm-0.4.1-xauth.patch
@@ -0,0 +1,59 @@
+From a8db292ca909d7beb1824207d84f3a0a2c146f58 Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa at gmail.com>
+Date: Mon, 13 Feb 2012 21:29:27 +0800
+Subject: [PATCH] let .Xauthority can be read by xauth tool
+
+---
+ src/lxdm.c | 17 +++++++++++------
+ 1 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/src/lxdm.c b/src/lxdm.c
+index 07be1e0..0c84ef9 100644
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -672,15 +672,20 @@ static inline void xauth_write_string(int fd,const char *s)
+ write(fd,s,len);
+ }
+
+-static void xauth_write_file(const char *file,char data[16])
++static void xauth_write_file(const char *file,int dpy,char data[16])
+ {
+ int fd;
++ char addr[128];
++ char buf[16];
++
++ sprintf(buf,"%d",dpy);
++ gethostname(addr,sizeof(addr));
+
+ fd=open(file,O_CREAT|O_TRUNC|O_WRONLY,0600);
+ if(!fd==-1) return;
+- xauth_write_uint16(fd,252); //FamilyLocalHost
+- xauth_write_string(fd,"");
+- xauth_write_string(fd,"");
++ xauth_write_uint16(fd,256); //FamilyLocalHost
++ xauth_write_string(fd,addr);
++ xauth_write_string(fd,buf);
+ xauth_write_string(fd,"MIT-MAGIC-COOKIE-1");
+ xauth_write_uint16(fd,16);
+ write(fd,data,16);
+@@ -704,7 +709,7 @@ static void create_server_auth(LXSession *s)
+
+ setenv("XAUTHORITY",authfile,1);
+ remove(authfile);
+- xauth_write_file(authfile,s->mcookie);
++ xauth_write_file(authfile,s->display,s->mcookie);
+ g_free(authfile);
+ }
+
+@@ -733,7 +738,7 @@ static void create_client_auth(char *home,char **env)
+ authfile = g_strdup_printf("%s/.Xauthority", home);
+ }
+ remove(authfile);
+- xauth_write_file(authfile,s->mcookie);
++ xauth_write_file(authfile,s->display,s->mcookie);
+ replace_env(env,"XAUTHORITY=",authfile);
+ g_free(authfile);
+ }
+--
+1.7.4.1
+
diff --git a/lxdm.spec b/lxdm.spec
index 1af4568..aadcc33 100644
--- a/lxdm.spec
+++ b/lxdm.spec
@@ -15,32 +15,69 @@
# git archive --format=tar --prefix=%{name}/ %{git_short} | bzip2 > %{name}-%{?git_version}.tar.bz2
Name: lxdm
-Version: 0.3.0
-Release: 6%{?git_version:.%{?git_version}}%{?dist}
+Version: 0.4.1
+Release: 1%{?git_version:.%{?git_version}}%{?dist}
Summary: Lightweight X11 Display Manager
Group: User Interface/Desktops
License: GPLv2+ and LGPLv2+
URL: http://lxde.org
+
%if 0%{?git_snapshot}
Source0: %{name}-%{?git_version}.tar.bz2
%else
Source0: http://downloads.sourceforge.net/sourceforge/lxde/%{name}-%{version}.tar.gz
%endif
-## Upstream patches ##
-# Replace -nr parameter with -background (upstream commit
-# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commitdiff;h=092d61fc3a9c749c22388bed3fe4d0074de1e241
-# rediffed)
-Patch1: lxdm-0.3.0-background.patch
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=19f82a20
+Patch0: lxdm-0.4.1-null-pointer.patch
+
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=bed2fed7
+Patch1: lxdm-0.4.1-missing-semicolons.patch
+
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=14b6c103
+Patch2: lxdm-0.4.1-spelling-mistake.patch
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=794478
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=d4e41ecb
+Patch3: lxdm-0.4.1-softlockup.patch
+
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=13a92c1d
+Patch4: lxdm-0.4.1-tcp-listen.patch
+
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=f11ae65e
+Patch5: lxdm-0.4.1-exec-dbus.patch
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=635897
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=a8db292c
+Patch6: lxdm-0.4.1-xauth.patch
+
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=9dc81f33
+Patch7: lxdm-0.4.1-no-password.patch
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=758484
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=bd278369
+Patch8: lxdm-0.4.1-GDK_KEY_Escape.patch
+
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=0c6d56ba
+Patch9: lxdm-0.4.1-LXSESSION-variable.patch
+
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=d3a85803
+Patch10: lxdm-0.4.1-old-plymouth.patch
+
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=patch;h=8c71ffc87
+Patch11: lxdm-0.4.1-restart-xserver-on-logout.patch
+
## Distro specific patches ##
+
# Distro artwork, start on vt1
-Patch10: lxdm-0.3.0-config.patch
+Patch50: lxdm-0.4.1-config.patch
+
# SELinux, permit graphical root login etc.
-Patch11: lxdm-svn2262-pam.patch
+Patch51: lxdm-0.4.1-pam.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: gtk2-devel >= 2.12.0
+BuildRequires: pkgconfig(gtk+-2.0) >= 2.12.0
BuildRequires: iso-codes-devel
BuildRequires: ConsoleKit-devel
BuildRequires: pam-devel
@@ -49,7 +86,7 @@ Requires: pam
Requires: /sbin/shutdown
Requires: desktop-backgrounds-compat
# needed for anaconda to boot into runlevel 5 after install
-Provides: service(graphical-login)
+Provides: service(graphical-login) = lxdm
%description
@@ -60,9 +97,22 @@ KDM in LXDE distros. It's still in very early stage of development.
%prep
%setup -q %{?git_version:-n %{name}}
-%patch1 -p1 -b .background
-%patch10 -p1 -b .config
-%patch11 -p1 -b .orig
+%patch0 -p1 -b .null-pointer
+%patch1 -p1 -b .missing-semicolons
+%patch2 -p1 -b .spelling-mistake
+%patch3 -p1 -b .softlockup
+%patch4 -p1 -b .tcp-listen
+%patch5 -p1 -b .exec-dbus
+%patch6 -p1 -b .xauth
+%patch7 -p1 -b .no-password
+%patch8 -p1 -b .GDK_KEY_Escape
+%patch9 -p1 -b .LXSESSION-variable
+%patch10 -p1 -b .old-plymouth
+%patch11 -p1 -b .restart-xserver
+
+%patch50 -p1 -b .config
+%patch51 -p1 -b .orig
+
cat << EOF > tempfiles.lxdm.conf
d %{_localstatedir}/run/%{name} 0755 root root
@@ -114,6 +164,7 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/tmpfiles.d/lxdm.conf
%endif
+%{_bindir}/%{name}-config
%{_sbindir}/%{name}
%{_sbindir}/lxdm-binary
%{_libexecdir}/lxdm-greeter-gtk
@@ -131,8 +182,13 @@ rm -rf %{buildroot}
%ghost %{_localstatedir}/lib/%{name}.conf
-
%changelog
+* Wed Mar 21 2012 Christoph Wickert <cwickert at fedoraproject.org> - 0.4.1-1
+- Update to 0.4.1 (#758480), fixes #596360, #635897, #652697, #683728, #758480
+ and #758484
+- Fix softlock bug causing 100% CPU (#767861, #794478)
+- Fix SELinux problem with xauth (#635897)
+
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.3.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/sources b/sources
index 7d0dcb7..06edf1b 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1d0688e088edab7c3c563263eb2f9654 lxdm-0.3.0.tar.gz
+8da1cfc2be6dc9217c85a7cf51e1e821 lxdm-0.4.1.tar.gz
More information about the scm-commits
mailing list