From fe2187b759de3f0a21ca82363715de2d2fd80a51 Mon Sep 17 00:00:00 2001 From: Jean-Marc Zucconi Date: Fri, 28 Sep 2001 22:27:11 +0000 Subject: [PATCH] Fix to set environment login.conf PR: ports/13614 Submitted by: fjoe --- x11/XFree86/files/patch-xdm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 x11/XFree86/files/patch-xdm diff --git a/x11/XFree86/files/patch-xdm b/x11/XFree86/files/patch-xdm new file mode 100644 index 000000000000..4fe894f64af2 --- /dev/null +++ b/x11/XFree86/files/patch-xdm @@ -0,0 +1,27 @@ +--- programs/xdm/session.c.orig Fri Sep 28 23:31:30 2001 ++++ programs/xdm/session.c Fri Sep 28 23:33:03 2001 +@@ -525,6 +525,7 @@ + int pid; + #ifdef HAS_SETUSERCONTEXT + struct passwd* pwd; ++ extern char **environ; + #endif + + if (verify->argv) { +@@ -602,6 +603,8 @@ + * Set the user's credentials: uid, gid, groups, + * environment variables, resource limits, and umask. + */ ++ /* destroy user environment before calling setusercontext */ ++ environ = verify->userEnviron; + pwd = getpwnam(name); + if (pwd) + { +@@ -611,6 +614,7 @@ + errno); + return(0); + } ++ verify->userEnviron = environ; + endpwent(); + } + else