Tor
0.4.7.0-alpha-dev
|
Read directories, and create directories with restrictive permissions. More...
#include "lib/fs/dir.h"
#include "lib/fs/path.h"
#include "lib/fs/userdb.h"
#include "lib/log/log.h"
#include "lib/log/util_bug.h"
#include "lib/log/win32err.h"
#include "lib/container/smartlist.h"
#include "lib/sandbox/sandbox.h"
#include "lib/malloc/malloc.h"
#include "lib/string/printf.h"
#include "lib/string/compat_string.h"
#include <dirent.h>
#include <pwd.h>
#include <grp.h>
#include <errno.h>
#include <string.h>
Go to the source code of this file.
Functions | |
int | check_private_dir (const char *dirname, cpd_check_t check, const char *effective_user) |
smartlist_t * | tor_listdir (const char *dirname) |
Read directories, and create directories with restrictive permissions.
Definition in file dir.c.
int check_private_dir | ( | const char * | dirname, |
cpd_check_t | check, | ||
const char * | effective_user | ||
) |
Check whether dirname exists and is private. If yes return 0. If dirname does not exist:
Definition at line 71 of file dir.c.
Referenced by hs_config_client_authorization(), and storage_dir_new().
smartlist_t* tor_listdir | ( | const char * | dirname | ) |
Return a new list containing the filenames in the directory dirname. Return NULL on error or if dirname is not a directory.
Definition at line 307 of file dir.c.
Referenced by dump_desc_populate_fifo_from_directory(), and hs_config_client_authorization().