blob: e489018802ce6d58ab0e1d660c57c4c8be11dc1a [file] [log] [blame]
drewry@google.combd940e92009-12-07 19:13:27 +00001// Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4// Some portions Copyright (c) 2009 The Chromium Authors.
5//
6// Implements a simple jail that uses CommandLine heavily instead of
7// the Options class. It should act as a simple reference implementation
8// for all functionality.
9
10#ifndef __CHROMEOS_MINIJAIL_MINIJAIL_H
11#define __CHROMEOS_MINIJAIL_MINIJAIL_H
12
13#include <string>
14
15#include <base/basictypes.h>
16#include <base/logging.h>
17#include <base/scoped_ptr.h>
18
19#include "minijail/env.h"
20#include "minijail/options.h"
21#include "minijail/interface.h"
22
23namespace chromeos {
24
25
26class MiniJailOptions : public minijail::Options {
27 public:
28 MiniJailOptions() { }
29 ~MiniJailOptions() { }
30 // We can set some defaults here if desired.
31 private:
32 DISALLOW_COPY_AND_ASSIGN(MiniJailOptions);
33};
34
35class MiniJail : public minijail::Interface {
36 public:
37 MiniJail() { }
38 ~MiniJail() { }
Will Drewry8e7799c2009-12-07 15:50:16 -080039 const char *name() { return "MiniJail"; }
drewry@google.combd940e92009-12-07 19:13:27 +000040 bool Jail() const;
41 private:
42 DISALLOW_COPY_AND_ASSIGN(MiniJail);
43};
44
45} // namespace chromeos
46
47#endif // __CHROMEOS_MINIJAIL_MINIJAIL