Mercurial > dropbear
comparison cli-runopts.c @ 958:1bf92da7a2a0
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.
author | iquaba <cooka2011@gmail.com> |
---|---|
date | Wed, 06 Aug 2014 08:48:43 -0500 |
parents | 17d874ae93a1 |
children | a4032b946355 |
comparison
equal
deleted
inserted
replaced
955:36eacc322e00 | 958:1bf92da7a2a0 |
---|---|
682 | 682 |
683 uid = getuid(); | 683 uid = getuid(); |
684 | 684 |
685 pw = getpwuid(uid); | 685 pw = getpwuid(uid); |
686 if (pw == NULL || pw->pw_name == NULL) { | 686 if (pw == NULL || pw->pw_name == NULL) { |
687 dropbear_exit("Unknown own user"); | 687 dropbear_log(LOG_INFO, "Warning: failed to identify current user. Trying anyway."); |
688 } | 688 } |
689 | 689 |
690 cli_opts.own_user = m_strdup(pw->pw_name); | 690 cli_opts.own_user = m_strdup(pw->pw_name); |
691 } | 691 } |
692 | 692 |