upstream commit

allow setting IdentityAgent to SSH_AUTH_SOCK; ok djm@

Upstream-ID: 20c508480d8db3eef18942c0fc39b1fcf25652ac
This commit is contained in:
markus@openbsd.org 2016-05-04 14:29:58 +00:00 committed by Damien Miller
parent 0516454151
commit 1a75d14daf
4 changed files with 14 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: readconf.c,v 1.253 2016/05/04 12:21:53 markus Exp $ */ /* $OpenBSD: readconf.c,v 1.254 2016/05/04 14:29:58 markus Exp $ */
/* /*
* Author: Tatu Ylonen <ylo@cs.hut.fi> * Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@ -2034,6 +2034,7 @@ fill_default_options(Options * options)
CLEAR_ON_NONE(options->proxy_command); CLEAR_ON_NONE(options->proxy_command);
CLEAR_ON_NONE(options->control_path); CLEAR_ON_NONE(options->control_path);
CLEAR_ON_NONE(options->revoked_host_keys); CLEAR_ON_NONE(options->revoked_host_keys);
/* options->identity_agent distinguishes NULL from 'none' */
/* options->user will be set in the main program if appropriate */ /* options->user will be set in the main program if appropriate */
/* options->hostname will be set in the main program if appropriate */ /* options->hostname will be set in the main program if appropriate */
/* options->host_key_alias should not be set by default */ /* options->host_key_alias should not be set by default */

5
ssh.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: ssh.c,v 1.439 2016/05/04 12:21:53 markus Exp $ */ /* $OpenBSD: ssh.c,v 1.440 2016/05/04 14:29:58 markus Exp $ */
/* /*
* Author: Tatu Ylonen <ylo@cs.hut.fi> * Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@ -1336,7 +1336,8 @@ main(int ac, char **av)
load_public_identity_files(); load_public_identity_files();
/* optionally set the SSH_AUTHSOCKET_ENV_NAME varibale */ /* optionally set the SSH_AUTHSOCKET_ENV_NAME varibale */
if (options.identity_agent) { if (options.identity_agent &&
strcmp(options.identity_agent, SSH_AUTHSOCKET_ENV_NAME) != 0) {
if (strcmp(options.identity_agent, "none") == 0) { if (strcmp(options.identity_agent, "none") == 0) {
unsetenv(SSH_AUTHSOCKET_ENV_NAME); unsetenv(SSH_AUTHSOCKET_ENV_NAME);
} else { } else {

View File

@ -33,7 +33,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\" .\"
.\" $OpenBSD: ssh_config.5,v 1.231 2016/05/04 12:21:53 markus Exp $ .\" $OpenBSD: ssh_config.5,v 1.232 2016/05/04 14:29:58 markus Exp $
.Dd $Mdocdate: May 4 2016 $ .Dd $Mdocdate: May 4 2016 $
.Dt SSH_CONFIG 5 .Dt SSH_CONFIG 5
.Os .Os
@ -963,6 +963,11 @@ environment variable and can be used to select a specific agent.
Setting the socket name to Setting the socket name to
.Dq none .Dq none
disables the use of an authentication agent. disables the use of an authentication agent.
If the string
.Dq SSH_AUTH_SOCK
is specified, the location of the socket will be read from the
.Ev SSH_AUTH_SOCK
environment variable.
.Pp .Pp
The socket name may use the tilde The socket name may use the tilde
syntax to refer to a user's home directory or one of the following syntax to refer to a user's home directory or one of the following

View File

@ -33,8 +33,8 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\" .\"
.\" $OpenBSD: sshd_config.5,v 1.222 2016/04/27 13:53:48 jmc Exp $ .\" $OpenBSD: sshd_config.5,v 1.223 2016/05/04 14:29:58 markus Exp $
.Dd $Mdocdate: April 27 2016 $ .Dd $Mdocdate: May 4 2016 $
.Dt SSHD_CONFIG 5 .Dt SSHD_CONFIG 5
.Os .Os
.Sh NAME .Sh NAME
@ -738,7 +738,7 @@ to an
.It Cm HostKeyAgent .It Cm HostKeyAgent
Identifies the UNIX-domain socket used to communicate Identifies the UNIX-domain socket used to communicate
with an agent that has access to the private host keys. with an agent that has access to the private host keys.
If If the string
.Dq SSH_AUTH_SOCK .Dq SSH_AUTH_SOCK
is specified, the location of the socket will be read from the is specified, the location of the socket will be read from the
.Ev SSH_AUTH_SOCK .Ev SSH_AUTH_SOCK