summary refs log tree commit diff
path: root/daemon.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-08-14 16:17:29 -0400
committerJune McEnroe <june@causal.agency>2020-08-14 16:17:29 -0400
commit96e962a08c12ef14f1eef3b5db41204a36f91722 (patch)
tree89fc2b3c0e54774759ad12355954d94b0c0d2bc0 /daemon.h
parentImplement spawntab parsing (diff)
downloadcatsit-96e962a08c12ef14f1eef3b5db41204a36f91722.tar.gz
catsit-96e962a08c12ef14f1eef3b5db41204a36f91722.zip
Build environment for services
Diffstat (limited to 'daemon.h')
-rw-r--r--daemon.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/daemon.h b/daemon.h
index d7efb28..2c77537 100644
--- a/daemon.h
+++ b/daemon.h
@@ -19,6 +19,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 typedef unsigned char byte;
 
@@ -47,9 +48,20 @@ static inline int prependAdd(const char *command) {
 	return 0;
 }
 
+enum {
+	SHELL,
+	PATH,
+	LOGNAME,
+	USER,
+	HOME,
+	EnvironNull,
+	EnvironLen,
+};
+
 extern const char *serviceDir;
-extern struct passwd *serviceUser;
-extern struct group *serviceGroup;
+extern uid_t serviceUID;
+extern gid_t serviceGID;
+extern char *serviceEnviron[EnvironLen];
 
 struct Service {
 	char *name;