Add an extra warning message to check_private_dir

This commit is contained in:
teor 2016-11-18 14:34:42 +11:00 committed by Nick Mathewson
parent 5efbd41daa
commit 1e8f68a9c7

View file

@ -2270,10 +2270,14 @@ check_private_dir,(const char *dirname, cpd_check_t check,
* permissions on the directory will be checked again below.*/ * permissions on the directory will be checked again below.*/
fd = open(sandbox_intern_string(dirname), O_NOFOLLOW); fd = open(sandbox_intern_string(dirname), O_NOFOLLOW);
if (fd == -1) if (fd == -1) {
log_warn(LD_FS, "Could not reopen recently created directory %s: %s",
dirname,
strerror(errno));
return -1; return -1;
else } else {
close(fd); close(fd);
}
} else if (!(check & CPD_CHECK)) { } else if (!(check & CPD_CHECK)) {
log_warn(LD_FS, "Directory %s does not exist.", dirname); log_warn(LD_FS, "Directory %s does not exist.", dirname);