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

Unified Diff: options.h

Issue 6881066: [minijail] Add the ability to set capabilities from the command line (Closed) Base URL: http://git.chromium.org/git/minijail.git@master
Patch Set: Created 9 years, 8 months 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 | « mock_options.h ('k') | options_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: options.h
diff --git a/options.h b/options.h
index 68e36e992b9301cf7cde72db827b664dc5ec6f0c..3d75593feebc687f348ae61b03dec282badcc982 100644
--- a/options.h
+++ b/options.h
@@ -24,6 +24,7 @@ class Options {
arguments_(NULL),
environment_(NULL),
add_readonly_mounts_(false),
+ caps_bitmask_(0),
change_gid_(false),
change_uid_(false),
disable_tracing_(false),
@@ -110,6 +111,9 @@ class Options {
// removed from the effective, inherited, permitted and bounding sets.
virtual void set_use_capabilities(bool val) { use_capabilities_ = val; }
virtual bool use_capabilities() const { return use_capabilities_; }
+ // The set of caps to use when use_capabilities is set.
+ virtual void set_caps_bitmask(uint64 val) { caps_bitmask_ = val; }
+ virtual uint64 caps_bitmask() const { return caps_bitmask_; }
#if 0
TODO(wad): additional functionality:
@@ -121,9 +125,6 @@ class Options {
virtual const std::vector<std::string> *supplemental_groups() const
{ return supplemental_groups_; }
- virtual void set_bounding_set(uint64 val) { bounding_set_ = val; }
- virtual uint64 bounding_set() const { return bounding_set_; }
-
virtual void set_use_delayed_chroot(bool val) { use_delayed_chroot_ = val; }
virtual bool use_delayed_chroot() const { return use_delayed_chroot_; }
@@ -163,6 +164,7 @@ class Options {
char * const *environment_;
bool add_readonly_mounts_;
+ uint64 caps_bitmask_;
bool change_gid_;
bool change_uid_;
bool disable_tracing_;
« no previous file with comments | « mock_options.h ('k') | options_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698