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 3030dad1..a316b1e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
20001014
- (djm) Don't accept PAM_PROMPT_ECHO_ON messages during initial auth
+ - (djm) Revert SSH2 serverloop hack, will find a better way.
20001007
- (stevesk) Print PAM return value in PAM log messages to aid
diff --git a/serverloop.c b/serverloop.c
index 8ee93b3b..25320348 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -676,8 +676,6 @@ server_loop2(void)
session_close_by_pid(pid, status);
child_terminated = 0;
signal(SIGCHLD, sigchld_handler2);
- if (used_sessions() == 0)
- break;
}
channel_after_select(&readset, &writeset);
process_input(&readset);
diff --git a/session.c b/session.c
index 0aa5138c..0b31d5f1 100644
--- a/session.c
+++ b/session.c
@@ -150,7 +150,6 @@ char *original_command = NULL;
/* data */
#define MAX_SESSIONS 10
Session sessions[MAX_SESSIONS];
-static int num_used_sessions;
#ifdef WITH_AIXAUTHENTICATE
/* AIX's lastlogin message, set in auth1.c */
@@ -1438,7 +1437,6 @@ session_new(void)
sessions[i].used = 0;
sessions[i].self = i;
}
- num_used_sessions = 0;
did_init = 1;
}
for(i = 0; i < MAX_SESSIONS; i++) {
@@ -1457,8 +1455,7 @@ session_new(void)
s->auth_proto = NULL;
s->used = 1;
s->pw = NULL;
- num_used_sessions++;
- debug("session_new: session %d (%d used)", i, num_used_sessions);
+ debug("session_new: session %d", i);
return s;
}
}
@@ -1871,7 +1868,6 @@ session_close(Session *s)
session_pty_cleanup(s);
session_free(s);
session_proctitle(s);
- num_used_sessions--;
}
void
@@ -1917,11 +1913,6 @@ session_close_by_channel(int id, void *arg)
}
}
-int used_sessions(void)
-{
- return(num_used_sessions);
-}
-
char *
session_tty_list(void)
{
diff --git a/session.h b/session.h
index 69d3b7dd..bce99f77 100644
--- a/session.h
+++ b/session.h
@@ -33,6 +33,5 @@ int session_open(int id);
void session_input_channel_req(int id, void *arg);
void session_close_by_pid(pid_t pid, int status);
void session_close_by_channel(int id, void *arg);
-int used_sessions(void);
#endif