diff svr-auth.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 e11ed628708b
children 7c17995bcdfb
line wrap: on
line diff
--- a/svr-auth.c	Wed Mar 20 17:33:15 2019 +0300
+++ b/svr-auth.c	Wed Mar 20 14:44:49 2019 +0000
@@ -276,7 +276,7 @@
 
 	/* 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",