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

Unified Diff: platform.cc

Issue 6895001: [cryptohome] make guest-mode homedir mount with -rwx------ (Closed) Base URL: http://git.chromium.org/git/cryptohome.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
« platform.h ('K') | « platform.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform.cc
diff --git a/platform.cc b/platform.cc
index 4229cee4648d7172d539f25c68dad9764ecfbb05..7d0f935fd45c2e95302061a4e61d9f4fdaac2896 100644
--- a/platform.cc
+++ b/platform.cc
@@ -386,6 +386,15 @@ bool Platform::SetOwnershipRecursive(const std::string& directory,
return true;
}
+bool Platform::SetPermissions(const std::string& path, mode_t new_perms) {
+ if (chmod(path.c_str(), new_perms)) {
+ PLOG(ERROR) << "chmod() of " << path.c_str() << " to " << new_perms
+ << " failed.";
+ return false;
+ }
+ return true;
+}
+
int Platform::SetMask(int new_mask) {
return umask(new_mask);
}
« platform.h ('K') | « platform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698