Ver código fonte

Add an extra warning message to check_private_dir

teor 7 anos atrás
pai
commit
1e8f68a9c7
1 arquivos alterados com 6 adições e 2 exclusões
  1. 6 2
      src/common/util.c

+ 6 - 2
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);