$NetBSD: patch-ay,v 1.5 2004/04/15 22:28:36 wiz Exp $

--- src/run.c.orig	Thu Apr  1 20:53:22 2004
+++ src/run.c
@@ -191,6 +191,13 @@ run_exec (stin, stout, sterr, flags)
 #endif
     if (pid == 0)
     {
+#ifdef SETXID_SUPPORT
+	if (flags & RUN_UNSETXID) {
+	    (void) setgid (getgid ());
+	    (void) setuid (getuid ());
+	}
+#endif
+
 	if (shin != 0)
 	{
 	    (void) dup2 (shin, 0);
