1 http://patches.osdyson.org/patch/series/view/lightdm/1.10.3-3+dyson2/dyson-privileges.patch
3 Description: cannot reclaim root
4 "Thus, a set-user-ID-root program wishing to temporarily drop root
5 privileges, assume the identity of an unprivileged user, and then regain
6 root privileges afterward cannot use setuid(). You can accomplish this
8 (http://linux.die.net/man/2/setuid)
10 "For portability, it is recommended that new non-privileged applications
11 use the seteuid() and setegid() functions instead."
12 (http://pubs.opengroup.org/onlinepubs/009695399/functions/setuid.html)
13 Index: lightdm-1.10.3/common/privileges.c
14 ===================================================================
15 --- lightdm-1.10.3.orig/common/privileges.c
16 +++ lightdm-1.10.3/common/privileges.c
17 @@ -23,13 +23,11 @@ privileges_drop (uid_t uid, gid_t gid)
19 g_assert (setresgid (gid, gid, -1) == 0);
21 - g_assert (setgid (gid) == 0);
22 g_assert (setegid (gid) == 0);
25 g_assert (setresuid (uid, uid, -1) == 0);
27 - g_assert (setuid (uid) == 0);
28 g_assert (seteuid (uid) == 0);
31 @@ -40,13 +38,11 @@ privileges_reclaim (void)
33 g_assert (setresuid (0, 0, -1) == 0);
35 - g_assert (setuid (0) == 0);
36 g_assert (seteuid (0) == 0);
39 g_assert (setresgid (0, 0, -1) == 0);
41 - g_assert (setgid (0) == 0);
42 g_assert (setegid (0) == 0);