If built with systemd, remove some environment variables it uses. From Ciprian

Dorin Craciun, GitHub issue 4035.
This commit is contained in:
Nicholas Marriott 2024-08-04 09:58:13 +01:00
parent 775789fbd5
commit 2ac0faf119

View File

@ -264,6 +264,12 @@ environ_for_session(struct session *s, int no_TERM)
environ_set(env, "TERM_PROGRAM_VERSION", 0, "%s", getversion());
}
#ifdef HAVE_SYSTEMD
environ_clear(env, "LISTEN_PID");
environ_clear(env, "LISTEN_FDS");
environ_clear(env, "LISTEN_FDNAMES");
#endif
if (s != NULL)
idx = s->id;
else