diff options
author | 2002-06-22 20:05:27 +0000 | |
---|---|---|
committer | 2002-06-22 20:05:27 +0000 | |
commit | 216d35c045c42ed2a9b4fc1ad7895aef674befed (patch) | |
tree | fc4ed7af0ed6d1d07cd82dd4fdb45c03045d836b | |
parent | gid is u_int (diff) | |
download | wireguard-openbsd-216d35c045c42ed2a9b4fc1ad7895aef674befed.tar.xz wireguard-openbsd-216d35c045c42ed2a9b4fc1ad7895aef674befed.zip |
don't call setsid() if debugging or run from inetd; no "Operation not
permitted" errors now; ok millert@ markus@
-rw-r--r-- | usr.bin/ssh/sshd.c | 4 |
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)); /* |