diff options
author | June McEnroe <june@causal.agency> | 2020-08-16 17:32:23 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-08-16 17:32:23 -0400 |
commit | daac7db044d1e0f270d12791810414815113058c (patch) | |
tree | d0e2f4bc5e984807d4cad496a7ba83dd6d5ac40c | |
parent | Add privileged services (diff) | |
download | catsit-daac7db044d1e0f270d12791810414815113058c.tar.gz catsit-daac7db044d1e0f270d12791810414815113058c.zip |
Don't set LOGNAME
LOGNAME is a SysV thing. This is a BSD program.
Diffstat (limited to '')
-rw-r--r-- | catsitd.8 | 4 | ||||
-rw-r--r-- | daemon.c | 5 | ||||
-rw-r--r-- | daemon.h | 1 |
3 files changed, 3 insertions, 7 deletions
diff --git a/catsitd.8 b/catsitd.8 index 3bc4b3f..e5e7290 100644 --- a/catsitd.8 +++ b/catsitd.8 @@ -1,4 +1,4 @@ -.Dd August 15, 2020 +.Dd August 16, 2020 .Dt CATSITD 8 .Os . @@ -172,7 +172,7 @@ Services are started with empty environments apart from the following: .Bl -tag -width Ds -.It Ev LOGNAME , Ev USER +.It Ev USER Set to the name of the user specified by .Fl u . .It Ev HOME diff --git a/daemon.c b/daemon.c index 84b820d..0e15c12 100644 --- a/daemon.c +++ b/daemon.c @@ -242,10 +242,7 @@ int main(int argc, char *argv[]) { serviceUID = user->pw_uid; serviceGID = group->gr_gid; - int len = asprintf(&serviceEnviron[LOGNAME], "LOGNAME=%s", user->pw_name); - if (len < 0) err(EX_OSERR, "asprintf"); - - len = asprintf(&serviceEnviron[USER], "USER=%s", user->pw_name); + int len = asprintf(&serviceEnviron[USER], "USER=%s", user->pw_name); if (len < 0) err(EX_OSERR, "asprintf"); len = asprintf(&serviceEnviron[HOME], "HOME=%s", user->pw_dir); diff --git a/daemon.h b/daemon.h index d625df2..0398db9 100644 --- a/daemon.h +++ b/daemon.h @@ -91,7 +91,6 @@ static inline const char *lineRead(struct Line *line, int fd) { enum { SHELL, PATH, - LOGNAME, USER, HOME, EnvironNull, |