# HG changeset patch # User Matt Johnston # Date 1643728553 -28800 # Node ID 6b25cdad4783f7d281501b927b34e5c7488cbdda # Parent b89cf71ec40ccd101ed7b464961a3250b247485f Fix regression in non-symlink dropbearmulti Introduced in recent commit for re-exec diff -r b89cf71ec40c -r 6b25cdad4783 dbmulti.c --- a/dbmulti.c Tue Feb 01 22:25:51 2022 +0800 +++ b/dbmulti.c Tue Feb 01 23:15:53 2022 +0800 @@ -62,12 +62,16 @@ int main(int argc, char ** argv) { int i; for (i = 0; i < 2; i++) { + const char* multipath = NULL; + if (i == 1) { + multipath = argv[0]; + } /* Try symlink first, then try as an argument eg "dropbearmulti dbclient host ..." */ if (argc > i) { int match, res; /* figure which form we're being called as */ const char* progname = basename(argv[i]); - res = runprog(argv[0], progname, argc-i, &argv[i], &match); + res = runprog(multipath, progname, argc-i, &argv[i], &match); if (match == DROPBEAR_SUCCESS) { return res; }