version 1.15, 2017/04/18 18:41:46 |
version 1.16, 2017/10/07 19:39:19 |
|
|
/* $NetBSD$ */ |
/* $NetBSD$ */ |
/* $OpenBSD: auth-options.c,v 1.72 2016/11/30 02:57:40 djm Exp $ */ |
/* $OpenBSD: auth-options.c,v 1.74 2017/09/12 06:32:07 djm Exp $ */ |
|
|
/* |
/* |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
Line 63 char *authorized_principals = NULL; |
|
Line 63 char *authorized_principals = NULL; |
|
|
|
extern ServerOptions options; |
extern ServerOptions options; |
|
|
|
/* XXX refactor to be stateless */ |
|
|
void |
void |
auth_clear_options(void) |
auth_clear_options(void) |
{ |
{ |
|
struct ssh *ssh = active_state; /* XXX */ |
|
|
no_agent_forwarding_flag = 0; |
no_agent_forwarding_flag = 0; |
no_port_forwarding_flag = 0; |
no_port_forwarding_flag = 0; |
no_pty_flag = 0; |
no_pty_flag = 0; |
Line 83 auth_clear_options(void) |
|
Line 87 auth_clear_options(void) |
|
free(authorized_principals); |
free(authorized_principals); |
authorized_principals = NULL; |
authorized_principals = NULL; |
forced_tun_device = -1; |
forced_tun_device = -1; |
channel_clear_permitted_opens(); |
channel_clear_permitted_opens(ssh); |
} |
} |
|
|
/* |
/* |
Line 119 match_flag(const char *opt, int allow_ne |
|
Line 123 match_flag(const char *opt, int allow_ne |
|
/* |
/* |
* return 1 if access is granted, 0 if not. |
* return 1 if access is granted, 0 if not. |
* side effect: sets key option flags |
* side effect: sets key option flags |
|
* XXX remove side effects; fill structure instead. |
*/ |
*/ |
int |
int |
auth_parse_options(struct passwd *pw, const char *opts, const char *file, |
auth_parse_options(struct passwd *pw, const char *opts, const char *file, |
Line 382 auth_parse_options(struct passwd *pw, co |
|
Line 387 auth_parse_options(struct passwd *pw, co |
|
goto bad_option; |
goto bad_option; |
} |
} |
if ((options.allow_tcp_forwarding & FORWARD_LOCAL) != 0) |
if ((options.allow_tcp_forwarding & FORWARD_LOCAL) != 0) |
channel_add_permitted_opens(host, port); |
channel_add_permitted_opens(ssh, host, port); |
free(patterns); |
free(patterns); |
goto next_option; |
goto next_option; |
} |
} |