From: Roy Marples Date: Sat, 12 Apr 2008 23:13:15 +0000 (+0000) Subject: The lease file should only be able to be read by the user than runs dhcpcd. X-Git-Tag: v4.0.2~507 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0236825ba4f847fe9d3f4e0abdd462c21f05294f;p=thirdparty%2Fdhcpcd.git The lease file should only be able to be read by the user than runs dhcpcd. --- diff --git a/dhcp.c b/dhcp.c index dce84c55..235c639a 100644 --- a/dhcp.c +++ b/dhcp.c @@ -699,7 +699,7 @@ write_lease(const struct interface *iface, const struct dhcp_message *dhcp) uint8_t l; uint8_t o = 0; - fd = open(iface->leasefile, O_WRONLY | O_CREAT | O_TRUNC, 0644); + fd = open(iface->leasefile, O_WRONLY | O_CREAT | O_TRUNC, 0600); if (fd == -1) return -1;