mirror of
https://github.com/swaywm/sway.git
synced 2025-11-08 13:29:50 -05:00
Add minimal config subsystem
This commit is contained in:
parent
83b4c0648d
commit
90f7f1a0e6
11 changed files with 1091 additions and 19 deletions
18
sway/security.c
Normal file
18
sway/security.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue