diff options
author | June McEnroe <june@causal.agency> | 2020-08-14 16:17:29 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-08-14 16:17:29 -0400 |
commit | 96e962a08c12ef14f1eef3b5db41204a36f91722 (patch) | |
tree | 89fc2b3c0e54774759ad12355954d94b0c0d2bc0 /service.c | |
parent | Implement spawntab parsing (diff) | |
download | catsit-96e962a08c12ef14f1eef3b5db41204a36f91722.tar.gz catsit-96e962a08c12ef14f1eef3b5db41204a36f91722.zip |
Build environment for services
Diffstat (limited to '')
-rw-r--r-- | service.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/service.c b/service.c index b6e6ce1..7087e38 100644 --- a/service.c +++ b/service.c @@ -14,17 +14,21 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <grp.h> -#include <pwd.h> +#include <paths.h> #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> #include "daemon.h" const char *serviceDir = "/"; -struct passwd *serviceUser; -struct group *serviceGroup; +uid_t serviceUID; +gid_t serviceGID; +char *serviceEnviron[EnvironLen] = { + [SHELL] = "SHELL=" _PATH_BSHELL, + [PATH] = "PATH=" _PATH_DEFPATH, +}; struct Prepend prepend; struct Services services; |