diff options
Diffstat (limited to 'auth-options.c')
-rw-r--r-- | auth-options.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/auth-options.c b/auth-options.c index ad97e6129..ca5e1c931 100644 --- a/auth-options.c +++ b/auth-options.c | |||
@@ -1,3 +1,4 @@ | |||
1 | /* $OpenBSD: auth-options.c,v 1.40 2006/08/03 03:34:41 deraadt Exp $ */ | ||
1 | /* | 2 | /* |
2 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -10,18 +11,31 @@ | |||
10 | */ | 11 | */ |
11 | 12 | ||
12 | #include "includes.h" | 13 | #include "includes.h" |
13 | RCSID("$OpenBSD: auth-options.c,v 1.33 2005/12/08 18:34:11 reyk Exp $"); | 14 | |
15 | #include <sys/types.h> | ||
16 | |||
17 | #include <netdb.h> | ||
18 | #include <pwd.h> | ||
19 | #include <string.h> | ||
20 | #include <stdio.h> | ||
21 | #include <stdarg.h> | ||
14 | 22 | ||
15 | #include "xmalloc.h" | 23 | #include "xmalloc.h" |
16 | #include "match.h" | 24 | #include "match.h" |
17 | #include "log.h" | 25 | #include "log.h" |
18 | #include "canohost.h" | 26 | #include "canohost.h" |
27 | #include "buffer.h" | ||
19 | #include "channels.h" | 28 | #include "channels.h" |
20 | #include "auth-options.h" | 29 | #include "auth-options.h" |
21 | #include "servconf.h" | 30 | #include "servconf.h" |
22 | #include "misc.h" | 31 | #include "misc.h" |
23 | #include "monitor_wrap.h" | 32 | #include "key.h" |
33 | #include "hostfile.h" | ||
24 | #include "auth.h" | 34 | #include "auth.h" |
35 | #ifdef GSSAPI | ||
36 | #include "ssh-gss.h" | ||
37 | #endif | ||
38 | #include "monitor_wrap.h" | ||
25 | 39 | ||
26 | /* Flags set authorized_keys flags */ | 40 | /* Flags set authorized_keys flags */ |
27 | int no_port_forwarding_flag = 0; | 41 | int no_port_forwarding_flag = 0; |
@@ -131,7 +145,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum) | |||
131 | forced_command = NULL; | 145 | forced_command = NULL; |
132 | goto bad_option; | 146 | goto bad_option; |
133 | } | 147 | } |
134 | forced_command[i] = 0; | 148 | forced_command[i] = '\0'; |
135 | auth_debug_add("Forced command: %.900s", forced_command); | 149 | auth_debug_add("Forced command: %.900s", forced_command); |
136 | opts++; | 150 | opts++; |
137 | goto next_option; | 151 | goto next_option; |
@@ -163,7 +177,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum) | |||
163 | xfree(s); | 177 | xfree(s); |
164 | goto bad_option; | 178 | goto bad_option; |
165 | } | 179 | } |
166 | s[i] = 0; | 180 | s[i] = '\0'; |
167 | auth_debug_add("Adding to environment: %.900s", s); | 181 | auth_debug_add("Adding to environment: %.900s", s); |
168 | debug("Adding to environment: %.900s", s); | 182 | debug("Adding to environment: %.900s", s); |
169 | opts++; | 183 | opts++; |
@@ -200,7 +214,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum) | |||
200 | xfree(patterns); | 214 | xfree(patterns); |
201 | goto bad_option; | 215 | goto bad_option; |
202 | } | 216 | } |
203 | patterns[i] = 0; | 217 | patterns[i] = '\0'; |
204 | opts++; | 218 | opts++; |
205 | if (match_host_and_ip(remote_host, remote_ip, | 219 | if (match_host_and_ip(remote_host, remote_ip, |
206 | patterns) != 1) { | 220 | patterns) != 1) { |
@@ -245,7 +259,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum) | |||
245 | xfree(patterns); | 259 | xfree(patterns); |
246 | goto bad_option; | 260 | goto bad_option; |
247 | } | 261 | } |
248 | patterns[i] = 0; | 262 | patterns[i] = '\0'; |
249 | opts++; | 263 | opts++; |
250 | p = patterns; | 264 | p = patterns; |
251 | host = hpdelim(&p); | 265 | host = hpdelim(&p); |
@@ -293,7 +307,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum) | |||
293 | forced_tun_device = -1; | 307 | forced_tun_device = -1; |
294 | goto bad_option; | 308 | goto bad_option; |
295 | } | 309 | } |
296 | tun[i] = 0; | 310 | tun[i] = '\0'; |
297 | forced_tun_device = a2tun(tun, NULL); | 311 | forced_tun_device = a2tun(tun, NULL); |
298 | xfree(tun); | 312 | xfree(tun); |
299 | if (forced_tun_device == SSH_TUNID_ERR) { | 313 | if (forced_tun_device == SSH_TUNID_ERR) { |