summaryrefslogtreecommitdiff
path: root/svr-runopts.c
diff options
context:
space:
mode:
authorRoland Vollgraf <30869947+rvollgraf@users.noreply.github.com>2021-08-19 17:13:41 +0200
committerGitHub <noreply@github.com>2021-08-19 23:13:41 +0800
commit2157d5235226c0f03ba0440df1fdf7c0548bf9d8 (patch)
tree136d403735436b28b467005a897bbe2ebae5719c /svr-runopts.c
parent846d38fe4319c517683ac3df1796b3bc0180be14 (diff)
downloaddropbear-2157d5235226c0f03ba0440df1fdf7c0548bf9d8.tar.gz
pass on sever process environment to child processes (option -e) (#118)
Diffstat (limited to 'svr-runopts.c')
-rw-r--r--svr-runopts.c6
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;