1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-05 06:27:37 +00:00

Patcch to xdm to set environment from login.conf

PR:		ports/13614
Submitted by:	Max Khon <fjoe@iclub.nsu.ru>
Obtained from:	wdm distribution
This commit is contained in:
Jean-Marc Zucconi 2001-10-24 20:05:14 +00:00
parent 88b9dbc7c4
commit a46bd99227
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=49180
2 changed files with 28 additions and 1 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= XFree86
PORTVERSION= 4.1.0
PORTREVISION= 7
PORTREVISION= 8
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_XFREE}
MASTER_SITE_SUBDIR= 4.1.0

View File

@ -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