diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-07-20 19:40:05 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-07-20 19:40:05 +0000 |
commit | c4f4b3fa0ef410f6f5b124f01c1cd5658a56741f (patch) | |
tree | 6747b3467118e26e86660a12e811bdc63b1b0d3f /sbin/dhclient/dhclient.c | |
parent | 4236b520f9b1491f880de4fa0cb4a0a31fb30892 (diff) |
Shrink priv_write_file() API so that it does less, and the callers ask
it to do less. Discussion with guenther.
ok krw
Diffstat (limited to 'sbin/dhclient/dhclient.c')
-rw-r--r-- | sbin/dhclient/dhclient.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 6e27d0e35e2..e05c1ed6561 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.375 2016/07/20 19:25:39 deraadt Exp $ */ +/* $OpenBSD: dhclient.c,v 1.376 2016/07/20 19:40:04 deraadt Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -2542,8 +2542,8 @@ priv_write_resolv_conf(struct imsg *imsg) sz = imsg->hdr.len - IMSG_HEADER_SIZE; priv_write_file("/etc/resolv.conf", - O_WRONLY | O_CREAT | O_TRUNC | O_SYNC | O_EXLOCK, - S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, 0, 0, contents, sz); + O_WRONLY | O_CREAT | O_TRUNC, + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, contents, sz); } void @@ -2561,12 +2561,12 @@ priv_write_option_db(struct imsg *imsg) sz = imsg->hdr.len - IMSG_HEADER_SIZE; priv_write_file(path_option_db, - O_WRONLY | O_CREAT | O_TRUNC | O_SYNC | O_EXLOCK | O_NOFOLLOW, - S_IRUSR | S_IWUSR | S_IRGRP, 0, 0, contents, sz); + O_WRONLY | O_CREAT | O_TRUNC | O_NOFOLLOW, + S_IRUSR | S_IWUSR | S_IRGRP, contents, sz); } void -priv_write_file(char *path, int flags, mode_t mode, uid_t uid, gid_t gid, +priv_write_file(char *path, int flags, mode_t mode, u_int8_t *contents, size_t sz) { ssize_t n; |