From acedc2dcf2673cf199ba1ba08705dc8fd270c0c7 Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Wed, 23 Sep 2009 14:39:30 +0000 Subject: Sync OpenBSD patchset 345: Don't attempt to open() the tty path, rely on the client sending its stdin fd with imsg and fatal if it doesn't, then set the FD_CLOEXEC flag in tty_init instead of tty_open to prevent them leaking into child processes if any are created between the two calls. This bumps the protocol version, so the tmux server should be killed before upgrading. --- tmux.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index e709a30b..50b306d4 100644 --- a/tmux.h +++ b/tmux.h @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.450 2009-09-22 14:22:21 tcunha Exp $ */ +/* $Id: tmux.h,v 1.451 2009-09-23 14:39:30 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -21,7 +21,7 @@ #include "config.h" -#define PROTOCOL_VERSION 1 +#define PROTOCOL_VERSION 2 #include #include @@ -326,8 +326,6 @@ struct msg_command_data { }; struct msg_identify_data { - char tty[TTY_NAME_MAX]; - char cwd[MAXPATHLEN]; char term[TERMINAL_LENGTH]; @@ -1198,7 +1196,7 @@ void tty_putcode2(struct tty *, enum tty_code_code, int, int); void tty_puts(struct tty *, const char *); void tty_putc(struct tty *, u_char); void tty_pututf8(struct tty *, const struct grid_utf8 *); -void tty_init(struct tty *, int, char *, char *); +void tty_init(struct tty *, int, char *); void tty_start_tty(struct tty *); void tty_stop_tty(struct tty *); void tty_detect_utf8(struct tty *); -- cgit