tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

dir.h (1087B)


      1 /* Copyright (c) 2003-2004, Roger Dingledine
      2 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
      3 * Copyright (c) 2007-2021, The Tor Project, Inc. */
      4 /* See LICENSE for licensing information */
      5 
      6 #ifndef TOR_DIR_H
      7 #define TOR_DIR_H
      8 
      9 /**
     10 * \file dir.h
     11 *
     12 * \brief Header for dir.c
     13 **/
     14 
     15 #include "lib/cc/compat_compiler.h"
     16 #include "lib/testsupport/testsupport.h"
     17 
     18 /** Possible behaviors for check_private_dir() on encountering a nonexistent
     19 * directory; see that function's documentation for details. */
     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 /* !defined(TOR_DIR_H) */