Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 317692 Details for
Bug 424984
x11-base/xorg-server: allow to run as non-root
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
better patch
setuid_to_xorg.diff (text/plain), 734 bytes, created by
wbrana
on 2012-07-09 14:15:17 UTC
(
hide
)
Description:
better patch
Filename:
MIME Type:
Creator:
wbrana
Created:
2012-07-09 14:15:17 UTC
Size:
734 bytes
patch
obsolete
>--- dix/main.c.orig 2012-05-17 19:09:02.000000000 +0200 >+++ dix/main.c 2012-07-09 15:56:47.051703025 +0200 >@@ -78,6 +78,8 @@ > #include <version-config.h> > #endif > >+#include <sys/types.h> >+#include <pwd.h> > #include <X11/X.h> > #include <X11/Xos.h> /* for unistd.h */ > #include <X11/Xproto.h> >@@ -284,8 +286,15 @@ > #endif > > NotifyParentProcess(); >- >+ struct passwd passwd1; >+ struct passwd* Passwd1 = 0; >+ char buf[4096]; >+ getpwnam_r("xorg", &passwd1, buf, 4096, &Passwd1); >+ if ((Passwd1 == &passwd1) && (!setuid(passwd1.pw_uid))) { > Dispatch(); >+ } else { >+ FatalError("can't setuid to user xorg"); >+ } > > #ifdef XQUARTZ > /* Let the other threads know the server is no longer running */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 424984
:
317362
| 317692