diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/security.h | 8 | ||||
-rw-r--r-- | include/util.h | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/include/sway/security.h b/include/sway/security.h index c3a5cfd4..0edffdfa 100644 --- a/include/sway/security.h +++ b/include/sway/security.h @@ -3,9 +3,11 @@ #include <unistd.h> #include "sway/config.h" -uint32_t get_feature_policy(pid_t pid); -uint32_t get_ipc_policy(pid_t pid); -uint32_t get_command_policy(const char *cmd); +uint32_t get_feature_policy_mask(pid_t pid); +uint32_t get_ipc_policy_mask(pid_t pid); +uint32_t get_command_policy_mask(const char *cmd); + +struct feature_policy *get_feature_policy(const char *name); const char *command_policy_str(enum command_context context); diff --git a/include/util.h b/include/util.h index 839af265..e5365458 100644 --- a/include/util.h +++ b/include/util.h @@ -49,4 +49,12 @@ pid_t get_parent_pid(pid_t pid); */ uint32_t parse_color(const char *color); +/** + * Given a path string, recurseively resolves any symlinks to their targets + * (which may be a file, directory) and returns the result. + * argument is returned. Caller must free the returned buffer. + * If an error occures, if the path does not exist or if the path corresponds + * to a dangling symlink, NULL is returned. + */ +char* resolve_path(const char* path); #endif |