/[packages]/cauldron/gnome-screensaver/current/SOURCES/gnome-screensaver-2.22.2-drop_setgid.patch
ViewVC logotype

Contents of /cauldron/gnome-screensaver/current/SOURCES/gnome-screensaver-2.22.2-drop_setgid.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 26543 - (show annotations) (download)
Thu Jan 20 18:16:04 2011 UTC (13 years, 8 months ago) by pterjan
File size: 917 byte(s)
imported package gnome-screensaver
1 --- src/setuid.c~ 2008-05-27 17:11:42.000000000 -0600
2 +++ src/setuid.c 2008-05-27 17:11:42.000000000 -0600
3 @@ -76,11 +76,11 @@ set_ids_by_number (uid_t uid,
4 errno = 0;
5 if (setgroups (1, &gid) < 0)
6 sgs_errno = errno ? errno : -1;
7 -
8 +#if 0
9 errno = 0;
10 if (setgid (gid) != 0)
11 gid_errno = errno ? errno : -1;
12 -
13 +#endif
14 errno = 0;
15 if (setuid (uid) != 0)
16 uid_errno = errno ? errno : -1;
17 @@ -194,7 +194,7 @@ hack_uid (char **nolock_reason,
18 *orig_uid = uid_gid_string (euid, egid);
19 }
20
21 - if (uid != euid || gid != egid) {
22 + if (euid == (uid_t) 0 && (uid != euid || gid != egid)) {
23 if (! set_ids_by_number (uid, gid, uid_message)) {
24 reason = g_strdup ("unable to discard privileges.");
25

  ViewVC Help
Powered by ViewVC 1.1.30