From: Roy Marples Date: Wed, 27 Mar 2013 15:19:48 +0000 (+0000) Subject: Create lease files so they are user writeable. X-Git-Tag: v5.99.6~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=948f297505651e597eacd3077172a75b54b3fa05;p=thirdparty%2Fdhcpcd.git Create lease files so they are user writeable. --- diff --git a/dhcp.c b/dhcp.c index bbcbd45a..3fbe4dd0 100644 --- 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 ef0fe584..0679c2f0 100644 --- 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;