Don't set LOGNAME
LOGNAME is a SysV thing. This is a BSD program.
This commit is contained in:
parent
7d04a0f5e0
commit
daac7db044
@ -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
|
||||
|
5
daemon.c
5
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);
|
||||
|
Loading…
Reference in New Issue
Block a user