From e815e974407b734f62058a4a834e6af21a937883 Mon Sep 17 00:00:00 2001
From: iquaba <cooka2011@gmail.com>
Date: Wed, 6 Aug 2014 08:48:43 -0500
Subject: [PATCH] Try without identifying current user

Small change that warns the user if the current user cannot be identified rather than aborting.  This came in handy when I put dropbear on a dlink that did not have a true user environment.  Falling back on the "-l" option and user@ options works just fine as a client.  The only implication I found is that the -J option will fail ungracefully without a known own_user.
---
 cli-runopts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cli-runopts.c b/cli-runopts.c
index 5f36f7c5..8c9bc8e3 100644
--- a/cli-runopts.c
+++ b/cli-runopts.c
@@ -684,7 +684,7 @@ static void fill_own_user() {
 
 	pw = getpwuid(uid);
 	if (pw == NULL || pw->pw_name == NULL) {
-		dropbear_exit("Unknown own user");
+		dropbear_log(LOG_INFO, "Warning: failed to identify current user. Trying anyway.");
 	}
 
 	cli_opts.own_user = m_strdup(pw->pw_name);
-- 
GitLab