diff options
author | Omar Polo <op@omarpolo.com> | 2023-06-08 13:59:31 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-06-08 13:59:31 +0000 |
commit | c26f2460e42aa0822c283c805958989f339e7d8b (patch) | |
tree | 423410fae4de90b2b753ccad621d364c4641bed2 /Makefile | |
parent | 99f1fbb0c73b6f62b966760181b3d97f54bbe73b (diff) |
rework the daemon to do fork+exec
It uses the 'common' proc.c from various OpenBSD-daemons.
gmid grew organically bit by bit and it was also the first place where I
tried to implement privsep. It wasn't done very well, in fact the
parent process (that retains root privileges) just fork()s a generation
of servers, all sharing *exactly* the same address space. No good!
Now, we fork() and re-exec() ourselves, so that each process has a fresh
address space.
Some features (require client ca for example) are temporarly disabled,
will be fixed in subsequent commits. The "ge" program is also
temporarly disabled as it needs tweaks to do privsep too.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -26,6 +26,7 @@ GMID_SRCS = config.c \ log.c \ logger.c \ mime.c \ + proc.c \ proxy.c \ puny.c \ sandbox.c \ @@ -63,6 +64,7 @@ SRCS = gmid.h \ log.h \ logger.h \ parse.y \ + proc.h \ ${GMID_SRCS} \ ${GE_SRCS} \ ${GG_SRCS} @@ -88,8 +90,10 @@ y.tab.c: parse.y gmid: ${GMID_OBJS} ${CC} ${GMID_OBJS} -o $@ ${LDFLAGS} -ge: ${GE_OBJS} - ${CC} ${GE_OBJS} -o $@ ${LDFLAGS} +#ge: ${GE_OBJS} +# ${CC} ${GE_OBJS} -o $@ ${LDFLAGS} +ge: + : gg: ${GG_OBJS} ${CC} ${GG_OBJS} -o $@ ${LDFLAGS} |