diff options
author | Colin Watson <cjwatson@debian.org> | 2014-02-10 00:18:28 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2014-02-10 00:18:28 +0000 |
commit | 9a975a9faed7c4f334e8c8490db3e77e102f2b21 (patch) | |
tree | 764a885ec9a963f6a8b15de6e1765f16b9ac4738 /auth-options.c | |
parent | ee196dab7c5f97f0b80c8099343a375bead92010 (diff) | |
parent | cdb6c90811caa5df2df856be9b0b16db020fe31d (diff) |
Import openssh_6.5p1.orig.tar.gz
Diffstat (limited to 'auth-options.c')
-rw-r--r-- | auth-options.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/auth-options.c b/auth-options.c index 12e2e1dca..fa209eaab 100644 --- a/auth-options.c +++ b/auth-options.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth-options.c,v 1.61 2013/11/08 00:39:14 djm Exp $ */ | 1 | /* $OpenBSD: auth-options.c,v 1.62 2013/12/19 00:27:57 djm 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 |
@@ -33,10 +33,6 @@ | |||
33 | #include "auth-options.h" | 33 | #include "auth-options.h" |
34 | #include "hostfile.h" | 34 | #include "hostfile.h" |
35 | #include "auth.h" | 35 | #include "auth.h" |
36 | #ifdef GSSAPI | ||
37 | #include "ssh-gss.h" | ||
38 | #endif | ||
39 | #include "monitor_wrap.h" | ||
40 | 36 | ||
41 | /* Flags set authorized_keys flags */ | 37 | /* Flags set authorized_keys flags */ |
42 | int no_port_forwarding_flag = 0; | 38 | int no_port_forwarding_flag = 0; |
@@ -436,7 +432,7 @@ parse_option_list(u_char *optblob, size_t optblob_len, struct passwd *pw, | |||
436 | u_char *data_blob = NULL; | 432 | u_char *data_blob = NULL; |
437 | u_int nlen, dlen, clen; | 433 | u_int nlen, dlen, clen; |
438 | Buffer c, data; | 434 | Buffer c, data; |
439 | int ret = -1, found; | 435 | int ret = -1, result, found; |
440 | 436 | ||
441 | buffer_init(&data); | 437 | buffer_init(&data); |
442 | 438 | ||
@@ -505,11 +501,12 @@ parse_option_list(u_char *optblob, size_t optblob_len, struct passwd *pw, | |||
505 | goto out; | 501 | goto out; |
506 | } | 502 | } |
507 | remote_ip = get_remote_ipaddr(); | 503 | remote_ip = get_remote_ipaddr(); |
508 | switch (addr_match_cidr_list(remote_ip, | 504 | result = addr_match_cidr_list(remote_ip, |
509 | allowed)) { | 505 | allowed); |
506 | free(allowed); | ||
507 | switch (result) { | ||
510 | case 1: | 508 | case 1: |
511 | /* accepted */ | 509 | /* accepted */ |
512 | free(allowed); | ||
513 | break; | 510 | break; |
514 | case 0: | 511 | case 0: |
515 | /* no match */ | 512 | /* no match */ |
@@ -522,12 +519,11 @@ parse_option_list(u_char *optblob, size_t optblob_len, struct passwd *pw, | |||
522 | "is not permitted to use this " | 519 | "is not permitted to use this " |
523 | "certificate for login.", | 520 | "certificate for login.", |
524 | remote_ip); | 521 | remote_ip); |
525 | free(allowed); | ||
526 | goto out; | 522 | goto out; |
527 | case -1: | 523 | case -1: |
524 | default: | ||
528 | error("Certificate source-address " | 525 | error("Certificate source-address " |
529 | "contents invalid"); | 526 | "contents invalid"); |
530 | free(allowed); | ||
531 | goto out; | 527 | goto out; |
532 | } | 528 | } |
533 | found = 1; | 529 | found = 1; |