Explorar el Código

Call unveil() from srv_open() if on OpenBSD.

default hace 3 años
padre
commit
484cfbc800
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      data.c

+ 6 - 0
data.c

@@ -79,6 +79,12 @@ int srv_open(char *basedir)
     if (error != NULL)
     if (error != NULL)
         srv_log(error);
         srv_log(error);
 
 
+#ifdef __OpenBSD__
+    srv_debug(2, xs_fmt("Calling unveil()"));
+    unveil(basedir, "rwc");
+    unveil(NULL,    NULL);
+#endif /* __OpenBSD__ */
+
     return ret;
     return ret;
 }
 }