diff options
author | Drew DeVault <[email protected]> | 2016-12-17 15:19:50 -0500 |
---|---|---|
committer | Drew DeVault <[email protected]> | 2016-12-17 15:21:57 -0500 |
commit | 1172566d4e298aa6c3555a0d606af4ff31d0db48 (patch) | |
tree | a6afcfbbecef26cc6ecaac0fad75268175fe9a51 /sway/main.c | |
parent | 14d9200e4e51c7c4597df65cbf0fb5347ef80caa (diff) |
Change how security config is loaded
Diffstat (limited to 'sway/main.c')
-rw-r--r-- | sway/main.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/sway/main.c b/sway/main.c index d41eb292..e8a02e7a 100644 --- a/sway/main.c +++ b/sway/main.c @@ -179,37 +179,6 @@ static void security_sanity_check() { "!! DANGER !! " SYSCONFDIR "/sway is not secure! It should be owned by root and set to 0755 at the minimum"); } } - struct { - char *command; - enum command_context context; - bool checked; - } expected[] = { - { "reload", CONTEXT_BINDING, false }, - { "permit", CONTEXT_CONFIG, false }, - { "reject", CONTEXT_CONFIG, false }, - { "ipc", CONTEXT_CONFIG, false }, - }; - int expected_len = 4; - for (int i = 0; i < config->command_policies->length; ++i) { - struct command_policy *policy = config->command_policies->items[i]; - for (int j = 0; j < expected_len; ++j) { - if (strcmp(expected[j].command, policy->command) == 0) { - expected[j].checked = true; - if (expected[j].context != policy->context) { - sway_log(L_ERROR, - "!! DANGER !! Command security policy for %s should be set to %s", - expected[j].command, command_policy_str(expected[j].context)); - } - } - } - } - for (int j = 0; j < expected_len; ++j) { - if (!expected[j].checked) { - sway_log(L_ERROR, - "!! DANGER !! Command security policy for %s should be set to %s", - expected[j].command, command_policy_str(expected[j].context)); - } - } } int main(int argc, char **argv) { |