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.
Created attachment 10056 [details] [review]
I propose a patch that calls pam_getenvlist() outside of #if HAS_SETUSERCONTEXT
as same as of xorg 6.9
That patch reverts out the fix for bug #4765, so would re-break pam_krb5.
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.
It worked for me, thanks!
I'll feedback this to FreeBSD community.