kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 13795ead6389999473890e6ff025c307c4997134
parent 512e305e20ce6bd867d3023d510f2d2e517d9a95
Author: Joris Vink <joris@coders.se>
Date:   Sun, 14 Jun 2015 16:44:37 +0200

NetBSD fixes, from David Carlier.

Diffstat:
src/cli.c | 2+-
src/worker.c | 6+++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/cli.c b/src/cli.c @@ -40,7 +40,7 @@ #include "kore.h" -#if defined(OpenBSD) || defined(__FreeBSD_version) +#if defined(OpenBSD) || defined(__FreeBSD_version) || defined(NetBSD) #define PRI_TIME_T "d" #endif diff --git a/src/worker.c b/src/worker.c @@ -14,7 +14,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <sys/types.h> +#include <sys/param.h> #include <sys/shm.h> #include <sys/wait.h> #include <sys/time.h> @@ -228,8 +228,8 @@ kore_worker_entry(struct kore_worker *kw) if (skip_runas == 0) { if (setgroups(1, &pw->pw_gid) || -#ifdef __MACH__ - setgid(pw->pw_gid) || setegid(pw->pw_gid) || +#if defined(__MACH__) || defined(NetBSD) + setgid(Pw->pw_gid) || setegid(pw->pw_gid) || setuid(pw->pw_uid) || seteuid(pw->pw_uid)) #else setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) ||