aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/dhcpd.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-12-02 03:12:58 -0600
committerRob Landley <rob@landley.net>2014-12-02 03:12:58 -0600
commitaebcdfa659679e5a1f92a9ad12e7c36621962988 (patch)
tree252241eb2dfaeb36b23c621b7f662b8ad4a98a74 /toys/pending/dhcpd.c
parent1ba12b427e84c5c6578aa767a096f5859e7283ce (diff)
downloadtoybox-aebcdfa659679e5a1f92a9ad12e7c36621962988.tar.gz
Switching on fortify was not kind to the pending directory. Fix the actual build break (open(O_CREAT) without permissions).
Diffstat (limited to 'toys/pending/dhcpd.c')
-rw-r--r--toys/pending/dhcpd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/pending/dhcpd.c b/toys/pending/dhcpd.c
index 7da51949..2f0c3a54 100644
--- a/toys/pending/dhcpd.c
+++ b/toys/pending/dhcpd.c
@@ -867,7 +867,7 @@ static int write_leasefile(void)
struct arg_list *listdls = gstate.dleases;
dyn_lease *dls;
- if ((fd = open(gconfig.lease_file, O_WRONLY | O_CREAT | O_TRUNC)) < 0) {
+ if ((fd = open(gconfig.lease_file, O_WRONLY | O_CREAT | O_TRUNC, 0600)) < 0) {
perror_msg("can't open %s ", gconfig.lease_file);
return fd;
}