Bug 11020 - xdm doesn't set SSH_AUTH_SOCK even though using with pam_ssh
Summary: xdm doesn't set SSH_AUTH_SOCK even though using with pam_ssh
Alias: None
Product: xorg
Classification: Unclassified
Component: App/xdm (show other bugs)
Version: 7.2 (2007.02)
Hardware: All FreeBSD
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
Depends on:
Reported: 2007-05-21 11:16 UTC by Yoshihiko Sarumaru
Modified: 2007-05-26 09:19 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

enable pam_getenvlist() (1.60 KB, patch)
2007-05-21 11:18 UTC, Yoshihiko Sarumaru
no flags Details | Splinter Review

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.


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.