diff options
author | Damien Miller <djm@mindrot.org> | 2000-10-14 12:33:48 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-10-14 12:33:48 +1100 |
commit | 15b2952cd83522051bafd23766ca1b75edfed124 (patch) | |
tree | 85a8e71d49c498b1eafe47762008fc6643d34b24 | |
parent | 60819b44bdd81b08844a29c9c70c32b19594b40b (diff) |
- (djm) Revert SSH2 serverloop hack, will find a better way.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | serverloop.c | 2 | ||||
-rw-r--r-- | session.c | 11 | ||||
-rw-r--r-- | session.h | 1 |
4 files changed, 2 insertions, 13 deletions
@@ -1,5 +1,6 @@ | |||
1 | 20001014 | 1 | 20001014 |
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 | ||
4 | 20001007 | 5 | 20001007 |
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); |
@@ -150,7 +150,6 @@ char *original_command = NULL; | |||
150 | /* data */ | 150 | /* data */ |
151 | #define MAX_SESSIONS 10 | 151 | #define MAX_SESSIONS 10 |
152 | Session sessions[MAX_SESSIONS]; | 152 | Session sessions[MAX_SESSIONS]; |
153 | static 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 | ||
1877 | void | 1873 | void |
@@ -1917,11 +1913,6 @@ session_close_by_channel(int id, void *arg) | |||
1917 | } | 1913 | } |
1918 | } | 1914 | } |
1919 | 1915 | ||
1920 | int used_sessions(void) | ||
1921 | { | ||
1922 | return(num_used_sessions); | ||
1923 | } | ||
1924 | |||
1925 | char * | 1916 | char * |
1926 | session_tty_list(void) | 1917 | session_tty_list(void) |
1927 | { | 1918 | { |
@@ -33,6 +33,5 @@ int session_open(int id); | |||
33 | void session_input_channel_req(int id, void *arg); | 33 | void session_input_channel_req(int id, void *arg); |
34 | void session_close_by_pid(pid_t pid, int status); | 34 | void session_close_by_pid(pid_t pid, int status); |
35 | void session_close_by_channel(int id, void *arg); | 35 | void session_close_by_channel(int id, void *arg); |
36 | int used_sessions(void); | ||
37 | 36 | ||
38 | #endif | 37 | #endif |