diff options
author | Roland Vollgraf <30869947+rvollgraf@users.noreply.github.com> | 2021-08-19 17:13:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-19 23:13:41 +0800 |
commit | 2157d5235226c0f03ba0440df1fdf7c0548bf9d8 (patch) | |
tree | 136d403735436b28b467005a897bbe2ebae5719c /svr-runopts.c | |
parent | 846d38fe4319c517683ac3df1796b3bc0180be14 (diff) |
pass on sever process environment to child processes (option -e) (#118)
Diffstat (limited to 'svr-runopts.c')
-rw-r--r-- | svr-runopts.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/svr-runopts.c b/svr-runopts.c index 2c905dd..36ea26b 100644 --- a/svr-runopts.c +++ b/svr-runopts.c @@ -64,6 +64,7 @@ static void printhelp(const char * progname) { "-R Create hostkeys as required\n" #endif "-F Don't fork into background\n" + "-e Pass on server process environment to child process\n" #ifdef DISABLE_SYSLOG "(Syslog support not compiled in, using stderr)\n" #else @@ -173,6 +174,7 @@ void svr_getopts(int argc, char ** argv) { svr_opts.pubkey_plugin = NULL; svr_opts.pubkey_plugin_options = NULL; #endif + svr_opts.pass_on_env = 0; #ifndef DISABLE_ZLIB opts.compress_mode = DROPBEAR_COMPRESS_DELAYED; @@ -223,6 +225,10 @@ void svr_getopts(int argc, char ** argv) { opts.usingsyslog = 0; break; #endif + case 'e': + svr_opts.pass_on_env = 1; + break; + #if DROPBEAR_SVR_LOCALTCPFWD case 'j': svr_opts.nolocaltcp = 1; |