diff options
author | Colin Watson <cjwatson@debian.org> | 2012-09-07 00:20:47 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2012-09-07 00:20:47 +0100 |
commit | eab78da6a54225de06271d9c8da650f04a55ed88 (patch) | |
tree | aa258ca77515939f6d89317ff67fbcb0bca08b24 /sandbox-null.c | |
parent | a26f5de49df59322fde07f7be91b3e3969c9c238 (diff) | |
parent | c6a2c0334e45419875687d250aed9bea78480f2e (diff) |
* New upstream release (http://www.openssh.com/txt/release-6.1).
- Enable pre-auth sandboxing by default for new installs.
- Allow "PermitOpen none" to refuse all port-forwarding requests
(closes: #543683).
Diffstat (limited to 'sandbox-null.c')
-rw-r--r-- | sandbox-null.c | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/sandbox-null.c b/sandbox-null.c index f62ac4b07..29fa9669f 100644 --- a/sandbox-null.c +++ b/sandbox-null.c | |||
@@ -17,6 +17,8 @@ | |||
17 | 17 | ||
18 | #include "includes.h" | 18 | #include "includes.h" |
19 | 19 | ||
20 | #ifdef SANDBOX_NULL | ||
21 | |||
20 | #include <sys/types.h> | 22 | #include <sys/types.h> |
21 | 23 | ||
22 | #include <errno.h> | 24 | #include <errno.h> |
@@ -36,14 +38,8 @@ struct ssh_sandbox { | |||
36 | int junk; | 38 | int junk; |
37 | }; | 39 | }; |
38 | 40 | ||
39 | static int | 41 | struct ssh_sandbox * |
40 | sandbox_null_probe(void) | 42 | ssh_sandbox_init(void) |
41 | { | ||
42 | return 1; | ||
43 | } | ||
44 | |||
45 | static void * | ||
46 | sandbox_null_init(void) | ||
47 | { | 43 | { |
48 | struct ssh_sandbox *box; | 44 | struct ssh_sandbox *box; |
49 | 45 | ||
@@ -55,29 +51,22 @@ sandbox_null_init(void) | |||
55 | return box; | 51 | return box; |
56 | } | 52 | } |
57 | 53 | ||
58 | static void | 54 | void |
59 | sandbox_null_child(void *vbox) | 55 | ssh_sandbox_child(struct ssh_sandbox *box) |
60 | { | 56 | { |
61 | /* Nothing to do here */ | 57 | /* Nothing to do here */ |
62 | } | 58 | } |
63 | 59 | ||
64 | static void | 60 | void |
65 | sandbox_null_parent_finish(void *vbox) | 61 | ssh_sandbox_parent_finish(struct ssh_sandbox *box) |
66 | { | 62 | { |
67 | free(vbox); | 63 | free(box); |
68 | } | 64 | } |
69 | 65 | ||
70 | static void | 66 | void |
71 | sandbox_null_parent_preauth(void *box, pid_t child_pid) | 67 | ssh_sandbox_parent_preauth(struct ssh_sandbox *box, pid_t child_pid) |
72 | { | 68 | { |
73 | /* Nothing to do here */ | 69 | /* Nothing to do here */ |
74 | } | 70 | } |
75 | 71 | ||
76 | Sandbox ssh_sandbox_null = { | 72 | #endif /* SANDBOX_NULL */ |
77 | "null", | ||
78 | sandbox_null_probe, | ||
79 | sandbox_null_init, | ||
80 | sandbox_null_child, | ||
81 | sandbox_null_parent_finish, | ||
82 | sandbox_null_parent_preauth | ||
83 | }; | ||