summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorFlorent Thoumie <flz@FreeBSD.org>2007-10-09 19:26:51 +0000
committerFlorent Thoumie <flz@FreeBSD.org>2007-10-09 19:26:51 +0000
commit451bceb7cc5e939fe5acadc7fae251b2655332c4 (patch)
treef480a416fb9929380d603d77c2ae76b1d4b0d2ba /x11
parentUpdate xinit to 1.0.7. (diff)
- Fix configuration file location.
- Respect user context.
Notes
Notes: svn path=/head/; revision=201205
Diffstat (limited to 'x11')
-rw-r--r--x11/xdm/Makefile6
-rw-r--r--x11/xdm/files/patch-session.c27
2 files changed, 33 insertions, 0 deletions
diff --git a/x11/xdm/Makefile b/x11/xdm/Makefile
index 41d073fdf8f9..e168ae29167e 100644
--- a/x11/xdm/Makefile
+++ b/x11/xdm/Makefile
@@ -7,6 +7,7 @@
PORTNAME= xdm
PORTVERSION= 1.1.6
+PORTREVISION= 1
CATEGORIES= x11
MAINTAINER= x11@FreeBSD.org
@@ -22,6 +23,11 @@ MAN1= xdm.1
CFFILES= GiveConsole TakeConsole Xaccess Xreset Xresources \
Xservers Xsession Xsetup_0 Xstartup Xwilling xdm-config
+post-patch:
+ @${REINPLACE_CMD} -e "s|XDMCONFIGDIR/|${PREFIX}/lib/X11/xdm/|" \
+ -e "s|XDMSCRIPTDIR/|${PREFIX}/lib/X11/xdm/|" \
+ ${WRKSRC}/config/xdm-config.cpp
+
post-install:
.for f in ${CFFILES}
${CP} -n ${EXAMPLESDIR}/$f ${PREFIX}/lib/X11/xdm/$f
diff --git a/x11/xdm/files/patch-session.c b/x11/xdm/files/patch-session.c
new file mode 100644
index 000000000000..6eb34ed2346f
--- /dev/null
+++ b/x11/xdm/files/patch-session.c
@@ -0,0 +1,27 @@
+--- session.c.orig Sun Jun 3 22:49:51 2007
++++ 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);