aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.h
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2015-01-10 16:34:10 +1100
committerteor <teor2345@gmail.com>2015-01-10 16:34:10 +1100
commitc200ab46b85cece87a4bcdbaacd41bc6539d1671 (patch)
treef17e2c59dd076a73cce9787ecad3f8eeec88f705 /src/common/util.h
parentfd7e9e9030cee9d8e863cea3f3f90226ae66fdfe (diff)
parent6a9cae2e1dafb756b30fda541e8b5d68cfd45f89 (diff)
downloadtor-c200ab46b85cece87a4bcdbaacd41bc6539d1671.tar.gz
tor-c200ab46b85cece87a4bcdbaacd41bc6539d1671.zip
Merge branch 'bug14001-clang-warning' into bug13111-empty-key-files-fn-empty
Conflicts: src/or/router.c Choose newer comment. Merge changes to comment and function invocation.
Diffstat (limited to 'src/common/util.h')
-rw-r--r--src/common/util.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/util.h b/src/common/util.h
index c5471ff9f2..d45dd06741 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -227,6 +227,9 @@ const char *find_str_at_start_of_line(const char *haystack,
const char *needle);
int string_is_C_identifier(const char *string);
int string_is_key_value(int severity, const char *string);
+int string_is_valid_hostname(const char *string);
+int string_is_valid_ipv4_address(const char *string);
+int string_is_valid_ipv6_address(const char *string);
int tor_mem_is_zero(const char *mem, size_t len);
int tor_digest_is_zero(const char *digest);
@@ -344,9 +347,11 @@ typedef unsigned int cpd_check_t;
#define CPD_CREATE 1
#define CPD_CHECK 2
#define CPD_GROUP_OK 4
-#define CPD_CHECK_MODE_ONLY 8
+#define CPD_GROUP_READ 8
+#define CPD_CHECK_MODE_ONLY 16
int check_private_dir(const char *dirname, cpd_check_t check,
const char *effective_user);
+
#define OPEN_FLAGS_REPLACE (O_WRONLY|O_CREAT|O_TRUNC)
#define OPEN_FLAGS_APPEND (O_WRONLY|O_CREAT|O_APPEND)
#define OPEN_FLAGS_DONT_REPLACE (O_CREAT|O_EXCL|O_APPEND|O_WRONLY)