--- /dev/null
+--- lxdm-0.3.0/src/lxdm.c~ 2010-09-24 18:43:49.000000000 +0300
++++ lxdm-0.3.0/src/lxdm.c 2011-07-10 22:35:30.209784033 +0300
+@@ -1560,6 +1560,11 @@
+ {
+ if(strstr(pw->pw_shell, "nologin"))
+ continue;
++
++ // PLD Linux: skip users with homedir = /home/services
++ if(!strncmp(pw->pw_dir,"/home/services/",15))
++ continue;
++
+ if(strncmp(pw->pw_dir,"/home/",6))
+ {
+ if(!strv_find(white,pw->pw_name))
--- /dev/null
+--- lxdm-0.3.0/src/ui.c.old 2010-09-28 11:29:22.000000000 +0200
++++ lxdm-0.3.0/src/ui.c 2010-09-28 11:29:40.000000000 +0200
+@@ -196,6 +196,7 @@ void ui_prepare(void)
+ struct passwd *pw;
+ g_shell_parse_argv(p, NULL, &argv, NULL);
+ pw=getpwnam("lxdm");endpwent();
++ setuid(0);
+ ret = g_spawn_async_with_pipes(NULL, argv, NULL,
+ G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,greeter_setup, pw,
+ &greeter, greeter_pipe + 0, greeter_pipe + 1, NULL, NULL);
--- /dev/null
+diff -ur lxdm-0.4.1.orig/src/ui.c lxdm-0.4.1.fix/src/ui.c
+--- lxdm-0.4.1.orig/src/ui.c 2013-07-19 07:38:38.000000000 +0000
++++ lxdm-0.4.1.fix/src/ui.c 2013-07-19 07:53:15.643067820 +0000
+@@ -146,7 +146,7 @@
+ else if( !strncmp(str, "shutdown", 6) )
+ lxdm_do_shutdown();
+ else if( !strncmp(str, "log ", 4) )
+- g_message(str + 4);
++ g_message("%s", str + 4);
+ else if( !strncmp(str, "login ", 6) )
+ {
+ char *user = greeter_param(str, "user");
--- /dev/null
+#!/bin/sh
+
+# Make it login shell
+if [ "$HAVE_LOGIN_SHELL" != "yes" ]; then
+ export HAVE_LOGIN_SHELL=yes
+ case $SHELL in
+ */csh|*/tcsh)
+ # [t]cshrc is always sourced automatically.
+ # Note that sourcing csh.login after .cshrc is non-standard.
+ exec $SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; exec $0 $*"
+ ;;
+ *)
+ exec $SHELL -l $0 $*
+ esac
+fi
+unset HAVE_LOGIN_SHELL
+
+# Call standard xinit actions
+. /etc/X11/xinit/xinitdefs
+
+case $1 in
+failsafe)
+ exec xterm -geometry 80x24-0-0
+ ;;
+""|default)
+ # take default action
+ if [ -x "$HOME/.Xclients" ]; then
+ exec "$HOME/.Xclients"
+ else
+ exec /etc/X11/xinit/Xclients
+ fi
+ ;;
+custom)
+ if [ -x "$HOME/.xsession" ]; then
+ exec "$HOME/.xsession"
+ else
+ exec xmessage -center -buttons OK:0 -default OK \
+ "Sorry, $HOME/.xsession not found."
+ fi
+ ;;
+*)
+ exec /etc/X11/xinit/Xclients $1
+esac
--- /dev/null
+#!/bin/sh
+#
+# lxdm: Starts the LXDE Display Manager
+#
+# chkconfig: 5 95 05
+#
+# description: Starts and stops the LXDM Display Manager at startup and \
+# shutdown..
+# probe: true
+# hide: true
+#
+# Source function library
+. /etc/rc.d/init.d/functions
+
+upstart_controlled
+
+start() {
+ # Check if the service is already running?
+ if [ -f /var/lock/subsys/lxdm ]; then
+ msg_already_running "LXDE Display Manager"
+ return
+ fi
+
+ msg_starting "LXDE Display Manager"
+ start-stop-daemon --start -b --exec /usr/sbin/lxdm -- -d
+ ok
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/lxdm
+}
+
+stop() {
+ if [ ! -f /var/lock/subsys/lxdm ]; then
+ msg_not_running "LXDE Display Manager"
+ return
+ fi
+
+ # Stop daemons.
+ msg_stopping "LXDE Display Manager"
+ killproc lxdm
+ rm -f /var/lock/subsys/lxdm
+}
+
+condrestart() {
+ if [ ! -f /var/lock/subsys/lxdm ]; then
+ msg_not_running "LXDE Display Manager"
+ RETVAL=$1
+ return
+ fi
+
+ stop
+ start
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ try-restart)
+ condrestart 0
+ ;;
+ force-reload)
+ condrestart 7
+ ;;
+ status)
+ status lxdm lxdm-binary
+ RETVAL=$?
+ ;;
+ *)
+ msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
+ exit 3
+esac
+
+exit $RETVAL
--- /dev/null
+#%PAM-1.0
+auth required pam_listfile.so item=user sense=deny file=/etc/security/blacklist.lxdm onerr=succeed
+auth include system-auth
+
+account required pam_shells.so
+account required pam_nologin.so
+account required pam_access.so
+account include system-auth
+
+password include system-auth
+
+session optional pam_keyinit.so force revoke
+session optional pam_console.so
+-session optional pam_gnome_keyring.so auto_start
+-session optional pam_ck_connector.so
+session include system-auth
--- /dev/null
+Summary: Light weight X11 display manager
+Name: lxdm
+Version: 0.4.1
+Release: 13
+License: GPL v3
+Group: X11/Applications
+Source0: http://downloads.sourceforge.net/lxde/%{name}-%{version}.tar.gz
+# Source0-md5: 8da1cfc2be6dc9217c85a7cf51e1e821
+Source1: %{name}.pamd
+Source2: %{name}.init
+Source3: %{name}.Xsession
+Source4: %{name}.upstart
+Patch0: %{name}-setuid.patch
+Patch1: greeter-skip-services.patch
+Patch2: softlockup.patch
+Patch3: %{name}-werror.patch
+URL: http://wiki.lxde.org/en/LXDM
+BuildRequires: ConsoleKit-devel
+BuildRequires: gettext-tools
+BuildRequires: gtk+2-devel
+BuildRequires: intltool
+BuildRequires: pam-devel
+BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.627
+Requires: /usr/bin/X
+Requires: iso-codes
+Requires: xinitrc-ng >= 1.0
+Suggests: %{name}-init
+Suggests: openbox
+Provides: XDM
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Light weight X11 display manager.
+
+%package init
+Summary: Init script for lxdm
+Summary(pl.UTF-8): Skrypt init dla lxdm-a
+Group: X11/Applications
+Requires(post,preun): /sbin/chkconfig
+Requires(post,postun): systemd-units >= 38
+Requires: %{name} = %{version}-%{release}
+Requires: rc-scripts >= 0.4.3.0
+Requires: systemd-units >= 38
+
+%description init
+Init script for lxdm.
+
+%description init -l pl.UTF-8
+Skrypt init dla lxdm-a.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+
+%build
+rm -f data/lxdm.conf
+%configure
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,init,pam.d,security} \
+ $RPM_BUILD_ROOT%{systemdunitdir}
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/lxdm
+cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/init/%{name}.conf
+install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/lxdm
+install -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/Xsession
+touch $RPM_BUILD_ROOT/etc/security/blacklist.lxdm
+
+ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/lxdm.service
+
+%find_lang %{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post init
+/sbin/chkconfig --add %{name}
+%service -n %{name} restart
+%systemd_reload
+
+%preun init
+if [ "$1" = "0" ]; then
+ /sbin/chkconfig --del %{name}
+ %service %{name} stop
+fi
+
+%postun init
+%systemd_reload
+
+%files -f %{name}.lang
+%defattr(644,root,root,755)
+%doc AUTHORS README TODO
+%dir %{_sysconfdir}/%{name}
+%attr(755,root,root) %config %{_sysconfdir}/%{name}/LoginReady
+%attr(755,root,root) %config %{_sysconfdir}/%{name}/PostLogin
+%attr(755,root,root) %config %{_sysconfdir}/%{name}/PostLogout
+%attr(755,root,root) %config %{_sysconfdir}/%{name}/PreLogin
+%attr(755,root,root) %config %{_sysconfdir}/%{name}/PreReboot
+%attr(755,root,root) %config %{_sysconfdir}/%{name}/PreShutdown
+%attr(755,root,root) %config %{_sysconfdir}/%{name}/Xsession
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.lxdm
+%attr(755,root,root) %{_bindir}/%{name}-config
+%attr(755,root,root) %{_sbindir}/%{name}
+%attr(755,root,root) %{_sbindir}/%{name}-binary
+%attr(755,root,root) %{_libexecdir}/%{name}-greeter-gtk
+%attr(755,root,root) %{_libdir}/%{name}-greeter-gdk
+%attr(755,root,root) %{_libdir}/%{name}-numlock
+%{_datadir}/%{name}
+
+%files init
+%defattr(644,root,root,755)
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%config(noreplace) %verify(not md5 mtime size) /etc/init/%{name}.conf
+%{systemdunitdir}/lxdm.service
--- /dev/null
+description "Starts the LXDE Display Manager"
+
+start on local-filesystems and started messagebus
+
+stop on pld.shutdown-started
+
+respawn
+expect fork
+exec /usr/sbin/lxdm -d
--- /dev/null
+From: dgod <dgod.osa@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)