$OpenBSD: patch-daemon_slave_c,v 1.12 2009/03/19 08:26:42 ajacoutot Exp $
--- daemon/slave.c.orig	Thu Mar 19 05:59:27 2009
+++ daemon/slave.c	Thu Mar 19 09:01:37 2009
@@ -2857,7 +2857,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,
@@ -3594,6 +3594,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;
 
@@ -3815,8 +3816,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",
