mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 02:24:06 +00:00
Because pledge(2) does not allow us to pass directory file descriptors
around, we can't use file descriptors for the working directory because we will be unable to pass it to a privileged process to tell it where to read or write files or spawn children. So move tmux back to using strings for the current working directory. We try to check it exists with access() when it is set but ultimately fall back to ~ if it fails at time of use (or / if that fails too).
This commit is contained in:
parent
45f3cea263
commit
01defc9f49
18 changed files with 136 additions and 139 deletions
|
|
@ -80,7 +80,7 @@ cmd_run_shell_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||
struct winlink *wl = NULL;
|
||||
struct window_pane *wp = NULL;
|
||||
struct format_tree *ft;
|
||||
int cwd;
|
||||
const char *cwd;
|
||||
|
||||
if (args_has(args, 't')) {
|
||||
wl = cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp);
|
||||
|
|
@ -97,7 +97,7 @@ cmd_run_shell_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||
else if (s != NULL)
|
||||
cwd = s->cwd;
|
||||
else
|
||||
cwd = -1;
|
||||
cwd = NULL;
|
||||
}
|
||||
|
||||
ft = format_create();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue