Skip to content

Commit 31989d6

Browse files
committed
sshd changes
1 parent d5eefe3 commit 31989d6

File tree

3 files changed

+13
-247
lines changed

3 files changed

+13
-247
lines changed

serverloop.c

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@
3737

3838
#include "includes.h"
3939

40-
/*
41-
* We support only client side kerberos on Windows.
42-
*/
43-
44-
#ifdef WIN32_FIXME
45-
#undef GSSAPI
46-
#undef KRB5
47-
#endif
48-
4940
#include <sys/param.h> /* MIN MAX */
5041
#include <sys/types.h>
5142
#include <sys/wait.h>
@@ -90,10 +81,6 @@
9081
#include "roaming.h"
9182
#include "ssherr.h"
9283

93-
#ifdef WIN32_FIXME
94-
//#define isatty(a) WSHELPisatty(a)
95-
#endif
96-
9784
extern ServerOptions options;
9885

9986
/* XXX */
@@ -583,7 +570,6 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
583570
int type;
584571

585572
debug("Entering interactive session.");
586-
#ifndef WIN32_FIXME
587573
/* Initialize the SIGCHLD kludge. */
588574
child_terminated = 0;
589575
mysignal(SIGCHLD, sigchld_handler);
@@ -593,7 +579,6 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
593579
signal(SIGINT, sigterm_handler);
594580
signal(SIGQUIT, sigterm_handler);
595581
}
596-
#endif
597582

598583
/* Initialize our global variables. */
599584
fdin = fdin_arg;
@@ -767,7 +752,6 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
767752
fdin = -1;
768753

769754
channel_free_all();
770-
#ifndef WIN32_FIXME
771755

772756
/* We no longer want our SIGCHLD handler to be called. */
773757
mysignal(SIGCHLD, SIG_DFL);
@@ -778,13 +762,6 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
778762
if (wait_pid != pid)
779763
error("Strange, wait returned pid %ld, expected %ld",
780764
(long)wait_pid, (long)pid);
781-
#else
782-
if (WaitForSingleObject(pid, 0) == 0) {
783-
wait_status = 0;
784-
} else {
785-
packet_disconnect("wait: %d", GetLastError());
786-
}
787-
#endif
788765

789766
/* Check if it exited normally. */
790767
if (WIFEXITED(wait_status)) {
@@ -820,19 +797,9 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
820797
/* NOTREACHED */
821798
}
822799

823-
#ifdef WIN32_FIXME
824-
Session * session_get(int *);
825-
#endif
826-
827800
static void
828801
collect_children(void)
829802
{
830-
#ifndef WIN32_FIXME
831-
832-
/*
833-
* Original OpenSSH code.
834-
*/
835-
836803
pid_t pid;
837804
sigset_t oset, nset;
838805
int status;
@@ -850,43 +817,6 @@ collect_children(void)
850817
child_terminated = 0;
851818
}
852819
sigprocmask(SIG_SETMASK, &oset, NULL);
853-
#else
854-
855-
/*
856-
* Win32 code.
857-
*/
858-
859-
HANDLE process;
860-
861-
int status = 0;
862-
863-
int i = 0;
864-
865-
Session *s;
866-
867-
do
868-
{
869-
s = session_get(&i);
870-
871-
if ((s != NULL) && (s->pid != 0))
872-
{
873-
if (WaitForSingleObject(s -> pid, 0) == 0)
874-
{
875-
debug("Received SIGCHLD.");
876-
877-
process = s->pid;
878-
879-
session_close_by_pid(s->pid, status);
880-
881-
sw_remove_child(process);
882-
883-
}
884-
}
885-
} while (i > 0);
886-
887-
child_terminated = 0;
888-
889-
#endif
890820
}
891821

892822
void

session.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@
3838
* We support only client side kerberos on Windows.
3939
*/
4040

41-
#ifdef WIN32_FIXME
42-
#undef GSSAPI
43-
#undef KRB5
44-
#define WIN32_USER_AUTH 1
45-
//#define WIN32_PRAGMA_REMCON
46-
#endif
47-
4841
#include <sys/types.h>
4942
#include <sys/param.h>
5043
#ifdef HAVE_SYS_STAT_H

0 commit comments

Comments
 (0)