diff options
author | markus@openbsd.org <markus@openbsd.org> | 2016-05-04 14:29:58 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2016-05-19 17:48:35 +1000 |
commit | 1a75d14daf4b60db903e6103cf50e74e0cd0a76b (patch) | |
tree | c6b0bc7d927ee6d75290401ca7302400d4290f12 | |
parent | 0516454151ae722fc8256c3c56115c6baf24c5b0 (diff) |
upstream commit
allow setting IdentityAgent to SSH_AUTH_SOCK; ok djm@
Upstream-ID: 20c508480d8db3eef18942c0fc39b1fcf25652ac
-rw-r--r-- | readconf.c | 3 | ||||
-rw-r--r-- | ssh.c | 5 | ||||
-rw-r--r-- | ssh_config.5 | 7 | ||||
-rw-r--r-- | sshd_config.5 | 6 |
4 files changed, 14 insertions, 7 deletions
diff --git a/readconf.c b/readconf.c index 26436b3ac..c706fbf46 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: readconf.c,v 1.253 2016/05/04 12:21:53 markus Exp $ */ | 1 | /* $OpenBSD: readconf.c,v 1.254 2016/05/04 14:29:58 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -2034,6 +2034,7 @@ fill_default_options(Options * options) | |||
2034 | CLEAR_ON_NONE(options->proxy_command); | 2034 | CLEAR_ON_NONE(options->proxy_command); |
2035 | CLEAR_ON_NONE(options->control_path); | 2035 | CLEAR_ON_NONE(options->control_path); |
2036 | CLEAR_ON_NONE(options->revoked_host_keys); | 2036 | CLEAR_ON_NONE(options->revoked_host_keys); |
2037 | /* options->identity_agent distinguishes NULL from 'none' */ | ||
2037 | /* options->user will be set in the main program if appropriate */ | 2038 | /* options->user will be set in the main program if appropriate */ |
2038 | /* options->hostname will be set in the main program if appropriate */ | 2039 | /* options->hostname will be set in the main program if appropriate */ |
2039 | /* options->host_key_alias should not be set by default */ | 2040 | /* options->host_key_alias should not be set by default */ |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh.c,v 1.439 2016/05/04 12:21:53 markus Exp $ */ | 1 | /* $OpenBSD: ssh.c,v 1.440 2016/05/04 14:29:58 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1336,7 +1336,8 @@ main(int ac, char **av) | |||
1336 | load_public_identity_files(); | 1336 | load_public_identity_files(); |
1337 | 1337 | ||
1338 | /* optionally set the SSH_AUTHSOCKET_ENV_NAME varibale */ | 1338 | /* optionally set the SSH_AUTHSOCKET_ENV_NAME varibale */ |
1339 | if (options.identity_agent) { | 1339 | if (options.identity_agent && |
1340 | strcmp(options.identity_agent, SSH_AUTHSOCKET_ENV_NAME) != 0) { | ||
1340 | if (strcmp(options.identity_agent, "none") == 0) { | 1341 | if (strcmp(options.identity_agent, "none") == 0) { |
1341 | unsetenv(SSH_AUTHSOCKET_ENV_NAME); | 1342 | unsetenv(SSH_AUTHSOCKET_ENV_NAME); |
1342 | } else { | 1343 | } else { |
diff --git a/ssh_config.5 b/ssh_config.5 index be790114a..45fe89202 100644 --- a/ssh_config.5 +++ b/ssh_config.5 | |||
@@ -33,7 +33,7 @@ | |||
33 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 33 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
34 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 34 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
35 | .\" | 35 | .\" |
36 | .\" $OpenBSD: ssh_config.5,v 1.231 2016/05/04 12:21:53 markus Exp $ | 36 | .\" $OpenBSD: ssh_config.5,v 1.232 2016/05/04 14:29:58 markus Exp $ |
37 | .Dd $Mdocdate: May 4 2016 $ | 37 | .Dd $Mdocdate: May 4 2016 $ |
38 | .Dt SSH_CONFIG 5 | 38 | .Dt SSH_CONFIG 5 |
39 | .Os | 39 | .Os |
@@ -963,6 +963,11 @@ environment variable and can be used to select a specific agent. | |||
963 | Setting the socket name to | 963 | Setting the socket name to |
964 | .Dq none | 964 | .Dq none |
965 | disables the use of an authentication agent. | 965 | disables the use of an authentication agent. |
966 | If the string | ||
967 | .Dq SSH_AUTH_SOCK | ||
968 | is specified, the location of the socket will be read from the | ||
969 | .Ev SSH_AUTH_SOCK | ||
970 | environment variable. | ||
966 | .Pp | 971 | .Pp |
967 | The socket name may use the tilde | 972 | The socket name may use the tilde |
968 | syntax to refer to a user's home directory or one of the following | 973 | syntax to refer to a user's home directory or one of the following |
diff --git a/sshd_config.5 b/sshd_config.5 index 63807c030..479fa38eb 100644 --- a/sshd_config.5 +++ b/sshd_config.5 | |||
@@ -33,8 +33,8 @@ | |||
33 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 33 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
34 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 34 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
35 | .\" | 35 | .\" |
36 | .\" $OpenBSD: sshd_config.5,v 1.222 2016/04/27 13:53:48 jmc Exp $ | 36 | .\" $OpenBSD: sshd_config.5,v 1.223 2016/05/04 14:29:58 markus Exp $ |
37 | .Dd $Mdocdate: April 27 2016 $ | 37 | .Dd $Mdocdate: May 4 2016 $ |
38 | .Dt SSHD_CONFIG 5 | 38 | .Dt SSHD_CONFIG 5 |
39 | .Os | 39 | .Os |
40 | .Sh NAME | 40 | .Sh NAME |
@@ -738,7 +738,7 @@ to an | |||
738 | .It Cm HostKeyAgent | 738 | .It Cm HostKeyAgent |
739 | Identifies the UNIX-domain socket used to communicate | 739 | Identifies the UNIX-domain socket used to communicate |
740 | with an agent that has access to the private host keys. | 740 | with an agent that has access to the private host keys. |
741 | If | 741 | If the string |
742 | .Dq SSH_AUTH_SOCK | 742 | .Dq SSH_AUTH_SOCK |
743 | is specified, the location of the socket will be read from the | 743 | is specified, the location of the socket will be read from the |
744 | .Ev SSH_AUTH_SOCK | 744 | .Ev SSH_AUTH_SOCK |