Fix issue with pid://../run/foo..pid parser

Unfortunately we cannot use realpath(3) here since the the PID files
usually do not yet exist at this point.

Add and modify my ugly de_dotdot() from Merecat httpd.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2023-02-05 18:16:27 +01:00
1 parent a67b2ba9a7
commit 82c6e4680f
5 files changed
+52 -6

No files matched your search

+1
View File
@@ -72,6 +72,7 @@ char *uptime (long secs, char *buf, size_t len);
char *memsz (uint64_t sz, char *buf, size_t len);
char *sanitize (char *arg, size_t len);
void de_dotdot (char *file);
int ismnt (char *file, char *dir, char *mode);
int fismnt (char *dir);