diff options
author | lesi <lesi@FreeBSD.org> | 2007-06-08 03:48:59 +0800 |
---|---|---|
committer | lesi <lesi@FreeBSD.org> | 2007-06-08 03:48:59 +0800 |
commit | 768916179ca5aa1b6315ee79a1e3f531d8500080 (patch) | |
tree | dc8150cb8c23eff11ab0bb36bb17d87dab7574d5 | |
parent | 814d1d2c501c9e756534bafe316a7120e10fc50d (diff) | |
download | freebsd-ports-gnome-768916179ca5aa1b6315ee79a1e3f531d8500080.tar.gz freebsd-ports-gnome-768916179ca5aa1b6315ee79a1e3f531d8500080.tar.zst freebsd-ports-gnome-768916179ca5aa1b6315ee79a1e3f531d8500080.zip |
- Restore inheriting environment from login.conf by restoring patch
from x11/xorg-clients [1]
- Restore inheriting SSH_AUTH_SOCK after pam_ssh authentication
(https://bugs.freedesktop.org/show_bug.cgi?id=11020) [2]
PR: ports/112932 [1], ports/113031 [2]
Obtained from: X.org git [2]
-rw-r--r-- | x11/xdm/Makefile | 2 | ||||
-rw-r--r-- | x11/xdm/files/patch-session.c | 43 |
2 files changed, 44 insertions, 1 deletions
diff --git a/x11/xdm/Makefile b/x11/xdm/Makefile index 21228ae93803..0e1025f15999 100644 --- a/x11/xdm/Makefile +++ b/x11/xdm/Makefile @@ -7,7 +7,7 @@ PORTNAME= xdm PORTVERSION= 1.1.4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 MAINTAINER= x11@FreeBSD.org diff --git a/x11/xdm/files/patch-session.c b/x11/xdm/files/patch-session.c new file mode 100644 index 000000000000..a657f9cdcc44 --- /dev/null +++ b/x11/xdm/files/patch-session.c @@ -0,0 +1,43 @@ +--- 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 (); +@@ -627,6 +628,7 @@ + return (0); + } + #endif /* QNX4 doesn't support multi-groups, no initgroups() */ ++#endif /* !HAS_SETUSERCONTEXT */ + #ifdef USE_PAM + if (pamh) { + long i; +@@ -647,6 +649,7 @@ + + } + #endif ++#ifndef HAS_SETUSERCONTEXT + if (setuid(verify->uid) < 0) { + LogError ("setuid %d (user \"%s\") failed, errno=%d\n", + verify->uid, name, errno); +@@ -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); |