Lines Matching defs:filename
147 bool is_secure(const StringRef &filename) {
149 int rv = stat(filename.c_str(), &buf);
304 FILE *open_file_for_write(const char *filename) {
308 auto fd = open(filename, O_WRONLY | O_CLOEXEC | O_CREAT | O_TRUNC,
311 auto fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
320 LOG(ERROR) << "Failed to open " << filename << " for writing. Cause: "
327 LOG(ERROR) << "Failed to open " << filename << " for writing. Cause: "
336 // Read passwd from |filename|
338 const StringRef &filename) {
341 if (!is_secure(filename)) {
342 LOG(ERROR) << opt << ": Private key passwd file " << filename
347 std::ifstream in(filename.c_str(), std::ios::binary);
349 LOG(ERROR) << opt << ": Could not open key passwd file " << filename;
4189 int load_config(Config *config, const char *filename,
4192 std::ifstream in(filename, std::ios::binary);
4194 LOG(ERROR) << "Could not open config file " << filename;
4206 LOG(ERROR) << "Bad configuration format in " << filename << " at line "