=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/packet.c,v retrieving revision 1.195 retrieving revision 1.196 diff -u -r1.195 -r1.196 --- src/usr.bin/ssh/packet.c 2014/04/29 18:01:49 1.195 +++ src/usr.bin/ssh/packet.c 2014/05/03 17:20:34 1.196 @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.195 2014/04/29 18:01:49 markus Exp $ */ +/* $OpenBSD: packet.c,v 1.196 2014/05/03 17:20:34 markus Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -2035,5 +2035,25 @@ buffer_append(&active_state->input, buf, len); buffer_clear(&backup_state->input); add_recv_bytes(len); + } +} + +/* Reset after_authentication and reset compression in post-auth privsep */ +void +packet_set_postauth(void) +{ + Comp *comp; + int mode; + + debug("%s: called", __func__); + /* This was set in net child, but is not visible in user child */ + active_state->after_authentication = 1; + active_state->rekeying = 0; + for (mode = 0; mode < MODE_MAX; mode++) { + if (active_state->newkeys[mode] == NULL) + continue; + comp = &active_state->newkeys[mode]->comp; + if (comp && comp->enabled) + packet_init_compression(); } }