From 1e8f68a9c7fa20884de06a37109df558268e57f8 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 18 Nov 2016 14:34:42 +1100 Subject: [PATCH] Add an extra warning message to check_private_dir --- src/common/util.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/util.c b/src/common/util.c index 3421d117b0..417aa89433 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -2270,10 +2270,14 @@ check_private_dir,(const char *dirname, cpd_check_t check, * permissions on the directory will be checked again below.*/ 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; - else + } else { close(fd); + } } else if (!(check & CPD_CHECK)) { log_warn(LD_FS, "Directory %s does not exist.", dirname);