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

Unified Diff: base/file_util_posix.cc

Issue 113287: posix: directories should only be readable by the user. (Closed)
Patch Set: fixed Created 11 years, 7 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 | « base/file_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_posix.cc
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
index 06f3c1aebc26388ea43eb4958f86c9cc75e4599e..ae296cac95b96d4be2f0cea1f2f3e1ef8db84ece 100644
--- a/base/file_util_posix.cc
+++ b/base/file_util_posix.cc
@@ -214,8 +214,7 @@ bool CopyDirectory(const FilePath& from_path,
}
// Try creating the target dir, continuing on it if it exists already.
- // Rely on the user's umask to produce correct permissions.
- if (mkdir(target_path.value().c_str(), 0777) != 0) {
+ if (mkdir(target_path.value().c_str(), 0700) != 0) {
if (errno != EEXIST)
error = errno;
}
@@ -425,7 +424,7 @@ bool CreateDirectory(const FilePath& full_path) {
for (std::vector<FilePath>::reverse_iterator i = subpaths.rbegin();
i != subpaths.rend(); ++i) {
if (!DirectoryExists(*i)) {
- if (mkdir(i->value().c_str(), 0777) != 0)
+ if (mkdir(i->value().c_str(), 0700) != 0)
return false;
}
}
« no previous file with comments | « base/file_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698