summaryrefslogtreecommitdiffhomepage
path: root/svr-chansession.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-04-08 01:50:52 -0400
committerMike Frysinger <vapier@gentoo.org>2012-04-08 01:50:52 -0400
commitc957edbe759ba8d708a882dcb9ab3b2aa1a72ad1 (patch)
tree36beaf972edc2571688c80a213848939aadc2f06 /svr-chansession.c
parent33ae2be52e57d407df5cdfd836f66a8210a54e5b (diff)
check for fork() and not __uClinux__
Diffstat (limited to 'svr-chansession.c')
-rw-r--r--svr-chansession.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/svr-chansession.c b/svr-chansession.c
index 9fd49c1..198dbe6 100644
--- a/svr-chansession.c
+++ b/svr-chansession.c
@@ -658,7 +658,7 @@ static int sessioncommand(struct Channel *channel, struct ChanSess *chansess,
/* 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 @@ static int sessioncommand(struct Channel *channel, struct ChanSess *chansess,
ret = ptycommand(channel, chansess);
}
-#ifndef __uClinux__
+#ifdef HAVE_FORK
m_free(chansess->connection_string);
#endif
@@ -745,7 +745,7 @@ static int ptycommand(struct Channel *channel, struct ChanSess *chansess) {
return DROPBEAR_FAILURE;
}
-#ifdef __uClinux__
+#ifndef HAVE_FORK
pid = vfork();
#else
pid = fork();
@@ -863,9 +863,9 @@ static void execchild(void *user_data) {
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;