diff svr-runopts.c @ 1819:5120e22882de

pass on sever process environment to child processes (option -e) (#118)
author Roland Vollgraf <30869947+rvollgraf@users.noreply.github.com>
date Thu, 19 Aug 2021 17:13:41 +0200
parents 435cfb9ec96e
children 94dc11094e26
line wrap: on
line diff
--- a/svr-runopts.c	Sat May 01 20:47:15 2021 +0800
+++ b/svr-runopts.c	Thu Aug 19 17:13:41 2021 +0200
@@ -64,6 +64,7 @@
 					"-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 @@
         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 @@
 					opts.usingsyslog = 0;
 					break;
 #endif
+				case 'e':
+					svr_opts.pass_on_env = 1;
+					break;
+
 #if DROPBEAR_SVR_LOCALTCPFWD
 				case 'j':
 					svr_opts.nolocaltcp = 1;