]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Create lease files so they are user writeable.
authorRoy Marples <roy@marples.name>
Wed, 27 Mar 2013 15:19:48 +0000 (15:19 +0000)
committerRoy Marples <roy@marples.name>
Wed, 27 Mar 2013 15:19:48 +0000 (15:19 +0000)
dhcp.c
dhcp6.c

diff --git a/dhcp.c b/dhcp.c
index bbcbd45ad275adb1a7a8f5b3ad74bf8c4fcbbe7a..3fbe4dd0e7941e20878c9e22a5324515e71cf2d4 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -1088,7 +1088,7 @@ write_lease(const struct interface *ifp, const struct dhcp_message *dhcp)
        syslog(LOG_DEBUG, "%s: writing lease `%s'",
            ifp->name, state->leasefile);
 
-       fd = open(state->leasefile, O_WRONLY | O_CREAT | O_TRUNC, 0444);
+       fd = open(state->leasefile, O_WRONLY | O_CREAT | O_TRUNC, 0644);
        if (fd == -1)
                return -1;
 
diff --git a/dhcp6.c b/dhcp6.c
index ef0fe584029383b209b87be61b5663273116a792..0679c2f09a4fdc6b650b526a38c18a73406fef30 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -1063,7 +1063,7 @@ dhcp6_writelease(const struct interface *ifp)
        syslog(LOG_DEBUG, "%s: writing lease `%s'",
            ifp->name, state->leasefile);
 
-       fd = open(state->leasefile, O_WRONLY | O_CREAT | O_TRUNC, 0444);
+       fd = open(state->leasefile, O_WRONLY | O_CREAT | O_TRUNC, 0644);
        if (fd == -1) {
                syslog(LOG_ERR, "%s: dhcp6_writelease: %m", ifp->name);
                return -1;