Do not unveil unused unwind socket under SMALL
authorkn <kn@openbsd.org>
Tue, 2 Mar 2021 09:17:10 +0000 (09:17 +0000)
committerkn <kn@openbsd.org>
Tue, 2 Mar 2021 09:17:10 +0000 (09:17 +0000)
Remove unused STARTUP_WAIT_TIMO (since import),
add missing space to error message.

sbin/resolvd/resolvd.c

index 0f73b8b..96a5cd9 100644 (file)
 
 #define        ROUTE_SOCKET_BUF_SIZE   16384
 #define        ASR_MAXNS               10
+#ifndef SMALL
 #define        _PATH_UNWIND_SOCKET     "/dev/unwind.sock"
+#endif
 #define        _PATH_RESCONF           "/etc/resolv.conf"
 #define        _PATH_RESCONF_NEW       "/etc/resolv.conf.new"
 #define _PATH_LOCKFILE         "/var/run/resolvd.lock"
-#define        STARTUP_WAIT_TIMO       1
 
 #ifndef nitems
 #define        nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
@@ -215,8 +216,10 @@ main(int argc, char *argv[])
 
        if (unveil("/etc", "rwc") == -1)
                lerr(1, "unveil /etc");
+#ifndef SMALL
        if (unveil(_PATH_UNWIND_SOCKET, "r") == -1)
-               lerr(1, "unveil" _PATH_UNWIND_SOCKET);
+               lerr(1, "unveil " _PATH_UNWIND_SOCKET);
+#endif
 
        if (pledge("stdio unix rpath wpath cpath", NULL) == -1)
                lerr(1, "pledge");