diff svr-chansession.c @ 1633:592a18dac250

Support servers without multiple user support (#76)
author Patrick Stewart <patstew@gmail.com>
date Wed, 20 Mar 2019 14:44:49 +0000
parents 79eef94ccea9
children 8a7d26e86a56
line wrap: on
line diff
--- a/svr-chansession.c	Wed Mar 20 17:33:15 2019 +0300
+++ b/svr-chansession.c	Wed Mar 20 14:44:49 2019 +0000
@@ -949,6 +949,7 @@
 #endif /* HAVE_CLEARENV */
 #endif /* DEBUG_VALGRIND */
 
+#if DROPBEAR_SVR_MULTIUSER
 	/* We can only change uid/gid as root ... */
 	if (getuid() == 0) {
 
@@ -972,6 +973,7 @@
 			dropbear_exit("Couldn't	change user as non-root");
 		}
 	}
+#endif
 
 	/* set env vars */
 	addnewvar("USER", ses.authstate.pw_name);