summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-10-20 11:43:38 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-10-20 11:43:38 +0800
commit49933d6daf80310790b898e8a4dcce3cab88c548 (patch)
treeaa54e1fed3552ee354f8cc8c9ea9a33be0d9fd29
parent496f3dbdc3df5586ea1f84ca6b014ba81ebeadbe (diff)
downloadpttbbs-49933d6daf80310790b898e8a4dcce3cab88c548.tar
pttbbs-49933d6daf80310790b898e8a4dcce3cab88c548.tar.gz
pttbbs-49933d6daf80310790b898e8a4dcce3cab88c548.tar.bz2
pttbbs-49933d6daf80310790b898e8a4dcce3cab88c548.tar.lz
pttbbs-49933d6daf80310790b898e8a4dcce3cab88c548.tar.xz
pttbbs-49933d6daf80310790b898e8a4dcce3cab88c548.tar.zst
pttbbs-49933d6daf80310790b898e8a4dcce3cab88c548.zip
unsetenv before daemon fork
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2269 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/mbbsd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 7ccf5909..ea541e5b 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -69,6 +69,9 @@ start_daemon()
close(fd);
}
+ if(getenv("SSH_CLIENT"))
+ unsetenv("SSH_CLIENT");
+
/*
* rocker.011018: we don't need to remember original tty, so request a
* new session id
@@ -84,9 +87,6 @@ start_daemon()
exit(0);
}
#endif
-
- if(getenv("SSH_CLIENT"))
- unsetenv("SSH_CLIENT");
}
static void