(Note that if the seccomp2 Sandbox feature is enabled,
it is not possible to change the key filenames while Tor is running.)
+[[FamilyKeyDirectory]] **FamilyKeyDirectory** __directory__:
+ Configure a directory to use, in place of the key directory,
+ when searching for family ID keys.
+
[[Nickname]] **Nickname** __name__::
Set the server's nickname to \'name'. Nicknames must be between 1 and 19
characters inclusive, and must contain only the characters [a-zA-Z0-9].
OBSOLETE("FallbackNetworkstatusFile"),
VAR("FamilyId", LINELIST, FamilyId_lines, NULL),
+ VAR_IMMUTABLE("FamilyKeyDirectory",
+ FILENAME, FamilyKeyDirectory_option, NULL),
V(FascistFirewall, BOOL, "0"),
V(FirewallPorts, CSV, ""),
OBSOLETE("FastFirstHopPK"),
}
tor_free(options->DataDirectory);
tor_free(options->CacheDirectory);
+ tor_free(options->FamilyKeyDirectory);
tor_free(options->KeyDirectory);
tor_free(options->BridgePassword_AuthDigest_);
tor_free(options->command_arg);
options->CacheDirectory = tor_strdup(options->DataDirectory);
}
+ tor_free(options->FamilyKeyDirectory);
+ if (options->FamilyKeyDirectory_option) {
+ options->FamilyKeyDirectory =
+ get_data_directory(options->FamilyKeyDirectory_option);
+ if (!options->FamilyKeyDirectory)
+ return -1;
+ } else {
+ /* Default to the key directory. */
+ options->FamilyKeyDirectory = tor_strdup(options->KeyDirectory);
+ }
+
return 0;
}
char *KeyDirectory; /**< Where to store keys data, as modified. */
int KeyDirectoryGroupReadable; /**< Boolean: Is the KeyDirectory g+r? */
+ char *FamilyKeyDirectory_option; /**< Where to look for family ID keys,
+ * as configured by the user. */
+ char *FamilyKeyDirectory; /**< Where to look for family ID keys. */
+
char *CacheDirectory_option; /**< Where to store cached data, as
* configured by the user. */
char *CacheDirectory; /**< Where to store cached data, as modified. */
#ifdef HAVE_MODULE_RELAY
{
smartlist_t *family_id_files =
- list_family_key_files(options, options->KeyDirectory);
+ list_family_key_files(options, options->FamilyKeyDirectory);
SMARTLIST_FOREACH(family_id_files, const char *, fn,
OPEN(fn));
const networkstatus_t *ns)
{
if (options->FamilyIds) {
- if (load_family_id_keys_impl(options, options->KeyDirectory) < 0)
+ if (load_family_id_keys_impl(options, options->FamilyKeyDirectory) < 0)
return -1;
bool any_missing = false;