aboutsummaryrefslogtreecommitdiff
path: root/src/utils.h
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2018-05-18 23:38:46 +0200
committerToni Uhlig <matzeton@googlemail.com>2018-05-18 23:38:46 +0200
commitf48123bfaa46f5c93fe4b56423c6b52153e5c9b1 (patch)
tree4e3683e92251d4f3d8fc8cc3fde473a017e20436 /src/utils.h
parentac5acb542df4b9e449dc2413388890ca1e30984e (diff)
POTD skeleton #61.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/utils.h b/src/utils.h
index 8b3b230..3cd82e7 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -1,10 +1,14 @@
#ifndef POTD_UTILS_H
#define POTD_UTILS_H 1
+#include <stdlib.h>
+
#ifndef SIZEOF
#define SIZEOF(arr) (sizeof(arr)/sizeof(arr[0]))
#endif
+#define MIN(x, y) (x > y ? y : x)
+
extern char *arg0;
@@ -47,4 +51,7 @@ int update_guid_map(pid_t pid, unsigned int uid_map[3], int update_uidmap);
int update_setgroups_self(int allow);
#endif
+void escape_ascii_string(const char ascii[], size_t siz,
+ char **dest, size_t *newsiz);
+
#endif