summaryrefslogtreecommitdiff
path: root/session.h
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2023-01-06 02:39:59 +0000
committerDamien Miller <djm@mindrot.org>2023-01-06 16:21:39 +1100
commitc60438158ad4b2f83d8504257aba1be7d0b0bb4b (patch)
tree4448c18b7d781578d8d5fc8c7335c5b7e1c1078e /session.h
parentd478cdc7ad6edd4b1bcd1e86fb2f23194ff33d5a (diff)
downloadopenssh-git-c60438158ad4b2f83d8504257aba1be7d0b0bb4b.tar.gz
upstream: Add channel_force_close()
This will forcibly close an open channel by simulating read/write errors, draining the IO buffers and calling the detach function. Previously the detach function was only ever called during channel garbage collection, but there was no way to signal the user of a channel (e.g. session.c) that its channel was being closed deliberately (vs. by the usual state-machine logic). So this adds an extra "force" argument to the channel cleanup callback to indicate this condition. ok markus dtucker OpenBSD-Commit-ID: 23052707a42bdc62fda2508636e624afd466324b
Diffstat (limited to 'session.h')
-rw-r--r--session.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/session.h b/session.h
index ce59dabd..344a1ddf 100644
--- a/session.h
+++ b/session.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.h,v 1.36 2018/10/02 12:40:07 djm Exp $ */
+/* $OpenBSD: session.h,v 1.37 2023/01/06 02:39:59 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -70,7 +70,7 @@ int session_open(Authctxt *, int);
void session_unused(int);
int session_input_channel_req(struct ssh *, Channel *, const char *);
void session_close_by_pid(struct ssh *ssh, pid_t, int);
-void session_close_by_channel(struct ssh *, int, void *);
+void session_close_by_channel(struct ssh *, int, int, void *);
void session_destroy_all(struct ssh *, void (*)(Session *));
void session_pty_cleanup2(Session *);