Line
Link Here
|
0 |
-- dix/main.c.orig 2012-05-17 19:09:02.000000000 +0200 |
0 |
++ dix/main.c 2012-07-09 15:56:47.051703025 +0200 |
Lines 78-83
Link Here
|
78 |
#include <version-config.h> |
78 |
#include <version-config.h> |
79 |
#endif |
79 |
#endif |
80 |
|
80 |
|
|
|
81 |
#include <sys/types.h> |
82 |
#include <pwd.h> |
81 |
#include <X11/X.h> |
83 |
#include <X11/X.h> |
82 |
#include <X11/Xos.h> /* for unistd.h */ |
84 |
#include <X11/Xos.h> /* for unistd.h */ |
83 |
#include <X11/Xproto.h> |
85 |
#include <X11/Xproto.h> |
Lines 284-291
Link Here
|
284 |
#endif |
286 |
#endif |
285 |
|
287 |
|
286 |
NotifyParentProcess(); |
288 |
NotifyParentProcess(); |
287 |
|
289 |
struct passwd passwd1; |
|
|
290 |
struct passwd* Passwd1 = 0; |
291 |
char buf[4096]; |
292 |
getpwnam_r("xorg", &passwd1, buf, 4096, &Passwd1); |
293 |
if ((Passwd1 == &passwd1) && (!setuid(passwd1.pw_uid))) { |
288 |
Dispatch(); |
294 |
Dispatch(); |
|
|
295 |
} else { |
296 |
FatalError("can't setuid to user xorg"); |
297 |
} |
289 |
|
298 |
|
290 |
#ifdef XQUARTZ |
299 |
#ifdef XQUARTZ |
291 |
/* Let the other threads know the server is no longer running */ |
300 |
/* Let the other threads know the server is no longer running */ |