Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: src/platform/minijail/env.h

Issue 466049: Baseline minijail with a commandline switch driven main. (Closed)
Patch Set: fix overly long lines Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/minijail/SConstruct ('k') | src/platform/minijail/env.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/minijail/env.h
diff --git a/src/platform/minijail/env.h b/src/platform/minijail/env.h
new file mode 100644
index 0000000000000000000000000000000000000000..18cde8ad2069d844163ea782208824473a201491
--- /dev/null
+++ b/src/platform/minijail/env.h
@@ -0,0 +1,53 @@
+// Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Provide a interfacefor supplying system interface functionality at a
+// behavioral level.
+//
+// TODO(wad) Support LinuxSUIDSandox, net namespaces, jail profiles, etc.
+
+#ifndef __CHROMEOS_MINIJAIL_ENV_H
+#define __CHROMEOS_MINIJAIL_ENV_H
+
+#include <base/basictypes.h>
+#include <base/scoped_ptr.h>
+
+namespace chromeos {
+namespace minijail {
+
+class Env {
+ public:
+ Env() { }
+ virtual ~Env() { }
+ virtual bool ChangeUser(uid_t uid, gid_t gid) const;
+ virtual bool DisableDefaultRootPrivileges() const;
+ virtual bool DisableTracing() const;
+ virtual bool EnterNamespace(int namespaces) const;
+ virtual bool FilterSyscallsBenchmarkOnly() const;
+ virtual bool FilterSyscallsBySource() const;
+ // virtual bool ExportXAuthority(int appgroup, bool trusted) const;
+ virtual bool KeepRootCapabilities() const;
+ // bool do_delayed_chroot;
+ // bool enter_net_namespace();
+ // TODO(wad) add flags: ro_proc, custom /dev, ...
+ virtual bool Mount() const;
+ virtual bool SanitizeBoundingSet(uint64 capmask) const;
+ // /dev/input/*
+ // /dev/video*
+ // /dev/*audio*
+ // bool ShimUserDevices();
+ //bool add_to_cgroup(const char *cgroup_name);
+ virtual bool SanitizeCapabilities(uint64 eff_capmask) const;
+
+ virtual bool Run(const char *path,
+ char * const *argv,
+ char * const *envp) const;
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Env);
+};
+
+} // namespace minijail
+} // namespace chromeos
+
+#endif // __CHROMEOS_MINIJAIL_ENV_H
« no previous file with comments | « src/platform/minijail/SConstruct ('k') | src/platform/minijail/env.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698