From a995ff4eb5da09165ce2203a40ffd64f5d8995fe Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Wed, 6 Jan 2016 20:39:54 -0600 Subject: [PATCH] Environment handling on GNO *Initialize environ on startup *Separate child process environment from parent --- telnetd/sys_term.c | 3 +++ telnetd/telnetd.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/telnetd/sys_term.c b/telnetd/sys_term.c index fb0a8eb..86e2c5b 100644 --- a/telnetd/sys_term.c +++ b/telnetd/sys_term.c @@ -928,6 +928,9 @@ cleanopen(char *li) static void slaveproc(char *host, int autologin, char *autoname) { +#ifdef __GNO__ + environPush(); +#endif getptyslave(); start_login(host, autologin, autoname); /*NOTREACHED*/ diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c index 13b86d1..be5b8f6 100644 --- a/telnetd/telnetd.c +++ b/telnetd/telnetd.c @@ -151,6 +151,10 @@ main(int argc, char *argv[]) #ifdef ENCRYPTION nclearto = 0; #endif /* ENCRYPTION */ + +#ifdef __GNO__ + environInit(); +#endif /* * This initialization causes linemode to default to a configuration