mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-24 18:44:10 +08:00
Create lease files so they are user writeable.
This commit is contained in:
parent
564db9ad48
commit
948f297505
2
dhcp.c
2
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;
|
||||
|
||||
|
2
dhcp6.c
2
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;
|
||||
|
Loading…
Reference in New Issue
Block a user