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

--- programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c.orig	2005-07-03 10:53:48.000000000 +0200
+++ programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c
@@ -1270,7 +1270,10 @@ xf86execl(const char *pathname, const ch
 #ifndef SELF_CONTAINED_WRAPPER
 	xf86DisableIO();
 #endif
-        setuid(getuid());
+        if (setuid(getuid()) == -1) {
+		ErrorF("xf86Execl: setuid() failed: %s\n", strerror(errno));
+		exit(255);
+	}
 #if !defined(SELF_CONTAINED_WRAPPER)
         /* set stdin, stdout to the consoleFD, and leave stderr alone */
         for (i = 0; i < 2; i++)
