summaryrefslogtreecommitdiffstats
path: root/meta-efl/recipes-efl/efl
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2011-11-19 15:58:09 +0100
committerKoen Kooi <koen@dominion.thruhere.net>2011-12-06 13:08:30 +0100
commitc2660eb5c61aaa044d5acad35067e48f3d11ceda (patch)
tree7e194de0072d4f255fc3e4c508b30ff340d207ff /meta-efl/recipes-efl/efl
parent8eede31c5327af2b8131d6c407eb86182405791f (diff)
downloadmeta-openembedded-c2660eb5c61aaa044d5acad35067e48f3d11ceda.tar.gz
elsa: fix to build with disabled PAM
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-efl/recipes-efl/efl')
-rw-r--r--meta-efl/recipes-efl/efl/elsa/0001-elsa-fix-to-build-really-without-PAM-support-if-PAM-.patch179
-rw-r--r--meta-efl/recipes-efl/efl/elsa_svn.bb1
2 files changed, 180 insertions, 0 deletions
diff --git a/meta-efl/recipes-efl/efl/elsa/0001-elsa-fix-to-build-really-without-PAM-support-if-PAM-.patch b/meta-efl/recipes-efl/efl/elsa/0001-elsa-fix-to-build-really-without-PAM-support-if-PAM-.patch
new file mode 100644
index 000000000..2ccdb7206
--- /dev/null
+++ b/meta-efl/recipes-efl/efl/elsa/0001-elsa-fix-to-build-really-without-PAM-support-if-PAM-.patch
@@ -0,0 +1,179 @@
1From 0f97df8ddf1af3b7c8d670b8600a51e2ebe4e855 Mon Sep 17 00:00:00 2001
2From: Klaus 'mrmoku' Kurzmann <mok@mnet-online.de>
3Date: Sat, 19 Nov 2011 15:36:57 +0100
4Subject: [PATCH 1/2] elsa: fix to build really without PAM support if PAM is
5 disabled or not available
6
7* there as still issues in runtime without PAM, but at least it builds
8 now without PAM support and it's good start
9
10Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
11---
12 PROTO/elsa/configure.ac | 2 +-
13 PROTO/elsa/src/daemon/Makefile.am | 6 ++++--
14 PROTO/elsa/src/daemon/elsa.c | 8 ++++++++
15 PROTO/elsa/src/daemon/elsa.h | 2 ++
16 PROTO/elsa/src/daemon/elsa_session.c | 11 +++++++++--
17 5 files changed, 24 insertions(+), 5 deletions(-)
18
19diff --git a/configure.ac b/configure.ac
20index ac85872..82d0a3f 100644
21--- a/configure.ac
22+++ b/configure.ac
23@@ -123,7 +123,6 @@ if test "x${enable_pam}" = "xyes" ; then
24 fi
25
26
27-
28 ### Checks for header files
29
30 # Pam
31@@ -133,6 +132,7 @@ if test "x${have_pam}" = "xyes" ; then
32 [have_pam="no"])
33 fi
34
35+AM_CONDITIONAL(HAVE_PAM, [test "x${have_pam}" = "xyes"])
36
37 ### Checks for types
38
39diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am
40index cf1cd72..7919d90 100644
41--- a/src/daemon/Makefile.am
42+++ b/src/daemon/Makefile.am
43@@ -29,8 +29,6 @@ elsa_session.h \
44 elsa_session.c \
45 elsa_xserver.h \
46 elsa_xserver.c \
47-elsa_pam.h \
48-elsa_pam.c \
49 ../event/elsa_event.c \
50 ../event/elsa_event.h \
51 elsa_server.h \
52@@ -42,6 +40,10 @@ elsa_action.c \
53 elsa.h \
54 elsa.c
55
56+if HAVE_PAM
57+elsa_SOURCES += elsa_pam.h elsa_pam.c
58+endif
59+
60 elsa_LDFLAGS =
61 elsa_LDADD = @ELSA_LIBS@ -lpam -lrt
62
63diff --git a/src/daemon/elsa.c b/src/daemon/elsa.c
64index 8bc243f..23f971d 100644
65--- a/src/daemon/elsa.c
66+++ b/src/daemon/elsa.c
67@@ -278,7 +278,9 @@ main (int argc, char ** argv)
68 }
69
70 elsa_user = getenv("ELSA_USER");
71+#ifdef HAVE_PAM
72 elsa_pam_init(PACKAGE, dname, elsa_user);
73+#endif
74 if (elsa_user)
75 {
76 char *quit;
77@@ -295,7 +297,9 @@ main (int argc, char ** argv)
78 exit(0);
79 }
80 sleep(3);
81+#ifdef HAVE_PAM
82 elsa_pam_init(PACKAGE, dname, NULL);
83+#endif
84 }
85 else
86 fprintf(stderr, "\n");
87@@ -322,7 +326,9 @@ main (int argc, char ** argv)
88 xcb_connection_t *disp = NULL;
89 disp = xcb_connect(dname, NULL);
90 ecore_main_loop_begin();
91+#ifdef HAVE_PAM
92 elsa_pam_item_set(ELSA_PAM_ITEM_USER, elsa_config->userlogin);
93+#endif
94 elsa_session_login(elsa_config->command.session_login, EINA_FALSE);
95 sleep(30);
96 xcb_disconnect(disp);
97@@ -347,8 +353,10 @@ main (int argc, char ** argv)
98 }
99 elsa_xserver_shutdown();
100 fprintf(stderr, PACKAGE": xserver shutdown\n");
101+#ifdef HAVE_PAM
102 elsa_pam_shutdown();
103 fprintf(stderr, PACKAGE": pam shutdown\n");
104+#endif
105 ecore_shutdown();
106 elsa_config_shutdown();
107 fprintf(stderr, PACKAGE": config shutdown\n");
108diff --git a/src/daemon/elsa.h b/src/daemon/elsa.h
109index 87d9f49..46f2584 100644
110--- a/src/daemon/elsa.h
111+++ b/src/daemon/elsa.h
112@@ -13,7 +13,9 @@
113 #include <Ecore_File.h>
114
115 #include "elsa_session.h"
116+#ifdef HAVE_PAM
117 #include "elsa_pam.h"
118+#endif
119 #include "elsa_config.h"
120 #include "elsa_xserver.h"
121 #include "elsa_server.h"
122diff --git a/src/daemon/elsa_session.c b/src/daemon/elsa_session.c
123index 3da70b3..d926db9 100644
124--- a/src/daemon/elsa_session.c
125+++ b/src/daemon/elsa_session.c
126@@ -91,7 +91,6 @@ _elsa_session_userid_set(struct passwd *pwd)
127 static Eina_Bool
128 _elsa_session_begin(struct passwd *pwd, const char *cookie)
129 {
130- char *term;
131 fprintf(stderr, PACKAGE": Session Init\n");
132 if (pwd->pw_shell[0] == '\0')
133 {
134@@ -99,7 +98,8 @@ _elsa_session_begin(struct passwd *pwd, const char *cookie)
135 strcpy(pwd->pw_shell, getusershell());
136 endusershell();
137 }
138- term = getenv("TERM");
139+#ifdef HAVE_PAM
140+ char *term = getenv("TERM");
141 if (term) elsa_pam_env_set("TERM", term);
142 elsa_pam_env_set("HOME", pwd->pw_dir);
143 elsa_pam_env_set("SHELL", pwd->pw_shell);
144@@ -109,6 +109,7 @@ _elsa_session_begin(struct passwd *pwd, const char *cookie)
145 elsa_pam_env_set("DISPLAY", ":0.0");
146 elsa_pam_env_set("MAIL", "");
147 elsa_pam_env_set("XAUTHORITY", cookie);
148+#endif
149 return EINA_TRUE;
150 }
151
152@@ -164,9 +165,11 @@ elsa_session_end(const char *user)
153 "%s %s ", elsa_config->command.session_stop, user);
154 if (-1 == system(buf))
155 fprintf(stderr, PACKAGE": Error on session stop command %s", buf);
156+#ifdef HAVE_PAM
157 elsa_pam_close_session();
158 elsa_pam_end();
159 elsa_pam_shutdown();
160+#endif
161 }
162
163 void
164@@ -234,8 +237,12 @@ elsa_session_shutdown()
165 Eina_Bool
166 elsa_session_authenticate(const char *login, const char *passwd)
167 {
168+#ifdef HAVE_PAM
169 return (!elsa_pam_auth_set(login, passwd)
170 && !elsa_pam_authenticate());
171+#else
172+ return (EINA_TRUE);
173+#endif
174 }
175
176 Eina_Bool
177--
1781.7.8.rc4
179
diff --git a/meta-efl/recipes-efl/efl/elsa_svn.bb b/meta-efl/recipes-efl/efl/elsa_svn.bb
index 949c7e1f8..c21c2e560 100644
--- a/meta-efl/recipes-efl/efl/elsa_svn.bb
+++ b/meta-efl/recipes-efl/efl/elsa_svn.bb
@@ -7,6 +7,7 @@ SECTION = "e/apps"
7inherit e gettext 7inherit e gettext
8SRC_URI = "${E_SVN}/trunk/PROTO;module=${SRCNAME};proto=http;scmdata=keep \ 8SRC_URI = "${E_SVN}/trunk/PROTO;module=${SRCNAME};proto=http;scmdata=keep \
9 file://0001-pam-use-common-auth-instead-of-system-auth.patch \ 9 file://0001-pam-use-common-auth-instead-of-system-auth.patch \
10 file://0001-elsa-fix-to-build-really-without-PAM-support-if-PAM-.patch \
10 file://xserver-nodm.service \ 11 file://xserver-nodm.service \
11" 12"
12S = "${WORKDIR}/${SRCNAME}" 13S = "${WORKDIR}/${SRCNAME}"