aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-11-14 15:54:36 -0500
committerNick Mathewson <nickm@torproject.org>2017-11-14 15:54:36 -0500
commit192be006919c0bef04b7fce9e53c88ec1fcf4219 (patch)
treef15172881a75d4491fc96b3e81a98b6bb51d2fe4 /src/or/or.h
parentbf8a7201cea0dcd4da91cd67015bbdabc38c395a (diff)
downloadtor-192be006919c0bef04b7fce9e53c88ec1fcf4219.tar.gz
tor-192be006919c0bef04b7fce9e53c88ec1fcf4219.zip
Make the DataDirectory option immutable.
By convention, the torrc options that the user sets are unchangeable. If we need to change them, we should be using a copy that's stored in another field To avoid trouble, I'm keeping DataDirectory as the name for the field that the rest of Tor uses, and using DataDirectory_option for the confparse-controlled field. This commit also modernizes some older string handling code in the DataDirectory normalization function.
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/or.h b/src/or/or.h
index fa5268ac59..61e8d0b445 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -3641,7 +3641,9 @@ typedef struct {
char *SyslogIdentityTag; /**< Identity tag to add for syslog logging. */
char *DebugLogFile; /**< Where to send verbose log messages. */
- char *DataDirectory; /**< OR only: where to store long-term data. */
+ char *DataDirectory_option; /**< Where to store long-term data, as
+ * configured by the user. */
+ char *DataDirectory; /**< Where to store long-term data, as modified. */
int DataDirectoryGroupReadable; /**< Boolean: Is the DataDirectory g+r? */
char *Nickname; /**< OR only: nickname of this onion router. */
char *Address; /**< OR only: configured address for this onion router. */