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

Unified Diff: sandbox/linux/services/namespace_utils.h

Issue 881733002: Add namespace sandbox class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Last round of comments. Created 5 years, 11 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 | « sandbox/linux/services/namespace_sandbox_unittest.cc ('k') | sandbox/linux/services/namespace_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/services/namespace_utils.h
diff --git a/sandbox/linux/services/namespace_utils.h b/sandbox/linux/services/namespace_utils.h
index d248d9502f358992dab1a2a455dc89897311294e..6f3a2a86079e48990df0990eac9a1a45c0d7cdfc 100644
--- a/sandbox/linux/services/namespace_utils.h
+++ b/sandbox/linux/services/namespace_utils.h
@@ -7,6 +7,7 @@
#include <sys/types.h>
+#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/template_util.h"
#include "sandbox/sandbox_export.h"
@@ -20,8 +21,10 @@ class SANDBOX_EXPORT NamespaceUtils {
// generic_id_t can be used for either uid_t or gid_t.
typedef uid_t generic_id_t;
- // Write a uid or gid mapping from |id| to |id| in |map_file|.
- static bool WriteToIdMapFile(const char* map_file, generic_id_t id);
+ // Write a uid or gid mapping from |id| to |id| in |map_file|. This function
+ // is async-signal-safe.
+ static bool WriteToIdMapFile(const char* map_file,
+ generic_id_t id) WARN_UNUSED_RESULT;
// Returns true if unprivileged namespaces of type |type| is supported
// (meaning that both CLONE_NEWUSER and type are are supported). |type| must
« no previous file with comments | « sandbox/linux/services/namespace_sandbox_unittest.cc ('k') | sandbox/linux/services/namespace_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698