Index: packet/packet.c
--- packet/packet.c.orig
+++ packet/packet.c
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <pwd.h>
 
 #ifdef HAVE_LIBCAP
 #include <sys/capability.h>
@@ -97,6 +98,14 @@ void drop_excess_capabilities() {
         }
     }
 
+#ifdef __OpenBSD__
+    /* no filesystem visibility */
+    if (unveil("/", "") == -1)
+        return -1;
+    if (unveil(NULL, NULL) == -1)
+        return -1;
+#endif
+
     // Update the process's capabilities to match 'wanted_cap'
     if(cap_set_proc(wanted_cap)) {
         goto pcap_error;
@@ -121,10 +130,19 @@ static
 int drop_elevated_permissions(
     void)
 {
-    /*  Drop any suid permissions granted  */
-    if (setgid(getgid()) || setuid(getuid())) {
+    struct passwd *pw;
+
+    if ((pw = getpwnam("_mtr")) == NULL) {
         return -1;
     }
+    if (pw) {
+        if (setgroups(1, &pw->pw_gid) ||
+            setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) ||
+            setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid)) {
+                return -1;
+        }
+    }
+    endpwent();
 
     if (geteuid() != getuid() || getegid() != getgid()) {
         return -1;
