/[packages]/cauldron/tmux/current/SOURCES/tmux-1.6-dropping_unnecessary_privileges.diff
ViewVC logotype

Annotation of /cauldron/tmux/current/SOURCES/tmux-1.6-dropping_unnecessary_privileges.diff

Parent Directory Parent Directory | Revision Log Revision Log


Revision 203408 - (hide annotations) (download)
Mon Jan 30 18:19:31 2012 UTC (9 years, 7 months ago) by lebedov
File size: 721 byte(s)
Update to 1.6.
1 lebedov 203408 --- tmux-1.6/tmux.c.bak 2012-01-30 12:55:27.533745642 -0500
2     +++ tmux-1.6/tmux.c 2012-01-30 12:57:06.285028356 -0500
3     @@ -237,6 +237,7 @@
4     struct passwd *pw;
5     char *s, *path, *label, *home, **var;
6     int opt, flags, quiet, keys;
7     + u_int gid;
8    
9     #if defined(DEBUG) && defined(__OpenBSD__)
10     malloc_options = (char *) "AFGJPX";
11     @@ -390,6 +391,12 @@
12     }
13     }
14     }
15     + gid = getgit();
16     + /* drop unnecessary privileges which were needed for makesocketpath()
17     + * to create the user directory under /var/run/tmux which is only
18     + * writeable for processes that have setgid utmp. */
19     + if (setresgid(gid, gid, gid) != 0)
20     + return (NULL);
21     if (label != NULL)
22     xfree(label);
23     if (realpath(path, socket_path) == NULL)

  ViewVC Help
Powered by ViewVC 1.1.28