diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | xinit.c | 5 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2006-06-20 Matthieu Herrb <matthieu.herrb@laas.fr> + + * xinit.c: + Check setuid() return value. Bugzilla #7116. + 2006-05-27 Jeremy C. Reed <reed@reedmedia.net> * startx.cpp: @@ -692,7 +692,10 @@ static int startClient(char *client[]) { if ((clientpid = vfork()) == 0) { - setuid(getuid()); + if (setuid(getuid()) == -1) { + Error("cannot change uid: %s\n", strerror(errno)); + _exit(ERR_EXIT); + } setpgrp(0, getpid()); environ = newenviron; #ifdef __UNIXOS2__ |