summaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h
index 5fb5f9b..26c54e2 100644
--- a/include/util.h
+++ b/include/util.h
@@ -123,4 +123,13 @@ void *alloc_array(size_t item_size, size_t nmemb);
SQFS_INTERNAL
void *alloc_string(size_t len);
+/*
+ Convert back to forward slashed, remove all preceeding and trailing slashes,
+ collapse all sequences of slashes, remove all path components that are '.'
+ and returns failure state if one of the path components is '..'.
+
+ Returns 0 on success.
+*/
+SQFS_INTERNAL int canonicalize_name(char *filename);
+
#endif /* UTIL_H */