-/* $OpenBSD: fingerd.c,v 1.39 2015/11/13 01:26:33 deraadt Exp $ */
+/* $OpenBSD: fingerd.c,v 1.40 2018/08/03 15:14:18 deraadt Exp $ */
/*
* Copyright (c) 1983, 1993
char **ap, *av[ENTRIES + 1], line[8192], *lp, *hname;
char hostbuf[HOST_NAME_MAX+1];
- if (pledge("stdio inet dns proc exec", NULL) == -1)
- err(1, "pledge");
-
prog = _PATH_FINGER;
logging = secure = user_required = short_list = 0;
openlog("fingerd", LOG_PID, LOG_DAEMON);
usage();
}
+ if (unveil(prog, "x") == -1)
+ err(1, "unveil");
+ if (pledge("stdio inet dns proc exec", NULL) == -1)
+ err(1, "pledge");
+
if (logging) {
struct sockaddr_storage ss;
struct sockaddr *sa;