summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcpd/db.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2014-02-08 18:12:18 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2014-02-08 18:12:18 +0000
commit3f429afd845f8e311ef9f094b08294a456b0f479 (patch)
tree1e4e889883a689b7b094b63078c5320160cd135c /usr.sbin/dhcpd/db.c
parent5888968b5f6ade5a4b1c69470e8d2061f3813642 (diff)
Create dhclient lease files and dhcpd lease files with permissions 0640,
rather than 0000 and 0664 respectively. ok kettenis@ tedu@
Diffstat (limited to 'usr.sbin/dhcpd/db.c')
-rw-r--r--usr.sbin/dhcpd/db.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/dhcpd/db.c b/usr.sbin/dhcpd/db.c
index b037b2c3f49..664772c6e35 100644
--- a/usr.sbin/dhcpd/db.c
+++ b/usr.sbin/dhcpd/db.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db.c,v 1.13 2013/04/20 01:18:55 krw Exp $ */
+/* $OpenBSD: db.c,v 1.14 2014/02/08 18:12:17 krw Exp $ */
/*
* Persistent database management routines for DHCPD.
@@ -181,7 +181,7 @@ db_startup(void)
int db_fd;
/* open lease file. once we dropped privs it has to stay open */
- db_fd = open(path_dhcpd_db, O_WRONLY|O_CREAT, 0664);
+ db_fd = open(path_dhcpd_db, O_WRONLY|O_CREAT, 0640);
if (db_fd == -1)
error("Can't create new lease file: %m");
if ((db_file = fdopen(db_fd, "w")) == NULL)