diff options
author | emersion <[email protected]> | 2017-12-05 10:40:55 +0100 |
---|---|---|
committer | emersion <[email protected]> | 2017-12-05 10:40:55 +0100 |
commit | 90f7f1a0e61fa20ed1b74b9df057aa70abc791ed (patch) | |
tree | e201e4fb9fef471dd2fcf9581e26addfe3550502 /sway/security.c | |
parent | 83b4c0648d75932c693b8636242202ea728035da (diff) |
Add minimal config subsystem
Diffstat (limited to 'sway/security.c')
-rw-r--r-- | sway/security.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sway/security.c b/sway/security.c new file mode 100644 index 00000000..cc0d3f66 --- /dev/null +++ b/sway/security.c @@ -0,0 +1,18 @@ +#define _XOPEN_SOURCE 700 +#include <stdlib.h> +#include <string.h> +#include "sway/security.h" + +struct command_policy *alloc_command_policy(const char *command) { + struct command_policy *policy = malloc(sizeof(struct command_policy)); + if (!policy) { + return NULL; + } + policy->command = strdup(command); + if (!policy->command) { + free(policy); + return NULL; + } + policy->context = 0; + return policy; +} |