diff options
author | Drew DeVault <[email protected]> | 2017-12-05 12:35:51 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2017-12-05 12:35:51 -0500 |
commit | 3fe64482bb269a3dcceeaf1107b9d59dc60eb8d0 (patch) | |
tree | 8fea86b5c928d551723426e196405e5f2f25de2e /sway/security.c | |
parent | f2aa33ae0f6cd91b88a3f24b65e3e915c3960931 (diff) | |
parent | 7e81d304a3121e92f78527dcf1327e991b0089ac (diff) |
Merge pull request #1498 from emersion/config
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; +} |