From owner-freebsd-hackers Mon Jan 7 4:45: 4 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from muse.sanewo.dyn.to (pd30459.tkyoea00.ap.so-net.ne.jp [61.211.4.89]) by hub.freebsd.org (Postfix) with ESMTP id 8EBA137B404; Mon, 7 Jan 2002 04:44:56 -0800 (PST) Received: from muse.sanewo.dyn.to (sanewo@localhost [127.0.0.1]) by muse.sanewo.dyn.to (8.11.6/8.11.6) with ESMTP id g07Ciq827429; Mon, 7 Jan 2002 21:44:52 +0900 (JST) (envelope-from sanewo@muse.sanewo.dyn.to) Message-Id: <200201071244.g07Ciq827429@muse.sanewo.dyn.to> To: Jeremy Lea Cc: freebsd-hackers@FreeBSD.org Subject: Re: Should pam_ssh and xdm work? References: <20020107002223.A64504@shale.csir.co.za> Cc: Takanori Saneto From: Takanori Saneto In-Reply-To: <20020107002223.A64504@shale.csir.co.za> (Jeremy Lea's message of "Mon, 7 Jan 2002 00:22:23 +0200") MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=ISO-2022-JP User-Agent: T-gnus/6.15.4 (based on Oort Gnus v0.04) (revision 09) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.5 (beta3) (asparagus) (i386-unknown-freebsd5.0) Date: Mon, 07 Jan 2002 21:44:51 +0900 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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. -- さねを (SANETO Takanori) // [趣味] 本業をすること // ・・・・・・・・・・・・・・・・・ // Bonjour Chapeau // // [本業] 趣味に走ること // To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message