Mercurial > dropbear
diff svr-chansession.c @ 666:0ad95abf8d3c
check for fork() and not __uClinux__
author | Mike Frysinger <vapier@gentoo.org> |
---|---|
date | Sun, 08 Apr 2012 01:50:52 -0400 |
parents | d4d0279710b9 |
children | fc7ae88e63b3 |
line wrap: on
line diff
--- a/svr-chansession.c Sun Apr 08 02:06:54 2012 -0400 +++ b/svr-chansession.c Sun Apr 08 01:50:52 2012 -0400 @@ -658,7 +658,7 @@ /* uClinux will vfork(), so there'll be a race as connection_string is freed below. */ -#ifndef __uClinux__ +#ifdef HAVE_FORK chansess->connection_string = make_connection_string(); #endif @@ -670,7 +670,7 @@ ret = ptycommand(channel, chansess); } -#ifndef __uClinux__ +#ifdef HAVE_FORK m_free(chansess->connection_string); #endif @@ -745,7 +745,7 @@ return DROPBEAR_FAILURE; } -#ifdef __uClinux__ +#ifndef HAVE_FORK pid = vfork(); #else pid = fork(); @@ -863,9 +863,9 @@ struct ChanSess *chansess = user_data; char *usershell = NULL; - /* with uClinux we'll have vfork()ed, so don't want to overwrite the - * hostkey. can't think of a workaround to clear it */ -#ifndef __uClinux__ + /* with uClinux we'll have vfork()ed, so don't want to overwrite the + * hostkey. can't think of a workaround to clear it */ +#ifdef HAVE_FORK /* wipe the hostkey */ sign_key_free(svr_opts.hostkey); svr_opts.hostkey = NULL;