Bug 29609

Summary: yet another core dump caused by pam_ssh
Product: Base System Reporter: SANETO Takanori <sanewo>
Component: binAssignee: Mark Murray <markm>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description SANETO Takanori 2001-08-10 18:00:00 UTC
/usr/src/lib/libpam/modules/pam_ssh/pam_ssh.c has couple of bugs which cause:

1) xdm dumps core
2) ssh1 private key is not passed to ssh-agent
3) ssh2 RSA key seems not handled properly (just a guess from source)
4) ssh_get_authentication_connectionen() fails to get connection because of
   SSH_AUTH_SOCK not defined.

Fix: In my environment, following patch seems to fix above problems.

But I'm not sure this is the right way to do, especially for problem
#4. (modifying ssh_get_authentication_connection() so that it takes an
argument for the name of socket file could be better?)

Summary of fix:

1) treatment of environment string was incorrect. does it right as in ports/security/pam_ssh.
2) key type of ssh1 key should be KEY_RSA1, not KEY_RSA.
3) typo fixed (one of KEY_DSA should be KEY_RSA)
4) use putenv() to put SSH_AUTH_SOCK to the environment
How-To-Repeat: 
With pam.conf shown above, invoke xdm and try to login.
Comment 1 Kris Kennaway freebsd_committer freebsd_triage 2001-08-10 22:59:38 UTC
Responsible Changed
From-To: freebsd-bugs->markm

Over to Mark
Comment 2 Mark Murray freebsd_committer freebsd_triage 2001-08-11 13:38:58 UTC
State Changed
From-To: open->closed

Committed, thanks! (Domo Arrigato!)