summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-10-14 12:33:48 +1100
committerDamien Miller <djm@mindrot.org>2000-10-14 12:33:48 +1100
commit15b2952cd83522051bafd23766ca1b75edfed124 (patch)
tree85a8e71d49c498b1eafe47762008fc6643d34b24
parent60819b44bdd81b08844a29c9c70c32b19594b40b (diff)
- (djm) Revert SSH2 serverloop hack, will find a better way.
-rw-r--r--ChangeLog1
-rw-r--r--serverloop.c2
-rw-r--r--session.c11
-rw-r--r--session.h1
4 files changed, 2 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 3030dad13..a316b1e9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
120001014 120001014
2 - (djm) Don't accept PAM_PROMPT_ECHO_ON messages during initial auth 2 - (djm) Don't accept PAM_PROMPT_ECHO_ON messages during initial auth
3 - (djm) Revert SSH2 serverloop hack, will find a better way.
3 4
420001007 520001007
5 - (stevesk) Print PAM return value in PAM log messages to aid 6 - (stevesk) Print PAM return value in PAM log messages to aid
diff --git a/serverloop.c b/serverloop.c
index 8ee93b3b1..25320348b 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -676,8 +676,6 @@ server_loop2(void)
676 session_close_by_pid(pid, status); 676 session_close_by_pid(pid, status);
677 child_terminated = 0; 677 child_terminated = 0;
678 signal(SIGCHLD, sigchld_handler2); 678 signal(SIGCHLD, sigchld_handler2);
679 if (used_sessions() == 0)
680 break;
681 } 679 }
682 channel_after_select(&readset, &writeset); 680 channel_after_select(&readset, &writeset);
683 process_input(&readset); 681 process_input(&readset);
diff --git a/session.c b/session.c
index 0aa5138c6..0b31d5f19 100644
--- a/session.c
+++ b/session.c
@@ -150,7 +150,6 @@ char *original_command = NULL;
150/* data */ 150/* data */
151#define MAX_SESSIONS 10 151#define MAX_SESSIONS 10
152Session sessions[MAX_SESSIONS]; 152Session sessions[MAX_SESSIONS];
153static int num_used_sessions;
154 153
155#ifdef WITH_AIXAUTHENTICATE 154#ifdef WITH_AIXAUTHENTICATE
156/* AIX's lastlogin message, set in auth1.c */ 155/* AIX's lastlogin message, set in auth1.c */
@@ -1438,7 +1437,6 @@ session_new(void)
1438 sessions[i].used = 0; 1437 sessions[i].used = 0;
1439 sessions[i].self = i; 1438 sessions[i].self = i;
1440 } 1439 }
1441 num_used_sessions = 0;
1442 did_init = 1; 1440 did_init = 1;
1443 } 1441 }
1444 for(i = 0; i < MAX_SESSIONS; i++) { 1442 for(i = 0; i < MAX_SESSIONS; i++) {
@@ -1457,8 +1455,7 @@ session_new(void)
1457 s->auth_proto = NULL; 1455 s->auth_proto = NULL;
1458 s->used = 1; 1456 s->used = 1;
1459 s->pw = NULL; 1457 s->pw = NULL;
1460 num_used_sessions++; 1458 debug("session_new: session %d", i);
1461 debug("session_new: session %d (%d used)", i, num_used_sessions);
1462 return s; 1459 return s;
1463 } 1460 }
1464 } 1461 }
@@ -1871,7 +1868,6 @@ session_close(Session *s)
1871 session_pty_cleanup(s); 1868 session_pty_cleanup(s);
1872 session_free(s); 1869 session_free(s);
1873 session_proctitle(s); 1870 session_proctitle(s);
1874 num_used_sessions--;
1875} 1871}
1876 1872
1877void 1873void
@@ -1917,11 +1913,6 @@ session_close_by_channel(int id, void *arg)
1917 } 1913 }
1918} 1914}
1919 1915
1920int used_sessions(void)
1921{
1922 return(num_used_sessions);
1923}
1924
1925char * 1916char *
1926session_tty_list(void) 1917session_tty_list(void)
1927{ 1918{
diff --git a/session.h b/session.h
index 69d3b7dd4..bce99f77c 100644
--- a/session.h
+++ b/session.h
@@ -33,6 +33,5 @@ int session_open(int id);
33void session_input_channel_req(int id, void *arg); 33void session_input_channel_req(int id, void *arg);
34void session_close_by_pid(pid_t pid, int status); 34void session_close_by_pid(pid_t pid, int status);
35void session_close_by_channel(int id, void *arg); 35void session_close_by_channel(int id, void *arg);
36int used_sessions(void);
37 36
38#endif 37#endif