Skip to content

Commit b199edd

Browse files
committed
make working directory only be accessible by user
This makes /tmp/tmux-NNNN-copycat/ only accessible by the current user of the tmux session. While not important on single user systems, this could be a concern on multi-user servers, where using tmux-copycat would capture the scrollback text of the current terminal to a file that could be read by other users, especially if you don't have a strict umask.
1 parent dd24d36 commit b199edd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/copycat_generate_results.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ generate_copycat_file() {
3131
local scrollback_filename="$(get_scrollback_filename)"
3232
local copycat_filename="$(get_copycat_filename)"
3333
mkdir -p "$(_get_tmp_dir)"
34+
chmod 0700 "$(_get_tmp_dir)"
3435
capture_pane "$scrollback_filename"
3536
reverse_and_create_copycat_file "$scrollback_filename" "$copycat_filename" "$grep_pattern"
3637
}

0 commit comments

Comments
 (0)