summaryrefslogtreecommitdiff
path: root/sandbox-null.c
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox-null.c')
-rw-r--r--sandbox-null.c35
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
39static int 41struct ssh_sandbox *
40sandbox_null_probe(void) 42ssh_sandbox_init(void)
41{
42 return 1;
43}
44
45static void *
46sandbox_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
58static void 54void
59sandbox_null_child(void *vbox) 55ssh_sandbox_child(struct ssh_sandbox *box)
60{ 56{
61 /* Nothing to do here */ 57 /* Nothing to do here */
62} 58}
63 59
64static void 60void
65sandbox_null_parent_finish(void *vbox) 61ssh_sandbox_parent_finish(struct ssh_sandbox *box)
66{ 62{
67 free(vbox); 63 free(box);
68} 64}
69 65
70static void 66void
71sandbox_null_parent_preauth(void *box, pid_t child_pid) 67ssh_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
76Sandbox 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};