37
37
38
38
#include "includes.h"
39
39
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
-
49
40
#include <sys/param.h> /* MIN MAX */
50
41
#include <sys/types.h>
51
42
#include <sys/wait.h>
90
81
#include "roaming.h"
91
82
#include "ssherr.h"
92
83
93
- #ifdef WIN32_FIXME
94
- //#define isatty(a) WSHELPisatty(a)
95
- #endif
96
-
97
84
extern ServerOptions options ;
98
85
99
86
/* XXX */
@@ -583,7 +570,6 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
583
570
int type ;
584
571
585
572
debug ("Entering interactive session." );
586
- #ifndef WIN32_FIXME
587
573
/* Initialize the SIGCHLD kludge. */
588
574
child_terminated = 0 ;
589
575
mysignal (SIGCHLD , sigchld_handler );
@@ -593,7 +579,6 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
593
579
signal (SIGINT , sigterm_handler );
594
580
signal (SIGQUIT , sigterm_handler );
595
581
}
596
- #endif
597
582
598
583
/* Initialize our global variables. */
599
584
fdin = fdin_arg ;
@@ -767,7 +752,6 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
767
752
fdin = -1 ;
768
753
769
754
channel_free_all ();
770
- #ifndef WIN32_FIXME
771
755
772
756
/* We no longer want our SIGCHLD handler to be called. */
773
757
mysignal (SIGCHLD , SIG_DFL );
@@ -778,13 +762,6 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
778
762
if (wait_pid != pid )
779
763
error ("Strange, wait returned pid %ld, expected %ld" ,
780
764
(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
788
765
789
766
/* Check if it exited normally. */
790
767
if (WIFEXITED (wait_status )) {
@@ -820,19 +797,9 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
820
797
/* NOTREACHED */
821
798
}
822
799
823
- #ifdef WIN32_FIXME
824
- Session * session_get (int * );
825
- #endif
826
-
827
800
static void
828
801
collect_children (void )
829
802
{
830
- #ifndef WIN32_FIXME
831
-
832
- /*
833
- * Original OpenSSH code.
834
- */
835
-
836
803
pid_t pid ;
837
804
sigset_t oset , nset ;
838
805
int status ;
@@ -850,43 +817,6 @@ collect_children(void)
850
817
child_terminated = 0 ;
851
818
}
852
819
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
890
820
}
891
821
892
822
void
0 commit comments