*/
#include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.187 2005/10/10 10:23:08 djm Exp $");
+RCSID("$OpenBSD: session.c,v 1.192 2006/02/08 12:15:27 stevesk Exp $");
+
+#include <paths.h>
#include "ssh.h"
#include "ssh1.h"
{
setproctitle("%s", authctxt->pw->pw_name);
- /*
- * Cancel the alarm we set to limit the time taken for
- * authentication.
- */
- alarm(0);
- if (startup_pipe != -1) {
- close(startup_pipe);
- startup_pipe = -1;
- }
/* setup the channel layer */
if (!no_port_forwarding_flag && options.allow_tcp_forwarding)
channel_permit_all_opens();
endpwent();
/*
- * Close any extra open file descriptors so that we don\'t have them
+ * Close any extra open file descriptors so that we don't have them
* hanging around in clients. Note that we want to do this after
* initgroups, because at least on Solaris 2.3 it leaves file
* descriptors open.
}
#endif
- /* Change current directory to the user\'s home directory. */
+ /* Change current directory to the user's home directory. */
if (chdir(pw->pw_dir) < 0) {
fprintf(stderr, "Could not chdir to home directory %s: %s\n",
pw->pw_dir, strerror(errno));
if (s->auth_proto != NULL || s->auth_data != NULL) {
error("session_x11_req: session %d: "
- "x11 fowarding already active", s->self);
+ "x11 forwarding already active", s->self);
return 0;
}
s->single_connection = packet_get_char();
{
Channel *c;
- if ((c = channel_lookup(id)) == NULL) {
+ if ((c = channel_by_id(id)) == NULL) {
debug("session_close_x11: x11 channel %d missing", id);
} else {
/* Detach X11 listener */
/* disconnect channel */
debug("session_exit_message: release channel %d", s->chanid);
- s->pid = 0;
/*
* Adjust cleanup callback attachment to send close messages when
session_exit_message(s, status);
if (s->ttyfd != -1)
session_pty_cleanup(s);
+ s->pid = 0;
}
/*