Date: Sat, 9 Jun 2001 16:19:51 +0200 (CEST) From: ruben@verweg.com To: FreeBSD-gnats-submit@freebsd.org Cc: green@freebsd.org Subject: bin/34045: [PATCH] let pam_ssh.so session work (with xdm) Message-ID: <200106091419.f59EJpk09293@helium.verweg.com>
next in thread | raw e-mail | index | archive | help
>Number: 34045 >Category: bin >Synopsis: [PATCH] let pam_ssh.so explicitly start ssh-agent with bourne shell syntax >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jan 18 12:30:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Ruben van Staveren >Release: FreeBSD 4.3-STABLE i386 >Organization: Verweg dot Com >Environment: System: FreeBSD helium.verweg.com 4.3-STABLE FreeBSD 4.3-STABLE #0: Wed May 30 15:17:54 CEST 2001 root@helium.verweg.com:/usr/obj/usr/cvsup/4.0-stable/src/sys/HELIUM i386 >Description: The pam_ssh module has the possibility to start ssh-agent for you, making a single logon possible by directly feeding your passphrase into the agent (obtained during the authentification phase) However, ssh-agent has the habit on my system to present its output in C shell format whereas pam_ssh expects it to be in Bourne shell format (pam_ssh.c, lines 397-409) This does not affect the auth capability, only the session phase. >How-To-Repeat: Use pam_ssh.so as a session and auth module for xdm in /etc/pam.conf and observe the contents of the ~/.ssh/agent-* file after logon the following syslog messages also apply: Jun 9 13:19:47 helium -:0 : pam_ssh: could not connect to agent Jun 9 14:45:11 helium -:0 : pam_ssh: /usr/bin/ssh-agent -k exited wi >Fix: Instead of tinkering with the parsing, or changing user shells and or the way xdm is started, let pam_ssh.so explicitly start ssh-agent to output Bourne shell syntax. Here's a patch. --- src/crypto/openssh/pam_ssh/pam_ssh.c.orig Sat Jun 9 15:46:44 2001 +++ src/crypto/openssh/pam_ssh/pam_ssh.c Sat Jun 9 15:46:53 2001 @@ -373,7 +373,7 @@ saved_uid = geteuid(); (void)seteuid(pwent->pw_uid); env_fp = fopen(env_file, "w"); - pipe = popen(PATH_SSH_AGENT, "r"); + pipe = popen(PATH_SSH_AGENT " -s", "r"); (void)seteuid(saved_uid); if (!pipe) { syslog(LOG_ERR, "%s: %s: %m", MODULE_NAME, PATH_SSH_AGENT); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106091419.f59EJpk09293>