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

Unified Diff: base/file_util.h

Issue 8318011: Update write checks for external extension file on mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rev comments. Created 9 years, 2 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 | « no previous file | base/file_util_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util.h
diff --git a/base/file_util.h b/base/file_util.h
index a0d517df95e3906e1fb967817928e687229804ac..b0c2459cf171be66adb24c00c94120a533fe209b 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -20,6 +20,7 @@
#include <stdio.h>
+#include <set>
#include <stack>
#include <string>
#include <vector>
@@ -378,18 +379,21 @@ BASE_EXPORT bool GetCurrentDirectory(FilePath* path);
BASE_EXPORT bool SetCurrentDirectory(const FilePath& path);
#if defined(OS_POSIX)
-// Test that |path| can only be changed by a specific user and group.
+// Test that |path| can only be changed by a given user and members of
+// a given set of groups.
// Specifically, test that all parts of |path| under (and including) |base|:
// * Exist.
-// * Are owned by a specific user and group.
+// * Are owned by a specific user.
// * Are not writable by all users.
+// * Are owned by a memeber of a given set of groups, or are not writable by
+// their group.
// * Are not symbolic links.
// This is useful for checking that a config file is administrator-controlled.
// |base| must contain |path|.
BASE_EXPORT bool VerifyPathControlledByUser(const FilePath& base,
const FilePath& path,
uid_t owner_uid,
- gid_t group_gid);
+ const std::set<gid_t>& group_gids);
#endif // defined(OS_POSIX)
#if defined(OS_MACOSX)
« no previous file with comments | « no previous file | base/file_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698