Date: Mon, 07 Jan 2002 21:44:51 +0900 From: Takanori Saneto <sanewo@ba2.so-net.ne.jp> To: Jeremy Lea <reg@FreeBSD.org> Cc: Takanori Saneto <sanewo@ba2.so-net.ne.jp> Subject: Re: Should pam_ssh and xdm work? Message-ID: <200201071244.g07Ciq827429@muse.sanewo.dyn.to> In-Reply-To: <20020107002223.A64504@shale.csir.co.za> (Jeremy Lea's message of "Mon, 7 Jan 2002 00:22:23 %2B0200") References: <20020107002223.A64504@shale.csir.co.za>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, I have my xdm+pam_ssh running as I expected, with following patch applied to xdm: Index: programs/xdm/session.c =================================================================== RCS file: /export/cvsup-xfree86/cvs/xc/programs/xdm/session.c,v retrieving revision 3.33 diff -u -r3.33 session.c --- programs/xdm/session.c 14 Dec 2001 20:01:23 -0000 3.33 +++ programs/xdm/session.c 15 Dec 2001 12:35:52 -0000 @@ -534,6 +534,7 @@ int pid; #ifdef HAS_SETUSERCONTEXT struct passwd* pwd; + extern char **environ; #endif #ifdef USE_PAM pam_handle_t *pamh = thepamh(); @@ -613,6 +614,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) { @@ -622,6 +625,7 @@ errno); return (0); } + verify->userEnviron = environ; endpwent(); } else The diff is against the head of XFree86 CVS tree. I hope it works for you. -- $B$5$M$r(B (SANETO Takanori) // [$B<qL#(B] $BK\6H$r$9$k$3$H(B // $B!&!&!&!&!&!&!&!&!&!&!&!&!&!&!&!&!&(B // Bonjour Chapeau // <URL:mailto:sanewo@ba2.so-net.ne.jp> // [$BK\6H(B] $B<qL#$KAv$k$3$H(B // To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201071244.g07Ciq827429>