Browse Source

Change all tame callers to namechange to pledge(2).

OPENBSD_5_9
deraadt 8 years ago
parent
commit
1ca43f2c14
2 changed files with 6 additions and 6 deletions
  1. +3
    -3
      src/usr.sbin/ntpd/ntp_dns.c
  2. +3
    -3
      src/usr.sbin/ntpd/ntpd.c

+ 3
- 3
src/usr.sbin/ntpd/ntp_dns.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: ntp_dns.c,v 1.11 2015/10/03 02:48:54 deraadt Exp $ */
/* $OpenBSD: ntp_dns.c,v 1.12 2015/10/09 01:37:09 deraadt Exp $ */
/*
* Copyright (c) 2003-2008 Henning Brauer <henning@openbsd.org>
@ -90,8 +90,8 @@ ntp_dns(int pipe_ntp[2], struct ntpd_conf *nconf, struct passwd *pw)
fatal(NULL);
imsg_init(ibuf_dns, pipe_ntp[1]);
if (tame("dns rw", NULL) == -1)
err(1, "tame");
if (pledge("dns rw", NULL) == -1)
err(1, "pledge");
while (quit_dns == 0) {
pfd[0].fd = ibuf_dns->fd;


+ 3
- 3
src/usr.sbin/ntpd/ntpd.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: ntpd.c,v 1.95 2015/10/03 02:47:15 deraadt Exp $ */
/* $OpenBSD: ntpd.c,v 1.96 2015/10/09 01:37:09 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -565,8 +565,8 @@ ctl_main(int argc, char *argv[])
if (connect(fd, (struct sockaddr *)&sa, sizeof(sa)) == -1)
err(1, "connect: %s", sockname);
if (tame("stdio", NULL) == -1)
err(1, "tame");
if (pledge("stdio", NULL) == -1)
err(1, "pledge");
if ((ibuf_ctl = malloc(sizeof(struct imsgbuf))) == NULL)
err(1, NULL);


Loading…
Cancel
Save