diff options
| author | Roy Marples <roy@marples.name> | 2020-05-12 10:26:35 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-05-12 10:26:35 +0100 |
| commit | cf85354d04d98ba2117ac413edd97a46cda05293 (patch) | |
| tree | 5c79c1346f9b7435837be856798f8aa0099be3be /src/privsep-root.h | |
| parent | 123d78292563042e643024fc9abf154d631b0cad (diff) | |
| download | dhcpcd-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-root.h')
| -rw-r--r-- | src/privsep-root.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/privsep-root.h b/src/privsep-root.h index 7f8bdc65..a5fdb252 100644 --- a/src/privsep-root.h +++ b/src/privsep-root.h @@ -35,10 +35,12 @@ pid_t ps_root_start(struct dhcpcd_ctx *ctx); int ps_root_stop(struct dhcpcd_ctx *ctx); ssize_t ps_root_readerror(struct dhcpcd_ctx *, void *, size_t); -ssize_t ps_root_docopychroot(struct dhcpcd_ctx *, const char *); -ssize_t ps_root_copychroot(struct dhcpcd_ctx *, const char *); ssize_t ps_root_ioctl(struct dhcpcd_ctx *, ioctl_request_t, void *, size_t); ssize_t ps_root_unlink(struct dhcpcd_ctx *, const char *); +int ps_root_filemtime(struct dhcpcd_ctx *, const char *, time_t *); +ssize_t ps_root_readfile(struct dhcpcd_ctx *, const char *, void *, size_t); +ssize_t ps_root_writefile(struct dhcpcd_ctx *, const char *, mode_t, + const void *, size_t); ssize_t ps_root_os(struct ps_msghdr *, struct msghdr *); #if defined(BSD) || defined(__sun) ssize_t ps_root_route(struct dhcpcd_ctx *, void *, size_t); |
