summaryrefslogtreecommitdiffstats
path: root/src/privsep-bsd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-05-12 10:26:35 +0100
committerRoy Marples <roy@marples.name>2020-05-12 10:26:35 +0100
commitcf85354d04d98ba2117ac413edd97a46cda05293 (patch)
tree5c79c1346f9b7435837be856798f8aa0099be3be /src/privsep-bsd.c
parent123d78292563042e643024fc9abf154d631b0cad (diff)
downloaddhcpcd-cf85354d04d98ba2117ac413edd97a46cda05293.tar.xz
privsep: Handle all file IO in the Priviledged Actioneer
This allows us to move the database directory back into the root of the filesystem. While here, harden the files by denying any user read access to them. As part of this change, init the DUID from any machine data and cache the default DHCP vendor field before dropping priviledges as we may lose access to this later.
Diffstat (limited to 'src/privsep-bsd.c')
-rw-r--r--src/privsep-bsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/privsep-bsd.c b/src/privsep-bsd.c
index f466156a..3aa2a73d 100644
--- a/src/privsep-bsd.c
+++ b/src/privsep-bsd.c
@@ -114,7 +114,7 @@ ps_root_os(struct ps_msghdr *psm, struct msghdr *msg)
}
static ssize_t
-ps_root_ioctldom(struct dhcpcd_ctx *ctx, uint8_t domain, unsigned long request,
+ps_root_ioctldom(struct dhcpcd_ctx *ctx, uint16_t domain, unsigned long request,
void *data, size_t len)
{
@@ -126,7 +126,7 @@ ps_root_ioctldom(struct dhcpcd_ctx *ctx, uint8_t domain, unsigned long request,
ssize_t
ps_root_ioctllink(struct dhcpcd_ctx *ctx, unsigned long request,
- void *data,size_t len)
+ void *data, size_t len)
{
return ps_root_ioctldom(ctx, PS_IOCTLLINK, request, data, len);