$NetBSD: patch-ck,v 1.1 2006/09/14 16:52:54 joerg Exp $

--- programs/xinit/xinit.c.orig	2005-10-04 03:27:34.000000000 +0200
+++ programs/xinit/xinit.c
@@ -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__
