summaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-11-07 16:12:13 -0500
committerNick Mathewson <nickm@torproject.org>2016-11-07 16:12:13 -0500
commitc2fc0941a53884c63c477f68c74a26627bb35db8 (patch)
tree58b30f597f9e7e10a0cfe7806e9c028fc19d9560 /src/common/util.c
parente482541cfb0bd85cab8a7fed86e31e0b18912730 (diff)
parenta77187a52c9594c0c168596eec856ee11c447fe0 (diff)
downloadtor-c2fc0941a53884c63c477f68c74a26627bb35db8.tar.gz
tor-c2fc0941a53884c63c477f68c74a26627bb35db8.zip
Merge remote-tracking branch 'teor/bug20484_029_v2' into maint-0.2.9
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 9162967907..a7bce2ea6c 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -2191,11 +2191,13 @@ file_status(const char *fname)
}
}
-/** Check whether <b>dirname</b> exists and is private. If yes return 0. If
- * it does not exist, and <b>check</b>&CPD_CREATE is set, try to create it
- * and return 0 on success. If it does not exist, and
- * <b>check</b>&CPD_CHECK, and we think we can create it, return 0. Else
- * return -1. If CPD_GROUP_OK is set, then it's okay if the directory
+/** Check whether <b>dirname</b> exists and is private. If yes return 0.
+ * If <b>dirname</b> does not exist:
+ * - if <b>check</b>&CPD_CREATE, try to create it and return 0 on success.
+ * - if <b>check</b>&CPD_CHECK, and we think we can create it, return 0.
+ * - if <b>check</b>&CPD_CHECK is false, and the directory exists, return 0.
+ * - otherwise, return -1.
+ * If CPD_GROUP_OK is set, then it's okay if the directory
* is group-readable, but in all cases we create the directory mode 0700.
* If CPD_GROUP_READ is set, existing directory behaves as CPD_GROUP_OK and
* if the directory is created it will use mode 0750 with group read