summaryrefslogtreecommitdiffhomepage
path: root/svr-chansession.c
diff options
context:
space:
mode:
authorPatrick Stewart <patstew@gmail.com>2019-03-20 14:44:49 +0000
committerMatt Johnston <matt@ucc.asn.au>2019-03-20 22:44:49 +0800
commit0af22aa8e43722082947bb48fa9ec2990f702c49 (patch)
treedf05ce2ebbb44ef528cb02a65da5f1bf28ac54bc /svr-chansession.c
parent2fd3b9f560a2d15cff9b2124f2e82073f8783d39 (diff)
Support servers without multiple user support (#76)
Diffstat (limited to 'svr-chansession.c')
-rw-r--r--svr-chansession.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/svr-chansession.c b/svr-chansession.c
index 038a0f2..5a5a8c8 100644
--- a/svr-chansession.c
+++ b/svr-chansession.c
@@ -949,6 +949,7 @@ static void execchild(const void *user_data) {
#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 @@ static void execchild(const void *user_data) {
dropbear_exit("Couldn't change user as non-root");
}
}
+#endif
/* set env vars */
addnewvar("USER", ses.authstate.pw_name);