X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fcondition.c;h=24871b0daedb2b3491e78aaff0f42803ad1a79cc;hb=d896ac2d2fbce41a0b11a0618a685adeaf18b8fe;hp=f34b45f2a9cff97ec2e32bbf80e263ed2381242c;hpb=2eec67acbb00593e414549a7e5b35eb7dd776b1b;p=elogind.git diff --git a/src/shared/condition.c b/src/shared/condition.c index f34b45f2a..24871b0da 100644 --- a/src/shared/condition.c +++ b/src/shared/condition.c @@ -35,8 +35,9 @@ #include "ima-util.h" #include "selinux-util.h" #include "audit.h" -#include "condition.h" #include "cap-list.h" +#include "hostname-util.h" +#include "condition.h" Condition* condition_new(ConditionType type, const char *parameter, bool trigger, bool negate) { Condition *c; @@ -44,7 +45,7 @@ Condition* condition_new(ConditionType type, const char *parameter, bool trigger assert(type >= 0); assert(type < _CONDITION_TYPE_MAX); - assert(!parameter == (type == CONDITION_NULL)); + assert((!parameter) == (type == CONDITION_NULL)); c = new0(Condition, 1); if (!c) @@ -100,7 +101,7 @@ static int condition_test_kernel_command_line(Condition *c) { _cleanup_free_ char *word = NULL; bool found; - r = unquote_first_word(&p, &word, true); + r = unquote_first_word(&p, &word, UNQUOTE_RELAX); if (r < 0) return r; if (r == 0) @@ -348,7 +349,7 @@ static int condition_test_path_is_mount_point(Condition *c) { assert(c->parameter); assert(c->type == CONDITION_PATH_IS_MOUNT_POINT); - return path_is_mount_point(c->parameter, true) > 0; + return path_is_mount_point(c->parameter, AT_SYMLINK_FOLLOW) > 0; } static int condition_test_path_is_read_write(Condition *c) {