return -1;
}
#endif
+ psp->psp_started = true;
return pid;
}
if (flags & PSF_DROPPRIVS)
ps_dropprivs(ctx);
+ psp->psp_started = true;
return 0;
errexit:
if (psp == NULL)
return 0;
+ psp->psp_started = false;
+
#ifdef PRIVSEP_DEBUG
logdebugx("%s: me=%d pid=%d fd=%d %s", __func__,
getpid(), psp->psp_pid, psp->psp_fd, psp->psp_name);
struct ps_process *psp;
TAILQ_FOREACH(psp, &ctx->ps_processes, next) {
+ if (!(psp->psp_started))
+ continue;
if (memcmp(&psp->psp_id, psid, sizeof(psp->psp_id)) == 0)
return psp;
}
};
struct bpf;
+
struct ps_process {
TAILQ_ENTRY(ps_process) next;
struct dhcpcd_ctx *psp_ctx;
char psp_name[PSP_NAMESIZE];
uint16_t psp_proto;
const char *psp_protostr;
+ bool psp_started;
#ifdef INET
int (*psp_filter)(const struct bpf *, const struct in_addr *);