mirror of
https://github.com/swaywm/sway.git
synced 2025-11-08 13:29:50 -05:00
Implement permit and reject commands
This commit is contained in:
parent
1a8a42f372
commit
76cab04b4d
8 changed files with 115 additions and 22 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue