summaryrefslogtreecommitdiff
path: root/community/lxdm
diff options
context:
space:
mode:
Diffstat (limited to 'community/lxdm')
-rw-r--r--community/lxdm/PKGBUILD10
-rw-r--r--community/lxdm/pam-env-vars.patch50
-rw-r--r--community/lxdm/service2
3 files changed, 57 insertions, 5 deletions
diff --git a/community/lxdm/PKGBUILD b/community/lxdm/PKGBUILD
index 01609d179..4a6d1c707 100644
--- a/community/lxdm/PKGBUILD
+++ b/community/lxdm/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 72998 2012-06-27 05:02:11Z bpiotrowski $
+# $Id: PKGBUILD 74705 2012-08-02 08:51:42Z bpiotrowski $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: AndyRTR <andyrtr@archlinux.org>
# Contributor: kiefer <jorgelmadrid@gmail.com>
pkgname=lxdm
pkgver=0.4.1
-pkgrel=13
+pkgrel=14
pkgdesc='Lightweight X11 Display Manager'
arch=('i686' 'x86_64')
url="http://sourceforge.net/projects/lxdm/"
@@ -19,22 +19,24 @@ backup=('etc/lxdm/lxdm.conf' 'etc/pam.d/lxdm' 'etc/lxdm/Xsession'
'etc/lxdm/PostLogout' 'etc/lxdm/PreReboot' 'etc/lxdm/PreShutdown')
source=(http://downloads.sourceforge.net/lxde/$pkgname-$pkgver.tar.gz
glib2-2.32.0.patch lxdm.patch lxdm.conf.patch Xsession.patch
- greeter-session.patch rc.d lxdm-pam service)
+ greeter-session.patch pam-env-vars.patch rc.d lxdm-pam service)
md5sums=('8da1cfc2be6dc9217c85a7cf51e1e821'
'a1e3c46a8bef691bc544028f5b6cfe22'
'baed9055e8825a5511712bc095197519'
'c50dd01b715b0a236407d48066191601'
'd2e4a4a22ee2aa1a986be154c647b6c6'
'28475239d0c8b4fd778ec49f5ec72962'
+ '4c1d43e81e9a256e8d1ea7686c24b3d3'
'705f394052fdd0dec22e95321d170de0'
'9a76cae5b3a0fcbb6116fa08c7a587b5'
- '4aaa9a7175cf327d9f7651c2586ef922')
+ 'e8cc66eb1a2405d2d9d184a727cbd9d8')
build() {
cd $srcdir/$pkgname-$pkgver
patch -Np1 -i $srcdir/glib2-2.32.0.patch
patch -Np1 -i $srcdir/greeter-session.patch
+ patch -Np1 -i $srcdir/pam-env-vars.patch
./configure --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib/lxdm
make
diff --git a/community/lxdm/pam-env-vars.patch b/community/lxdm/pam-env-vars.patch
new file mode 100644
index 000000000..ab8605ff1
--- /dev/null
+++ b/community/lxdm/pam-env-vars.patch
@@ -0,0 +1,50 @@
+diff --git a/src/lxdm.c b/src/lxdm.c
+index 369aedf..cd1d486 100644
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -935,16 +935,23 @@ void setup_pam_session(LXSession *s,struct passwd *pw,char *session_name)
+ g_warning( "pam open session error \"%s\"\n", pam_strerror(s->pamh, err));
+ }
+
+-void append_pam_environ(pam_handle_t *pamh,char **env)
++static char **append_pam_environ(pam_handle_t *pamh,char **env)
+ {
+- int i,j,n;
++ int i,j,n,a;
+ char **penv;
+- if(!pamh) return;
++ if(!pamh) return env;
+ penv=pam_getenvlist(pamh);
+- if(!penv) return;
++ if(!penv) return env;
++ a=g_strv_length(penv);
++ if(a==0)
++ {
++ free(penv);
++ return env;
++ }
++ env=g_renew(char *,env,g_strv_length(env)+1+a+10);
+ for(i=0;penv[i]!=NULL;i++)
+ {
+- //printf("PAM %s\n",penv[i]);
++ fprintf(stderr,"PAM %s\n",penv[i]);
+ n=strcspn(penv[i],"=")+1;
+ for(j=0;env[j]!=NULL;j++)
+ {
+@@ -960,6 +967,7 @@ void append_pam_environ(pam_handle_t *pamh,char **env)
+ free(penv[i]);
+ }
+ free(penv);
++ return env;
+ }
+
+ #endif
+@@ -1540,7 +1548,7 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang, char *option)
+ if(s->child==0)
+ {
+ #if HAVE_LIBPAM
+- append_pam_environ(s->pamh,env);
++ env=append_pam_environ(s->pamh,env);
+ pam_end(s->pamh,0);
+ #endif
+ switch_user(pw, session_exec, env);
diff --git a/community/lxdm/service b/community/lxdm/service
index b76e1190e..e1840476c 100644
--- a/community/lxdm/service
+++ b/community/lxdm/service
@@ -6,4 +6,4 @@ After=systemd-user-sessions.service
ExecStart=/usr/sbin/lxdm
[Install]
-WantedBy=graphical.target
+Alias=display-manager.service