python/hypothesis: update to 6.122.3
[oi-userland.git] / components / desktop / lightdm / patches / 11-login-device-permissions.patch
blob0ce7081ef7ae08189db45d5df387cb49add40f0e
1 --- lightdm-1.19.3/src/Makefile.am.1 2016-08-09 23:03:16.837534078 +0300
2 +++ lightdm-1.19.3/src/Makefile.am 2016-08-09 23:03:52.546669617 +0300
3 @@ -96,7 +96,8 @@
4 $(LIGHTDM_LIBS) \
5 $(top_builddir)/common/libcommon.la \
6 -lgcrypt \
7 - -lpam
8 + -lpam \
9 + -ldevinfo
11 dm_tool_SOURCES = \
12 dm-tool.c
13 --- lightdm-1.19.3/src/session-child.c.~5~ 2016-08-09 22:57:20.465089040 +0300
14 +++ lightdm-1.19.3/src/session-child.c 2016-08-09 22:59:09.543411443 +0300
15 @@ -13,6 +13,7 @@
16 #include <grp.h>
17 #include <glib.h>
18 #include <security/pam_appl.h>
19 +#include <libdevinfo.h>
20 #include <utmp.h>
21 #include <utmpx.h>
22 #include <sys/mman.h>
23 @@ -593,6 +593,10 @@
24 return EXIT_FAILURE;
27 + if (!remote_host_name && !g_strcmp0(xdisplay,":0") && (g_str_has_prefix (tty, "/dev/vt/") || !g_strcmp0(tty,"/dev/console"))){
28 + di_devperm_login (tty,user_get_uid (user),user_get_gid (user), NULL);
29 + }
31 /* Check what logind session we are, or fallback to ConsoleKit */
32 login1_session_id = pam_getenv (pam_handle, "XDG_SESSION_ID");
33 if (login1_session_id)
34 @@ -800,6 +800,9 @@
35 audit_event (AUDIT_USER_LOGOUT, username, uid, remote_host_name, tty, TRUE);
36 #endif
38 + if (!remote_host_name && !g_strcmp0(xdisplay,":0") && (g_str_has_prefix (tty, "/dev/vt/") || !g_strcmp0(tty,"/dev/console"))){
39 + di_devperm_logout (tty);
40 + }
43 /* Remove X authority */