$OpenBSD: patch-daemon_slave_c,v 1.11 2009/01/28 16:39:01 ajacoutot Exp $
--- daemon/slave.c.orig	Wed Dec 10 23:25:43 2008
+++ daemon/slave.c	Wed Jan 28 14:49:12 2009
@@ -2854,7 +2854,7 @@ gdm_slave_greeter (void)
 
 		exec_command (LIBEXECDIR "/gdmlogin", NULL);
 
-		VE_IGNORE_EINTR (execl (LIBEXECDIR "/gdmlogin", LIBEXECDIR "/gdmlogin", NULL));
+		VE_IGNORE_EINTR (execl (LIBEXECDIR "/gdmlogin", LIBEXECDIR "/gdmlogin", (void *)NULL));
 
 		gdm_errorgui_error_box (d,
 			       GTK_MESSAGE_ERROR,
@@ -3582,6 +3582,7 @@ session_child_run (struct passwd *pwent,
 	GString *fullexec = NULL;
 	const char *shell = NULL;
 	const char *greeter;
+	const char *login;
 	gint result;
 	gchar **argv = NULL;
 
@@ -3801,8 +3802,7 @@ session_child_run (struct passwd *pwent,
 	if (setusercontext (NULL, pwent, pwent->pw_uid,
 			    LOGIN_SETLOGIN | LOGIN_SETPATH |
 			    LOGIN_SETPRIORITY | LOGIN_SETRESOURCES |
-			    LOGIN_SETUMASK | LOGIN_SETUSER |
-			    LOGIN_SETENV) < 0)
+			    LOGIN_SETUMASK | LOGIN_SETUSER) < 0)
 		gdm_child_exit (DISPLAY_REMANAGE,
 				_("%s: setusercontext () failed for %s. "
 				  "Aborting."), "session_child_run",
