diff options
Diffstat (limited to 'meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch')
-rw-r--r-- | meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch index 9a401ee4b6..5542036be2 100644 --- a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch | |||
@@ -1,8 +1,8 @@ | |||
1 | From 228349e796e9baa86f2ba8232c730c18ac41283d Mon Sep 17 00:00:00 2001 | 1 | From d02226b3d5872b184c1d50c7f4706ac9467ffb81 Mon Sep 17 00:00:00 2001 |
2 | From: Tom Hochstein <tom.hochstein@nxp.com> | 2 | From: Tom Hochstein <tom.hochstein@nxp.com> |
3 | Date: Fri, 13 May 2016 09:31:55 -0500 | 3 | Date: Fri, 15 Jul 2016 11:00:15 +0300 |
4 | Subject: [PATCH weston] weston-launch: Provide a default version that doesn't | 4 | Subject: [PATCH] weston-launch: Provide a default version that doesn't require |
5 | require PAM | 5 | PAM |
6 | 6 | ||
7 | weston-launch requires PAM for starting weston as a non-root user. | 7 | weston-launch requires PAM for starting weston as a non-root user. |
8 | 8 | ||
@@ -14,18 +14,17 @@ Upstream-Status: Pending | |||
14 | 14 | ||
15 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> | 15 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> |
16 | --- | 16 | --- |
17 | Makefile.am | 3 --- | 17 | configure.ac | 9 +++++++-- |
18 | configure.ac | 12 +++++++----- | ||
19 | src/weston-launch.c | 20 ++++++++++++++++++++ | 18 | src/weston-launch.c | 20 ++++++++++++++++++++ |
20 | 3 files changed, 27 insertions(+), 8 deletions(-) | 19 | 2 files changed, 27 insertions(+), 2 deletions(-) |
21 | 20 | ||
22 | Index: weston-1.10.0/configure.ac | 21 | diff --git a/configure.ac b/configure.ac |
23 | =================================================================== | 22 | index 32fdde7..240966f 100644 |
24 | --- weston-1.10.0.orig/configure.ac 2016-05-13 11:02:05.711817559 -0500 | 23 | --- a/configure.ac |
25 | +++ weston-1.10.0/configure.ac 2016-05-13 13:30:28.000000000 -0500 | 24 | +++ b/configure.ac |
26 | @@ -445,13 +445,17 @@ | 25 | @@ -416,13 +416,17 @@ AC_ARG_ENABLE(resize-optimization, |
27 | AS_IF([test "x$have_systemd_login_209" = "xyes"], | 26 | AS_IF([test "x$enable_resize_optimization" = "xyes"], |
28 | [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])]) | 27 | [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) |
29 | 28 | ||
30 | +AC_ARG_WITH(pam, | 29 | +AC_ARG_WITH(pam, |
31 | + AS_HELP_STRING([--with-pam], [Use PAM]), | 30 | + AS_HELP_STRING([--with-pam], [Use PAM]), |
@@ -34,16 +33,16 @@ Index: weston-1.10.0/configure.ac | |||
34 | AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes) | 33 | AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes) |
35 | -if test x$enable_weston_launch == xyes; then | 34 | -if test x$enable_weston_launch == xyes; then |
36 | +if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then | 35 | +if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then |
37 | AC_CHECK_LIB([pam], [pam_open_session], [have_pam=yes], [have_pam=no]) | 36 | WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no]) |
38 | if test x$have_pam == xno; then | 37 | if test x$have_pam == xno; then |
39 | - AC_ERROR([weston-launch requires pam]) | 38 | - AC_ERROR([weston-launch requires pam]) |
40 | + AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found]) | 39 | + AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found]) |
41 | fi | 40 | fi |
42 | + AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available]) | 41 | + AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available]) |
43 | PAM_LIBS=-lpam | ||
44 | AC_SUBST(PAM_LIBS) | ||
45 | fi | 42 | fi |
46 | @@ -667,6 +671,7 @@ | 43 | |
44 | AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes") | ||
45 | @@ -673,6 +677,7 @@ AC_MSG_RESULT([ | ||
47 | Enable developer documentation ${enable_devdocs} | 46 | Enable developer documentation ${enable_devdocs} |
48 | 47 | ||
49 | weston-launch utility ${enable_weston_launch} | 48 | weston-launch utility ${enable_weston_launch} |
@@ -51,10 +50,10 @@ Index: weston-1.10.0/configure.ac | |||
51 | systemd-login support ${have_systemd_login} | 50 | systemd-login support ${have_systemd_login} |
52 | systemd notify support ${enable_systemd_notify} | 51 | systemd notify support ${enable_systemd_notify} |
53 | 52 | ||
54 | Index: weston-1.10.0/src/weston-launch.c | 53 | diff --git a/src/weston-launch.c b/src/weston-launch.c |
55 | =================================================================== | 54 | index b8b2ba0..a865061 100644 |
56 | --- weston-1.10.0.orig/src/weston-launch.c 2016-05-13 11:02:05.779817896 -0500 | 55 | --- a/src/weston-launch.c |
57 | +++ weston-1.10.0/src/weston-launch.c 2016-05-13 11:02:05.851818253 -0500 | 56 | +++ b/src/weston-launch.c |
58 | @@ -51,7 +51,9 @@ | 57 | @@ -51,7 +51,9 @@ |
59 | 58 | ||
60 | #include <pwd.h> | 59 | #include <pwd.h> |
@@ -65,7 +64,7 @@ Index: weston-1.10.0/src/weston-launch.c | |||
65 | 64 | ||
66 | #ifdef HAVE_SYSTEMD_LOGIN | 65 | #ifdef HAVE_SYSTEMD_LOGIN |
67 | #include <systemd/sd-login.h> | 66 | #include <systemd/sd-login.h> |
68 | @@ -93,8 +95,10 @@ | 67 | @@ -93,8 +95,10 @@ drmSetMaster(int drm_fd) |
69 | #endif | 68 | #endif |
70 | 69 | ||
71 | struct weston_launch { | 70 | struct weston_launch { |
@@ -76,7 +75,7 @@ Index: weston-1.10.0/src/weston-launch.c | |||
76 | int tty; | 75 | int tty; |
77 | int ttynr; | 76 | int ttynr; |
78 | int sock[2]; | 77 | int sock[2]; |
79 | @@ -181,6 +185,7 @@ | 78 | @@ -181,6 +185,7 @@ weston_launch_allowed(struct weston_launch *wl) |
80 | return false; | 79 | return false; |
81 | } | 80 | } |
82 | 81 | ||
@@ -84,7 +83,7 @@ Index: weston-1.10.0/src/weston-launch.c | |||
84 | static int | 83 | static int |
85 | pam_conversation_fn(int msg_count, | 84 | pam_conversation_fn(int msg_count, |
86 | const struct pam_message **messages, | 85 | const struct pam_message **messages, |
87 | @@ -221,6 +226,7 @@ | 86 | @@ -221,6 +226,7 @@ setup_pam(struct weston_launch *wl) |
88 | 87 | ||
89 | return 0; | 88 | return 0; |
90 | } | 89 | } |
@@ -92,7 +91,7 @@ Index: weston-1.10.0/src/weston-launch.c | |||
92 | 91 | ||
93 | static int | 92 | static int |
94 | setup_launcher_socket(struct weston_launch *wl) | 93 | setup_launcher_socket(struct weston_launch *wl) |
95 | @@ -414,6 +420,7 @@ | 94 | @@ -414,6 +420,7 @@ quit(struct weston_launch *wl, int status) |
96 | close(wl->signalfd); | 95 | close(wl->signalfd); |
97 | close(wl->sock[0]); | 96 | close(wl->sock[0]); |
98 | 97 | ||
@@ -100,7 +99,7 @@ Index: weston-1.10.0/src/weston-launch.c | |||
100 | if (wl->new_user) { | 99 | if (wl->new_user) { |
101 | err = pam_close_session(wl->ph, 0); | 100 | err = pam_close_session(wl->ph, 0); |
102 | if (err) | 101 | if (err) |
103 | @@ -421,6 +428,7 @@ | 102 | @@ -421,6 +428,7 @@ quit(struct weston_launch *wl, int status) |
104 | err, pam_strerror(wl->ph, err)); | 103 | err, pam_strerror(wl->ph, err)); |
105 | pam_end(wl->ph, err); | 104 | pam_end(wl->ph, err); |
106 | } | 105 | } |
@@ -108,7 +107,7 @@ Index: weston-1.10.0/src/weston-launch.c | |||
108 | 107 | ||
109 | if (ioctl(wl->tty, KDSKBMUTE, 0) && | 108 | if (ioctl(wl->tty, KDSKBMUTE, 0) && |
110 | ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) | 109 | ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) |
111 | @@ -600,6 +608,7 @@ | 110 | @@ -600,6 +608,7 @@ setup_session(struct weston_launch *wl) |
112 | setenv("HOME", wl->pw->pw_dir, 1); | 111 | setenv("HOME", wl->pw->pw_dir, 1); |
113 | setenv("SHELL", wl->pw->pw_shell, 1); | 112 | setenv("SHELL", wl->pw->pw_shell, 1); |
114 | 113 | ||
@@ -116,7 +115,7 @@ Index: weston-1.10.0/src/weston-launch.c | |||
116 | env = pam_getenvlist(wl->ph); | 115 | env = pam_getenvlist(wl->ph); |
117 | if (env) { | 116 | if (env) { |
118 | for (i = 0; env[i]; ++i) { | 117 | for (i = 0; env[i]; ++i) { |
119 | @@ -608,6 +617,7 @@ | 118 | @@ -608,6 +617,7 @@ setup_session(struct weston_launch *wl) |
120 | } | 119 | } |
121 | free(env); | 120 | free(env); |
122 | } | 121 | } |
@@ -124,7 +123,7 @@ Index: weston-1.10.0/src/weston-launch.c | |||
124 | } | 123 | } |
125 | 124 | ||
126 | static void | 125 | static void |
127 | @@ -665,7 +675,9 @@ | 126 | @@ -665,7 +675,9 @@ static void |
128 | help(const char *name) | 127 | help(const char *name) |
129 | { | 128 | { |
130 | fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); | 129 | fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); |
@@ -134,7 +133,7 @@ Index: weston-1.10.0/src/weston-launch.c | |||
134 | fprintf(stderr, " -t, --tty Start session on alternative tty\n"); | 133 | fprintf(stderr, " -t, --tty Start session on alternative tty\n"); |
135 | fprintf(stderr, " -v, --verbose Be verbose\n"); | 134 | fprintf(stderr, " -v, --verbose Be verbose\n"); |
136 | fprintf(stderr, " -h, --help Display this help message\n"); | 135 | fprintf(stderr, " -h, --help Display this help message\n"); |
137 | @@ -678,7 +690,9 @@ | 136 | @@ -678,7 +690,9 @@ main(int argc, char *argv[]) |
138 | int i, c; | 137 | int i, c; |
139 | char *tty = NULL; | 138 | char *tty = NULL; |
140 | struct option opts[] = { | 139 | struct option opts[] = { |
@@ -144,7 +143,7 @@ Index: weston-1.10.0/src/weston-launch.c | |||
144 | { "tty", required_argument, NULL, 't' }, | 143 | { "tty", required_argument, NULL, 't' }, |
145 | { "verbose", no_argument, NULL, 'v' }, | 144 | { "verbose", no_argument, NULL, 'v' }, |
146 | { "help", no_argument, NULL, 'h' }, | 145 | { "help", no_argument, NULL, 'h' }, |
147 | @@ -690,9 +704,13 @@ | 146 | @@ -690,9 +704,13 @@ main(int argc, char *argv[]) |
148 | while ((c = getopt_long(argc, argv, "u:t::vh", opts, &i)) != -1) { | 147 | while ((c = getopt_long(argc, argv, "u:t::vh", opts, &i)) != -1) { |
149 | switch (c) { | 148 | switch (c) { |
150 | case 'u': | 149 | case 'u': |
@@ -158,7 +157,7 @@ Index: weston-1.10.0/src/weston-launch.c | |||
158 | break; | 157 | break; |
159 | case 't': | 158 | case 't': |
160 | tty = optarg; | 159 | tty = optarg; |
161 | @@ -730,8 +748,10 @@ | 160 | @@ -730,8 +748,10 @@ main(int argc, char *argv[]) |
162 | if (setup_tty(&wl, tty) < 0) | 161 | if (setup_tty(&wl, tty) < 0) |
163 | exit(EXIT_FAILURE); | 162 | exit(EXIT_FAILURE); |
164 | 163 | ||
@@ -169,3 +168,6 @@ Index: weston-1.10.0/src/weston-launch.c | |||
169 | 168 | ||
170 | if (setup_launcher_socket(&wl) < 0) | 169 | if (setup_launcher_socket(&wl) < 0) |
171 | exit(EXIT_FAILURE); | 170 | exit(EXIT_FAILURE); |
171 | -- | ||
172 | 2.1.4 | ||
173 | |||