aboutsummaryrefslogtreecommitdiffstats
path: root/include/util.h
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-04-16 10:17:43 -0400
committerLibravatar GitHub <noreply@github.com>2017-04-16 10:17:43 -0400
commit7494a48378bff3b11304ba4077bda5a84ed10087 (patch)
tree21abe14fe200099fffe5de9b7770cf2ca921e371 /include/util.h
parentMerge pull request #1175 from JerziKaminsky/fix_sway_assert_variadic (diff)
parentHandle symlinks as IPC security targets (diff)
downloadsway-7494a48378bff3b11304ba4077bda5a84ed10087.tar.gz
sway-7494a48378bff3b11304ba4077bda5a84ed10087.tar.zst
sway-7494a48378bff3b11304ba4077bda5a84ed10087.zip
Merge pull request #1173 from JerziKaminsky/security_resolve_symlink
FOR_REVIEW: IPC security - Allow policy targets to be symlinks
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h8
1 files changed, 8 insertions, 0 deletions
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);
49 */ 49 */
50uint32_t parse_color(const char *color); 50uint32_t parse_color(const char *color);
51 51
52/**
53 * Given a path string, recurseively resolves any symlinks to their targets
54 * (which may be a file, directory) and returns the result.
55 * argument is returned. Caller must free the returned buffer.
56 * If an error occures, if the path does not exist or if the path corresponds
57 * to a dangling symlink, NULL is returned.
58 */
59char* resolve_path(const char* path);
52#endif 60#endif