svr_getopts should either support bundling or fail if bundling is used

Matt Johnston matt at ucc.asn.au
Thu Oct 22 08:02:01 AWST 2015


On Thu 22/10/2015, at 1:21 am, Guilhem Moulin <guilhem at fripost.org> wrote:
> On Wed, 21 Oct 2015 at 22:11:43 +0800, Matt Johnston wrote:
>> Thanks for pointing that out, I’ve made -sjk fail rather than be
>> dropped silently.
> 
> Thanks.  However on second thought, the downside of this solution is
> that it might render remote systems unreachable after upgrade (at least
> for the users not reading changelogs or distrib NEWS files).  Worse, it
> might not be noticed before a reboot, since upgrading typically doesn't
> kill existing SSH connections. 

Even enabling bundling could result in dropbear failing to start if there were trailing options that weren't valid. Perhaps I should just make the failure a warning instead, it'll be visible on "service dropbear restart"? 'Ignored extra trailing "jk" of "-sjk"'

> By the way, out of
> curiosity, is there a reason why you're not using getopt()?  It's POSIX
> after all, and you're already using it for scp.

I think I looked into it a long time ago and it resulted in a larger static binary size. It might be worth revisiting though. Backward compatibility would still be an issue.

Cheers,
Matt


More information about the Dropbear mailing list