diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-09-03 08:29:58 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-09-03 18:39:31 +1000 |
commit | c72d78ccbe642e08591a626e5de18381489716e0 (patch) | |
tree | 3c79965dde29c4b04cf0d871d068b54b2c2a084d | |
parent | 06af3583f46e2c327fdd44d8a95b8b4e8dfd8db5 (diff) |
upstream: move skip_space() to misc.c and make it public; ok
markus@
OpenBSD-Commit-ID: caa77e8a3b210948e29ad3e28c5db00852961eae
-rw-r--r-- | auth2-pubkey.c | 12 | ||||
-rw-r--r-- | misc.c | 12 | ||||
-rw-r--r-- | misc.h | 3 |
3 files changed, 14 insertions, 13 deletions
diff --git a/auth2-pubkey.c b/auth2-pubkey.c index 32ce19250..65db116ed 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth2-pubkey.c,v 1.91 2019/07/16 13:18:39 djm Exp $ */ | 1 | /* $OpenBSD: auth2-pubkey.c,v 1.92 2019/09/03 08:29:58 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -538,16 +538,6 @@ match_principals_command(struct ssh *ssh, struct passwd *user_pw, | |||
538 | return found_principal; | 538 | return found_principal; |
539 | } | 539 | } |
540 | 540 | ||
541 | static void | ||
542 | skip_space(char **cpp) | ||
543 | { | ||
544 | char *cp; | ||
545 | |||
546 | for (cp = *cpp; *cp == ' ' || *cp == '\t'; cp++) | ||
547 | ; | ||
548 | *cpp = cp; | ||
549 | } | ||
550 | |||
551 | /* | 541 | /* |
552 | * Advanced *cpp past the end of key options, defined as the first unquoted | 542 | * Advanced *cpp past the end of key options, defined as the first unquoted |
553 | * whitespace character. Returns 0 on success or -1 on failure (e.g. | 543 | * whitespace character. Returns 0 on success or -1 on failure (e.g. |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: misc.c,v 1.140 2019/08/16 06:13:15 djm Exp $ */ | 1 | /* $OpenBSD: misc.c,v 1.141 2019/09/03 08:29: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. |
@@ -2127,3 +2127,13 @@ path_absolute(const char *path) | |||
2127 | { | 2127 | { |
2128 | return (*path == '/') ? 1 : 0; | 2128 | return (*path == '/') ? 1 : 0; |
2129 | } | 2129 | } |
2130 | |||
2131 | void | ||
2132 | skip_space(char **cpp) | ||
2133 | { | ||
2134 | char *cp; | ||
2135 | |||
2136 | for (cp = *cpp; *cp == ' ' || *cp == '\t'; cp++) | ||
2137 | ; | ||
2138 | *cpp = cp; | ||
2139 | } | ||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: misc.h,v 1.79 2019/01/23 21:50:56 dtucker Exp $ */ | 1 | /* $OpenBSD: misc.h,v 1.80 2019/09/03 08:29:58 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -44,6 +44,7 @@ struct ForwardOptions { | |||
44 | /* misc.c */ | 44 | /* misc.c */ |
45 | 45 | ||
46 | char *chop(char *); | 46 | char *chop(char *); |
47 | void skip_space(char **); | ||
47 | char *strdelim(char **); | 48 | char *strdelim(char **); |
48 | char *strdelimw(char **); | 49 | char *strdelimw(char **); |
49 | int set_nonblock(int); | 50 | int set_nonblock(int); |