aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2003-03-15 04:30:03 +0000
committerEric Anholt <anholt@FreeBSD.org>2003-03-15 04:30:03 +0000
commit3d8d6945091c79e6bb199c7d5afcb44d01fb71cf (patch)
tree900a6524bc7e4c4df7479c1300b4a323cc173446
parentf9deefe2e92fe61d1e67b5cd12809cd059045970 (diff)
downloadports-3d8d6945091c79e6bb199c7d5afcb44d01fb71cf.tar.gz
ports-3d8d6945091c79e6bb199c7d5afcb44d01fb71cf.zip
Re-add patch-xdm_session.c which was accidentally dropped in the 4.3.0 upgrade.
This fixes problems with environment not being set in xdm sessions. Submitted by: many Approved by: portmgr (kris)
Notes
Notes: svn path=/head/; revision=77128
-rw-r--r--x11/XFree86-4-clients/Makefile1
-rw-r--r--x11/XFree86-4-libraries/files/patch-xdm_session.c27
2 files changed, 28 insertions, 0 deletions
diff --git a/x11/XFree86-4-clients/Makefile b/x11/XFree86-4-clients/Makefile
index bf8844ac493d..20d906a77345 100644
--- a/x11/XFree86-4-clients/Makefile
+++ b/x11/XFree86-4-clients/Makefile
@@ -7,6 +7,7 @@
PORTNAME= clients
PORTVERSION= 4.3.0
+PORTREVISION= 1
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_XFREE}
MASTER_SITE_SUBDIR= 4.3.0
diff --git a/x11/XFree86-4-libraries/files/patch-xdm_session.c b/x11/XFree86-4-libraries/files/patch-xdm_session.c
new file mode 100644
index 000000000000..c7c2d43dce28
--- /dev/null
+++ b/x11/XFree86-4-libraries/files/patch-xdm_session.c
@@ -0,0 +1,27 @@
+--- programs/xdm/session.c.orig Wed May 30 00:56:22 2001
++++ programs/xdm/session.c Fri Sep 28 23:25:16 2001
+@@ -541,6 +541,7 @@
+ int pid;
+ #ifdef HAS_SETUSERCONTEXT
+ struct passwd* pwd;
++ extern char **environ;
+ #endif
+ #ifdef USE_PAM
+ pam_handle_t *pamh = thepamh();
+@@ -623,6 +624,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)
+ {
+@@ -632,6 +635,7 @@
+ errno);
+ return (0);
+ }
++ verify->userEnviron = environ;
+ endpwent();
+ }
+ else