summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2000-12-02 19:03:54 +0000
committerBen Lindstrom <mouring@eviladmin.org>2000-12-02 19:03:54 +0000
commitc72745afa96a87d41a22804f48499db12d95dfcd (patch)
treef4c529e4effe1a7f0c9b818bd198a305c73efeb9 /sshd.c
parenta15e39b05fa013e16bbe293244cb49b0f27e2901 (diff)
20001203
- (bal) OpenBSD CVS updates: - markus@cvs.openbsd.org 2000/11/30 22:54:31 [channels.c] debug->warn if tried to do -R style fwd w/o client requesting this; ok neils@ - markus@cvs.openbsd.org 2000/11/29 20:39:17 [cipher.c] des_cbc_encrypt -> des_ncbc_encrypt since it already updates the IV - markus@cvs.openbsd.org 2000/11/30 18:33:05 [ssh-agent.c] agents must not dump core, ok niels@ - markus@cvs.openbsd.org 2000/11/30 07:04:02 [ssh.1] T is for both protocols - markus@cvs.openbsd.org 2000/12/01 00:00:51 [ssh.1] typo; from green@FreeBSD.org - markus@cvs.openbsd.org 2000/11/30 07:02:35 [ssh.c] check -T before isatty() - provos@cvs.openbsd.org 2000/11/29 13:51:27 [sshconnect.c] show IP address and hostname when new key is encountered. okay markus@ - markus@cvs.openbsd.org 2000/11/30 22:53:35 [sshconnect.c] disable agent/x11/port fwding if hostkey has changed; ok niels@ - marksu@cvs.openbsd.org 2000/11/29 21:11:59 [sshd.c] sshd -D, startup w/o deamon(), for monitoring scripts or inittab; from handler@sub-rosa.com and eric@urbanrange.com; ok niels@
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sshd.c b/sshd.c
index 4a5f66278..4a01ebec7 100644
--- a/sshd.c
+++ b/sshd.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: sshd.c,v 1.134 2000/11/12 19:50:38 markus Exp $"); 43RCSID("$OpenBSD: sshd.c,v 1.135 2000/11/29 21:11:59 markus Exp $");
44 44
45#include "xmalloc.h" 45#include "xmalloc.h"
46#include "rsa.h" 46#include "rsa.h"
@@ -111,6 +111,9 @@ int debug_flag = 0;
111/* Flag indicating that the daemon is being started from inetd. */ 111/* Flag indicating that the daemon is being started from inetd. */
112int inetd_flag = 0; 112int inetd_flag = 0;
113 113
114/* Flag indicating that sshd should not detach and become a daemon. */
115int no_daemon_flag = 0;
116
114/* debug goes to stderr unless inetd_flag is set */ 117/* debug goes to stderr unless inetd_flag is set */
115int log_stderr = 0; 118int log_stderr = 0;
116 119
@@ -583,7 +586,7 @@ main(int ac, char **av)
583 initialize_server_options(&options); 586 initialize_server_options(&options);
584 587
585 /* Parse command-line arguments. */ 588 /* Parse command-line arguments. */
586 while ((opt = getopt(ac, av, "f:p:b:k:h:g:V:u:diqQ46")) != EOF) { 589 while ((opt = getopt(ac, av, "f:p:b:k:h:g:V:u:dDiqQ46")) != EOF) {
587 switch (opt) { 590 switch (opt) {
588 case '4': 591 case '4':
589 IPv4or6 = AF_INET; 592 IPv4or6 = AF_INET;
@@ -605,6 +608,9 @@ main(int ac, char **av)
605 exit(1); 608 exit(1);
606 } 609 }
607 break; 610 break;
611 case 'D':
612 no_daemon_flag = 1;
613 break;
608 case 'i': 614 case 'i':
609 inetd_flag = 1; 615 inetd_flag = 1;
610 break; 616 break;
@@ -769,7 +775,7 @@ main(int ac, char **av)
769 * from the controlling terminal, and fork. The original process 775 * from the controlling terminal, and fork. The original process
770 * exits. 776 * exits.
771 */ 777 */
772 if (!debug_flag && !inetd_flag) { 778 if (!(debug_flag || inetd_flag || no_daemon_flag)) {
773#ifdef TIOCNOTTY 779#ifdef TIOCNOTTY
774 int fd; 780 int fd;
775#endif /* TIOCNOTTY */ 781#endif /* TIOCNOTTY */