From 6029432ec5b07eecdd1fc96cb3110d77aa7faa36 Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Mon, 26 Mar 2001 05:38:25 +0000 Subject: [PATCH] - djm@cvs.openbsd.org 2001/03/25 00:01:34 [session.c] shorten; ok markus@ --- ChangeLog | 6 +++++- session.c | 13 ++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20e4efb47..b5f37e4af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ - Attempt sync with sshlogin.c w/ OpenBSD (mainly CVS ID) - Fix pointer issues in waitpid() and wait() replaces. Patch by Lutz Jaenicke + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2001/03/25 00:01:34 + [session.c] + shorten; ok markus@ 20010324 - Fixed permissions ssh-keyscan. Thanks to Christopher Linn . @@ -4710,4 +4714,4 @@ - Wrote replacements for strlcpy and mkdtemp - Released 1.0pre1 -$Id: ChangeLog,v 1.1017 2001/03/26 05:35:33 mouring Exp $ +$Id: ChangeLog,v 1.1018 2001/03/26 05:38:25 mouring Exp $ diff --git a/session.c b/session.c index af5c836bc..70d3e3278 100644 --- a/session.c +++ b/session.c @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.67 2001/03/23 14:28:32 markus Exp $"); +RCSID("$OpenBSD: session.c,v 1.68 2001/03/25 00:01:34 djm Exp $"); #include "ssh.h" #include "ssh1.h" @@ -1510,20 +1510,11 @@ session_new(void) for(i = 0; i < MAX_SESSIONS; i++) { Session *s = &sessions[i]; if (! s->used) { - s->pid = 0; - s->is_subsystem = 0; + memset(s, 0, sizeof(*s)); s->chanid = -1; s->ptyfd = -1; s->ttyfd = -1; - s->tty[0] = '\0'; - s->term = NULL; - s->pw = NULL; - s->display = NULL; - s->screen = 0; - s->auth_data = NULL; - s->auth_proto = NULL; s->used = 1; - s->pw = NULL; debug("session_new: session %d", i); return s; }