From owner-freebsd-current Tue Nov 5 8:24:40 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B6F037B401 for ; Tue, 5 Nov 2002 08:24:39 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E8CF43E3B for ; Tue, 5 Nov 2002 08:24:38 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 54C29534E; Tue, 5 Nov 2002 17:24:35 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Markus Friedl Cc: Alexander Leidinger , current@freebsd.org, openssh@openbsd.org Subject: Re: ssh-agent broken with pam_ssh for xdm (+ fix for ssh-agent.c) References: <20021103204902.3c6b3705.Alexander@Leidinger.net> <20021104092329.GA1677@folly> <20021105142536.GA8326@folly> From: Dag-Erling Smorgrav Date: Tue, 05 Nov 2002 17:24:34 +0100 In-Reply-To: <20021105142536.GA8326@folly> (Markus Friedl's message of "Tue, 5 Nov 2002 15:25:36 +0100") Message-ID: Lines: 18 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386--freebsd) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Markus Friedl writes: > but shouldn't it do something like > seteuid(getuid()); > setuid(getuid()); > executing ssh-agent? It should. It currently uses popen(3), which doesn't. It needs popen(3)-like functionality because it reads ssh-agent's output in order to set $SSH_AGENT_PID and $SSH_AUTH_SOCK. Rewriting it to use pipe(2) + fork(2) + execve(2) so it can frob the UID after forking but before exec'ing is possible and desirable but not trivial. I'll see what I can do later this week. In any case, this doesn't seem to be an OpenSSH bug. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message