tor  0.4.1.0-alpha-dev
dir.h
Go to the documentation of this file.
1 /* Copyright (c) 2003-2004, Roger Dingledine
2  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3  * Copyright (c) 2007-2019, The Tor Project, Inc. */
4 /* See LICENSE for licensing information */
5 
6 #ifndef TOR_DIR_H
7 #define TOR_DIR_H
8 
15 #include "lib/cc/compat_compiler.h"
17 
20 typedef unsigned int cpd_check_t;
21 #define CPD_NONE 0
22 #define CPD_CREATE (1u << 0)
23 #define CPD_CHECK (1u << 1)
24 #define CPD_GROUP_OK (1u << 2)
25 #define CPD_GROUP_READ (1u << 3)
26 #define CPD_CHECK_MODE_ONLY (1u << 4)
27 #define CPD_RELAX_DIRMODE_CHECK (1u << 5)
28 MOCK_DECL(int, check_private_dir, (const char *dirname, cpd_check_t check,
29  const char *effective_user));
30 
31 MOCK_DECL(struct smartlist_t *, tor_listdir, (const char *dirname));
32 
33 #endif
unsigned int cpd_check_t
Definition: dir.h:20
Utility macros to handle different features and behavior in different compilers.
Macros to implement mocking and selective exposure for the test code.
#define MOCK_DECL(rv, funcname, arglist)
Definition: testsupport.h:94