diff options
author | Colin Watson <cjwatson@debian.org> | 2010-08-23 23:52:36 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2010-08-23 23:52:36 +0100 |
commit | 78799892cb1858927be02be9737c594052e3f910 (patch) | |
tree | ac3dc2e848ab9dc62fe4252e01e52c3d456f628f /misc.c | |
parent | 3875951bb76a9ec62634ae4026c9cc885d933477 (diff) | |
parent | 31e30b835fd9695d3b6647cab4867001b092e28f (diff) |
* New upstream release (http://www.openssh.com/txt/release-5.6):
- Added a ControlPersist option to ssh_config(5) that automatically
starts a background ssh(1) multiplex master when connecting. This
connection can stay alive indefinitely, or can be set to automatically
close after a user-specified duration of inactivity (closes: #335697,
#350898, #454787, #500573, #550262).
- Support AuthorizedKeysFile, AuthorizedPrincipalsFile,
HostbasedUsesNameFromPacketOnly, and PermitTunnel in sshd_config(5)
Match blocks (closes: #549858).
- sftp(1): fix ls in working directories that contain globbing
characters in their pathnames (LP: #530714).
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: misc.c,v 1.75 2010/01/09 23:04:13 dtucker Exp $ */ | 1 | /* $OpenBSD: misc.c,v 1.80 2010/07/21 02:10:58 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * Copyright (c) 2005,2006 Damien Miller. All rights reserved. | 4 | * Copyright (c) 2005,2006 Damien Miller. All rights reserved. |
@@ -179,6 +179,7 @@ strdelim(char **s) | |||
179 | return (NULL); /* no matching quote */ | 179 | return (NULL); /* no matching quote */ |
180 | } else { | 180 | } else { |
181 | *s[0] = '\0'; | 181 | *s[0] = '\0'; |
182 | *s += strspn(*s + 1, WHITESPACE) + 1; | ||
182 | return (old); | 183 | return (old); |
183 | } | 184 | } |
184 | } | 185 | } |
@@ -426,7 +427,7 @@ colon(char *cp) | |||
426 | int flag = 0; | 427 | int flag = 0; |
427 | 428 | ||
428 | if (*cp == ':') /* Leading colon is part of file name. */ | 429 | if (*cp == ':') /* Leading colon is part of file name. */ |
429 | return (0); | 430 | return NULL; |
430 | if (*cp == '[') | 431 | if (*cp == '[') |
431 | flag = 1; | 432 | flag = 1; |
432 | 433 | ||
@@ -438,9 +439,9 @@ colon(char *cp) | |||
438 | if (*cp == ':' && !flag) | 439 | if (*cp == ':' && !flag) |
439 | return (cp); | 440 | return (cp); |
440 | if (*cp == '/') | 441 | if (*cp == '/') |
441 | return (0); | 442 | return NULL; |
442 | } | 443 | } |
443 | return (0); | 444 | return NULL; |
444 | } | 445 | } |
445 | 446 | ||
446 | /* function to assist building execv() arguments */ | 447 | /* function to assist building execv() arguments */ |
@@ -899,6 +900,16 @@ ms_to_timeval(struct timeval *tv, int ms) | |||
899 | tv->tv_usec = (ms % 1000) * 1000; | 900 | tv->tv_usec = (ms % 1000) * 1000; |
900 | } | 901 | } |
901 | 902 | ||
903 | int | ||
904 | timingsafe_bcmp(const void *b1, const void *b2, size_t n) | ||
905 | { | ||
906 | const unsigned char *p1 = b1, *p2 = b2; | ||
907 | int ret = 0; | ||
908 | |||
909 | for (; n > 0; n--) | ||
910 | ret |= *p1++ ^ *p2++; | ||
911 | return (ret != 0); | ||
912 | } | ||
902 | void | 913 | void |
903 | sock_set_v6only(int s) | 914 | sock_set_v6only(int s) |
904 | { | 915 | { |