Browse Source

setres[ug]id; ok deraadt@

OPENBSD_3_8
djm 19 years ago
parent
commit
5a26462171
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/usr.sbin/ntpd/ntp.c

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

@ -1,4 +1,4 @@
/* $OpenBSD: ntp.c,v 1.57 2005/04/18 14:12:50 henning Exp $ */
/* $OpenBSD: ntp.c,v 1.58 2005/05/03 05:44:35 djm Exp $ */
/* /*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -118,8 +118,8 @@ ntp_main(int pipe_prnt[2], struct ntpd_conf *nconf)
setup_listeners(se, conf, &listener_cnt); setup_listeners(se, conf, &listener_cnt);
if (setgroups(1, &pw->pw_gid) || if (setgroups(1, &pw->pw_gid) ||
setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
seteuid(pw->pw_uid) || setuid(pw->pw_uid))
setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) ||
setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid))
fatal("can't drop privileges"); fatal("can't drop privileges");
endpwent(); endpwent();


Loading…
Cancel
Save