rebuild geeqie
[oi-userland.git] / components / desktop / lightdm / patches / 12-run-linc-cleanup.patch
blobd5d098794df8e3aa4085729ac4408812c97a4836
1 --- lightdm-1.19.3/src/session-child.c.~5~ 2016-08-10 12:30:06.656713943 +0300
2 +++ lightdm-1.19.3/src/session-child.c 2016-08-10 12:39:47.696045830 +0300
3 @@ -94,6 +94,25 @@
4 return value;
7 +static void
8 +run_linc_cleanup(User *user)
9 +{
10 + gboolean drop_privileges;
11 + int result;
13 + drop_privileges = geteuid () == 0;
14 + if (drop_privileges)
15 + privileges_drop (user_get_uid (user), user_get_gid (user));
16 + result=system("/usr/bin/linc-cleanup-sockets");
18 + if(result){
19 + g_printerr ("Error running linc-cleanup-sockets\n");
20 + }
22 + if (drop_privileges)
23 + privileges_reclaim ();
26 static gchar *
27 read_string (void)
29 @@ -805,6 +805,9 @@
30 audit_event (AUDIT_USER_LOGOUT, username, uid, remote_host_name, tty, TRUE);
31 #endif
34 + run_linc_cleanup(user);
36 if (!remote_host_name && !g_strcmp0(xdisplay,":0") && (g_str_has_prefix (tty, "/dev/vt/") || !g_strcmp0(tty,"/dev/console"))){
37 di_devperm_logout (tty);