diff options
| author | Roy Marples <roy@marples.name> | 2020-04-30 21:13:45 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-04-30 21:13:45 +0100 |
| commit | 949d0f9aee6aefa461c949262202af12fa8143cf (patch) | |
| tree | a5b0bd6b799e59714196e5774b67f239c7162b86 /src/privsep-root.c | |
| parent | 257dae21343e899ad2667aac9b981fa427b7541b (diff) | |
| download | dhcpcd-949d0f9aee6aefa461c949262202af12fa8143cf.tar.xz | |
privsep: Add --chroot configurable
Overrides the directory to chroot to away from the privilege separation
users home directory.
Diffstat (limited to 'src/privsep-root.c')
| -rw-r--r-- | src/privsep-root.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/privsep-root.c b/src/privsep-root.c index a2aa1448..c3b95e24 100644 --- a/src/privsep-root.c +++ b/src/privsep-root.c @@ -220,8 +220,7 @@ ps_root_docopychroot(struct dhcpcd_ctx *ctx, const char *file) struct timeval tv[2]; #endif - if (snprintf(path, sizeof(path), "%s/%s", - ctx->ps_user->pw_dir, file) == -1) + if (snprintf(path, sizeof(path), "%s/%s", ctx->ps_chroot, file) == -1) return -1; if (stat(file, &from_sb) == -1) return -1; |
