summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/sshd.c
diff options
context:
space:
mode:
authorKevin Steves <stevesk@cvs.openbsd.org>2002-06-22 20:05:28 +0000
committerKevin Steves <stevesk@cvs.openbsd.org>2002-06-22 20:05:28 +0000
commitc70b5b7c61b3b4bb78374b1110ee8b25656434ad (patch)
tree96bbb9f2f5b5e1167481ad002863ab4dce5ba47d /usr.bin/ssh/sshd.c
parentd9284ecb5e436d7ce9885574b0abafa1730367e3 (diff)
don't call setsid() if debugging or run from inetd; no "Operation not
permitted" errors now; ok millert@ markus@
Diffstat (limited to 'usr.bin/ssh/sshd.c')
-rw-r--r--usr.bin/ssh/sshd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index b8671e966a8..df28a63d58e 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -42,7 +42,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.247 2002/06/22 16:40:19 stevesk Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.248 2002/06/22 20:05:27 stevesk Exp $");
#include <openssl/dh.h>
#include <openssl/bn.h>
@@ -1312,7 +1312,7 @@ main(int ac, char **av)
* setlogin() affects the entire process group. We don't
* want the child to be able to affect the parent.
*/
- if (setsid() < 0)
+ if (!debug_flag && !inetd_flag && setsid() < 0)
error("setsid: %.100s", strerror(errno));
/*