$OpenBSD: patch-src_util-privs_h,v 1.2 2019/04/19 12:22:27 bluhm Exp $

Use setresuid/gid() directly to change user and group.  Otherwise 
Suricata uses libcap-ng on Linux and runs as root elsewhere.
https://github.com/OISF/suricata/commit/00917a0415629abbf675fd14d8752a0a27ab1ff5

Index: src/util-privs.h
--- src/util-privs.h.orig
+++ src/util-privs.h
@@ -93,6 +93,13 @@ void SCDropMainThreadCaps(uint32_t , uint32_t );
 
 int SCGetUserID(const char *, const char *, uint32_t *, uint32_t *);
 int SCGetGroupID(const char *, uint32_t *);
+int SCSetUserID(const uint32_t uid, const uint32_t gid);
+
+#ifdef __OpenBSD__
+int SCPledge(void);
+#else /* __OpenBSD__ */
+#define SCPledge(...)
+#endif /* __OpenBSD__ */
 
 #endif	/* _UTIL_PRIVS_H */
 
