summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--sandbox-null.c71
2 files changed, 73 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 577f5ecd2..9a6724225 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,8 @@
27 [channels.c channels.h clientloop.c clientloop.h mux.c ssh.c] 27 [channels.c channels.h clientloop.c clientloop.h mux.c ssh.c]
28 hook up a channel confirm callback to warn the user then requested X11 28 hook up a channel confirm callback to warn the user then requested X11
29 forwarding was refused by the server; ok markus@ 29 forwarding was refused by the server; ok markus@
30 - (djm) [sandbox-null.c] Dummy sandbox for platforms that don't support
31 setrlimit(2)
30 32
3120110620 3320110620
32 - OpenBSD CVS Sync 34 - OpenBSD CVS Sync
diff --git a/sandbox-null.c b/sandbox-null.c
new file mode 100644
index 000000000..eadaee2da
--- /dev/null
+++ b/sandbox-null.c
@@ -0,0 +1,71 @@
1/*
2 * Copyright (c) 2011 Damien Miller <djm@mindrot.org>
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17#include "includes.h"
18
19#ifdef SANDBOX_NULL
20
21#include <sys/types.h>
22
23#include <errno.h>
24#include <stdarg.h>
25#include <stdio.h>
26#include <stdlib.h>
27#include <string.h>
28#include <unistd.h>
29
30#include "log.h"
31#include "sandbox.h"
32#include "xmalloc.h"
33
34/* dummy sandbox */
35
36struct ssh_sandbox {
37 int junk;
38};
39
40struct ssh_sandbox *
41ssh_sandbox_init(void)
42{
43 struct ssh_sandbox *box;
44
45 /*
46 * Strictly, we don't need to maintain any state here but we need
47 * to return non-NULL to satisfy the API.
48 */
49 box = xcalloc(1, sizeof(*box));
50 return box;
51}
52
53void
54ssh_sandbox_child(struct ssh_sandbox *box)
55{
56 /* Nothing to do here */
57}
58
59void
60ssh_sandbox_parent_finish(struct ssh_sandbox *box)
61{
62 free(box);
63}
64
65void
66ssh_sandbox_parent_preauth(struct ssh_sandbox *box, pid_t child_pid)
67{
68 /* Nothing to do here */
69}
70
71#endif /* SANDBOX_NULL */