summaryrefslogtreecommitdiffhomepage
path: root/svr-auth.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-auth.c
parent2fd3b9f560a2d15cff9b2124f2e82073f8783d39 (diff)
Support servers without multiple user support (#76)
Diffstat (limited to 'svr-auth.c')
-rw-r--r--svr-auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/svr-auth.c b/svr-auth.c
index f952b0b..7575f90 100644
--- a/svr-auth.c
+++ b/svr-auth.c
@@ -276,7 +276,7 @@ static int checkusername(const char *username, unsigned int userlen) {
/* check if we are running as non-root, and login user is different from the server */
uid = geteuid();
- if (uid != 0 && uid != ses.authstate.pw_uid) {
+ if (!(DROPBEAR_SVR_MULTIUSER && uid == 0) && uid != ses.authstate.pw_uid) {
TRACE(("running as nonroot, only server uid is allowed"))
dropbear_log(LOG_WARNING,
"Login attempt with wrong user %s from %s",