Commit 5bb381fb authored by Roman Sorokin's avatar Roman Sorokin Committed by Commit Bot

AuthPolicyCredentialsManager: Create kerberos dir

Create directory for credentials cache and krb5.conf
Fixing regression was introduced in CL:974108.

BUG=815158
TEST=manual

Change-Id: I9ec9ce411de25df504e165c1b1a025e5878c3ae7
Reviewed-on: https://chromium-review.googlesource.com/1013921Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Roman Sorokin <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550999}
parent 5adb5772
......@@ -59,6 +59,12 @@ void WriteFile(const std::string& file_name, const std::string& blob) {
base::FilePath dir;
PathService::Get(base::DIR_HOME, &dir);
dir = dir.Append(kKrb5Directory);
base::File::Error error;
if (!base::CreateDirectoryAndGetError(dir, &error)) {
LOG(ERROR) << "Failed to create '" << dir.value()
<< "' directory: " << base::File::ErrorToString(error);
return;
}
base::FilePath dest_file = dir.Append(file_name);
if (!base::ImportantFileWriter::WriteFileAtomically(dest_file, blob)) {
LOG(ERROR) << "Failed to write file " << dest_file.value();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment