]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
The lease file should only be able to be read by the user than runs dhcpcd.
authorRoy Marples <roy@marples.name>
Sat, 12 Apr 2008 23:13:15 +0000 (23:13 +0000)
committerRoy Marples <roy@marples.name>
Sat, 12 Apr 2008 23:13:15 +0000 (23:13 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index dce84c5518c931204d4a7e63c92587b7d8f0dd96..235c639af74cdc365d87be89140d9ea07ada93cc 100644 (file)
--- 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;