Fix to set environment login.conf
PR: ports/13614 Submitted by: fjoe
This commit is contained in:
parent
d0dabff15e
commit
fe2187b759
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=48254
1 changed files with 27 additions and 0 deletions
27
x11/XFree86/files/patch-xdm
Normal file
27
x11/XFree86/files/patch-xdm
Normal file
|
@ -0,0 +1,27 @@
|
|||
--- programs/xdm/session.c.orig Fri Sep 28 23:31:30 2001
|
||||
+++ programs/xdm/session.c Fri Sep 28 23:33:03 2001
|
||||
@@ -525,6 +525,7 @@
|
||||
int pid;
|
||||
#ifdef HAS_SETUSERCONTEXT
|
||||
struct passwd* pwd;
|
||||
+ extern char **environ;
|
||||
#endif
|
||||
|
||||
if (verify->argv) {
|
||||
@@ -602,6 +603,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)
|
||||
{
|
||||
@@ -611,6 +614,7 @@
|
||||
errno);
|
||||
return(0);
|
||||
}
|
||||
+ verify->userEnviron = environ;
|
||||
endpwent();
|
||||
}
|
||||
else
|
Loading…
Reference in a new issue