Bug 11020

Summary: xdm doesn't set SSH_AUTH_SOCK even though using with pam_ssh
Product: xorg Reporter: Yoshihiko Sarumaru <mistral>
Component: App/xdmAssignee: Xorg Project Team <xorg-team>
Status: CLOSED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: 7.2 (2007.02)   
Hardware: All   
OS: FreeBSD   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
enable pam_getenvlist() none

Description Yoshihiko Sarumaru 2007-05-21 11:16:21 UTC
I have been used xorg 6.9 on my FreeBSD box.
Until I upgraded it to 7.2, after pam_ssh authentication, SSH_AUTH_SOCK 
environmental variable was inhelited to all the application executed by
~/.xsession (typically xterm).
But from xorg 7.2, SSH_AUTH_SOCK will not be set even though ssh-agent
is launched by xdm via PAM subsystem.

I looked into session.c and found that pam_getenvlist() will never be called
if HAS_SETUSERCONTEXT is set to 1.
Comment 1 Yoshihiko Sarumaru 2007-05-21 11:18:53 UTC
Created attachment 10056 [details] [review]
enable pam_getenvlist()

I propose a patch that calls pam_getenvlist() outside of #if HAS_SETUSERCONTEXT
as same as of xorg 6.9
Comment 2 Alan Coopersmith 2007-05-24 10:23:41 UTC
That patch reverts out the fix for bug #4765, so would re-break pam_krb5.
Comment 3 Alan Coopersmith 2007-05-24 10:35:41 UTC
I've pushed a simpler fix to xdm git - simply #endif the #ifndef SETUSERCONTEXT 
block before the PAM code, and restart afterwards.

http://gitweb.freedesktop.org/?p=xorg/app/xdm.git;a=commitdiff;h=e7f1c433dc0bd8e864cec68dbc120f27696bbba6

Let me know if this doesn't work for you.
Comment 4 Yoshihiko Sarumaru 2007-05-26 09:19:57 UTC
It worked for me, thanks!
I'll feedback this to FreeBSD community.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.