summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2022-05-30 12:48:58 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2022-05-30 12:48:58 +0000
commitd714f410e25754dc460ad0b3d872eba69e01ea80 (patch)
tree5c898a472ef1025b53e233820ba674f15ba25a8f /usr.bin/tmux/cmd.c
parent143de875fecef90446759e5350b46b9bffdd263d (diff)
Add an ACL list for users connecting to the tmux socket. Users may be
forbidden from attaching, forced to attach read-only, or allowed to attach read-write. A new command, server-access, configures the list. tmux gets the user using getpeereid(3) of the client socket. Users must still configure file system permissions manually. From Dallas Lyons and others.
Diffstat (limited to 'usr.bin/tmux/cmd.c')
-rw-r--r--usr.bin/tmux/cmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c
index 5245871fe53..bd6a0907575 100644
--- a/usr.bin/tmux/cmd.c
+++ b/usr.bin/tmux/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.173 2021/09/09 21:55:03 nicm Exp $ */
+/* $OpenBSD: cmd.c,v 1.174 2022/05/30 12:48:57 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -96,6 +96,7 @@ extern const struct cmd_entry cmd_select_pane_entry;
extern const struct cmd_entry cmd_select_window_entry;
extern const struct cmd_entry cmd_send_keys_entry;
extern const struct cmd_entry cmd_send_prefix_entry;
+extern const struct cmd_entry cmd_server_access_entry;
extern const struct cmd_entry cmd_set_buffer_entry;
extern const struct cmd_entry cmd_set_environment_entry;
extern const struct cmd_entry cmd_set_hook_entry;
@@ -188,6 +189,7 @@ const struct cmd_entry *cmd_table[] = {
&cmd_select_window_entry,
&cmd_send_keys_entry,
&cmd_send_prefix_entry,
+ &cmd_server_access_entry,
&cmd_set_buffer_entry,
&cmd_set_environment_entry,
&cmd_set_hook_entry,