]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add an extra warning message to check_private_dir
authorteor <teor2345@gmail.com>
Fri, 18 Nov 2016 03:34:42 +0000 (14:34 +1100)
committerNick Mathewson <nickm@torproject.org>
Thu, 1 Dec 2016 14:51:19 +0000 (09:51 -0500)
src/common/util.c

index 3421d117b015e11b30760aef480a4f2ce05951bf..417aa89433f5a7093438f53fe6002bdcc6539ec2 100644 (file)
@@ -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);