-/* $OpenBSD: rarpd.c,v 1.74 2018/06/01 07:36:13 tb Exp $ */
+/* $OpenBSD: rarpd.c,v 1.75 2018/08/07 18:39:56 deraadt Exp $ */
/* $NetBSD: rarpd.c,v 1.25 1998/04/23 02:48:33 mrg Exp $ */
/*
int lflag = 0; /* log all replies */
int tflag = 0; /* tftpboot check */
+#ifndef TFTP_DIR
+#define TFTP_DIR "/tftpboot"
+#endif
+
int
main(int argc, char *argv[])
{
arptab_init();
+ if (unveil(TFTP_DIR, "r") == -1)
+ error("unveil");
+ if (unveil("/etc/ethers", "r") == -1)
+ error("unveil");
if (pledge("stdio rpath dns", NULL) == -1)
error("pledge");
free(pfd);
}
-#ifndef TFTP_DIR
-#define TFTP_DIR "/tftpboot"
-#endif
-
/*
* True if this server can boot the host whose IP address is 'addr'.
* This check is made by looking in the tftp directory for the