summaryrefslogtreecommitdiffstats
path: root/x11/xdm/files/patch-xdm_session.c
diff options
context:
space:
mode:
authormiwi <miwi@058c260c-8361-11dd-a0ac-aa2bafec7d09>2012-02-06 00:43:42 +0800
committermiwi <miwi@058c260c-8361-11dd-a0ac-aa2bafec7d09>2012-02-06 00:43:42 +0800
commiteb384524d18261e42f80deeb7cbe74523f1d49eb (patch)
tree0495ae031d15285d4795cdeb948cfc6df2c97f58 /x11/xdm/files/patch-xdm_session.c
parente8fa453ef65d0752f7b1379dc1726874936edf7d (diff)
downloadxorg-devel-ports-eb384524d18261e42f80deeb7cbe74523f1d49eb.tar
xorg-devel-ports-eb384524d18261e42f80deeb7cbe74523f1d49eb.tar.gz
xorg-devel-ports-eb384524d18261e42f80deeb7cbe74523f1d49eb.tar.bz2
xorg-devel-ports-eb384524d18261e42f80deeb7cbe74523f1d49eb.tar.lz
xorg-devel-ports-eb384524d18261e42f80deeb7cbe74523f1d49eb.tar.xz
xorg-devel-ports-eb384524d18261e42f80deeb7cbe74523f1d49eb.tar.zst
xorg-devel-ports-eb384524d18261e42f80deeb7cbe74523f1d49eb.zip
- Move ports/branches/xorg-dev to ports/trunk/
git-svn-id: https://trillian.chruetertee.ch/svn/ports/trunk@388 058c260c-8361-11dd-a0ac-aa2bafec7d09
Diffstat (limited to 'x11/xdm/files/patch-xdm_session.c')
-rw-r--r--x11/xdm/files/patch-xdm_session.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/x11/xdm/files/patch-xdm_session.c b/x11/xdm/files/patch-xdm_session.c
new file mode 100644
index 0000000..de1c579
--- /dev/null
+++ b/x11/xdm/files/patch-xdm_session.c
@@ -0,0 +1,27 @@
+--- xdm/session.c.orig Sun Jun 3 22:49:51 2007
++++ xdm/session.c Sun Jun 3 22:56:06 2007
+@@ -543,6 +543,7 @@
+ pid_t pid;
+ #ifdef HAS_SETUSERCONTEXT
+ struct passwd* pwd;
++ extern char **environ;
+ #endif
+ #ifdef USE_PAM
+ pam_handle_t *pamh = thepamh ();
+@@ -657,6 +660,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) {
+ if (setusercontext(NULL, pwd, pwd->pw_uid, LOGIN_SETALL) < 0) {
+@@ -664,6 +669,7 @@
+ errno);
+ return (0);
+ }
++ verify->userEnviron = environ;
+ endpwent();
+ } else {
+ LogError ("getpwnam for \"%s\" failed, errno=%d\n", name, errno);