diff options
author | Drew DeVault <[email protected]> | 2016-12-01 21:36:43 -0500 |
---|---|---|
committer | Drew DeVault <[email protected]> | 2016-12-01 21:36:43 -0500 |
commit | 76cab04b4d7828f3c4f607c49e1e6ad78aa6e3da (patch) | |
tree | 53a871af54a91c689c5db597ab21b3c97c4506cd /sway/security.c | |
parent | 1a8a42f372e1bed146623e3357dbb12d8947e654 (diff) |
Implement permit and reject commands
Diffstat (limited to 'sway/security.c')
-rw-r--r-- | sway/security.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/security.c b/sway/security.c index 00e5e8d7..776bd527 100644 --- a/sway/security.c +++ b/sway/security.c @@ -4,6 +4,13 @@ #include "sway/security.h" #include "log.h" +struct feature_policy *alloc_feature_policy(const char *program) { + struct feature_policy *policy = malloc(sizeof(struct feature_policy)); + policy->program = strdup(program); + policy->features = FEATURE_FULLSCREEN | FEATURE_KEYBOARD | FEATURE_MOUSE; + return policy; +} + enum secure_feature get_feature_policy(pid_t pid) { const char *fmt = "/proc/%d/exe"; int pathlen = snprintf(NULL, 0, fmt, pid); |