comparison 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
comparison
equal deleted inserted replaced
1632:c4bf28ccab97 1633:592a18dac250
274 return DROPBEAR_FAILURE; 274 return DROPBEAR_FAILURE;
275 } 275 }
276 276
277 /* check if we are running as non-root, and login user is different from the server */ 277 /* check if we are running as non-root, and login user is different from the server */
278 uid = geteuid(); 278 uid = geteuid();
279 if (uid != 0 && uid != ses.authstate.pw_uid) { 279 if (!(DROPBEAR_SVR_MULTIUSER && uid == 0) && uid != ses.authstate.pw_uid) {
280 TRACE(("running as nonroot, only server uid is allowed")) 280 TRACE(("running as nonroot, only server uid is allowed"))
281 dropbear_log(LOG_WARNING, 281 dropbear_log(LOG_WARNING,
282 "Login attempt with wrong user %s from %s", 282 "Login attempt with wrong user %s from %s",
283 ses.authstate.pw_name, 283 ses.authstate.pw_name,
284 svr_ses.addrstring); 284 svr_ses.addrstring);