Skip to content

Commit

Permalink
If built with systemd, remove some environment variables it uses. Fro…
Browse files Browse the repository at this point in the history
…m Ciprian

Dorin Craciun, GitHub issue 4035.
  • Loading branch information
nicm committed Aug 4, 2024
1 parent 775789f commit 2ac0faf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions environ.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2ac0faf

Please sign in to comment.