summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAnsgar Burchardt <ansgar@debian.org>2014-07-27 15:19:00 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-27 15:15:11 -0400
commit0f625d0b87139fc18cd565c9b6da05c53a0eb7ab (patch)
tree176ec0f961fafc960b7dc80e2f766ffe6b12c511 /src/test
parentccc6fa0d6b8e3ce5e7508ee8a141ee26f380b4a3 (diff)
parse_boolean: require exact matches
Require exact matches in all cases instead of treating strings starting with 't' ('f') as true (false). This is required for config_parse_protect_system to parse ProtectSystem=full correctly: it uses parse_boolean and only tries a more specific parsing function if that did not return a valid result. Thus "full" was treated as "false" before.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/test-util.c b/src/test/test-util.c
index ed91a67d10..9a28ef9eec 100644
--- a/src/test/test-util.c
+++ b/src/test/test-util.c
@@ -129,6 +129,7 @@ static void test_parse_boolean(void) {
assert_se(parse_boolean("garbage") < 0);
assert_se(parse_boolean("") < 0);
+ assert_se(parse_boolean("full") < 0);
}
static void test_parse_pid(void) {