summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-03-15 09:18:24 -0400
committerNick Mathewson <nickm@torproject.org>2016-03-15 09:18:24 -0400
commitc9899ee64008b63cb9867115ac684590dd50f902 (patch)
treec888e23a31dea5caa5479c6ce152fb5169e6101f /src/test
parent4b02af452d12b35e58d3a8e5e7ef042970e26774 (diff)
parentd8626d34e59ceb1a71b23646b9c1c1f4fec88638 (diff)
downloadtor-c9899ee64008b63cb9867115ac684590dd50f902.tar.gz
tor-c9899ee64008b63cb9867115ac684590dd50f902.zip
Merge remote-tracking branch 'weasel/bug18458'
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_config.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/test_config.c b/src/test/test_config.c
index b11848102e..6d9b4916e3 100644
--- a/src/test/test_config.c
+++ b/src/test/test_config.c
@@ -4038,6 +4038,13 @@ test_config_parse_port_config__ports__ports_given(void *data)
"127.0.0.3", 0, 0);
tt_int_op(ret, OP_EQ, -1);
+ // Test failure if we specify group writable for an IP Port
+ config_free_lines(config_port_invalid); config_port_invalid = NULL;
+ config_port_invalid = mock_config_line("DNSPort", "42 RelaxDirModeCheck");
+ ret = parse_port_config(NULL, config_port_invalid, NULL, "DNS", 0,
+ "127.0.0.3", 0, 0);
+ tt_int_op(ret, OP_EQ, -1);
+
// Test success with only a port (this will fail without a default address)
config_free_lines(config_port_valid); config_port_valid = NULL;
config_port_valid = mock_config_line("DNSPort", "42");