diff options
Diffstat (limited to 'sway/security.c')
-rw-r--r-- | sway/security.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/security.c b/sway/security.c index f16fdd1f..9cccd62e 100644 --- a/sway/security.c +++ b/sway/security.c | |||
@@ -28,7 +28,11 @@ struct command_policy *alloc_command_policy(const char *command) { | |||
28 | } | 28 | } |
29 | 29 | ||
30 | enum secure_feature get_feature_policy(pid_t pid) { | 30 | enum secure_feature get_feature_policy(pid_t pid) { |
31 | #ifdef __FreeBSD__ | ||
32 | const char *fmt = "/proc/%d/file"; | ||
33 | #else | ||
31 | const char *fmt = "/proc/%d/exe"; | 34 | const char *fmt = "/proc/%d/exe"; |
35 | #endif | ||
32 | int pathlen = snprintf(NULL, 0, fmt, pid); | 36 | int pathlen = snprintf(NULL, 0, fmt, pid); |
33 | char *path = malloc(pathlen + 1); | 37 | char *path = malloc(pathlen + 1); |
34 | snprintf(path, pathlen + 1, fmt, pid); | 38 | snprintf(path, pathlen + 1, fmt, pid); |