Commit Graph

24 Commits

Author SHA1 Message Date
Thomas Adam
9d8131c190 Merge branch 'obsd-master' 2023-04-27 19:16:08 +01:00
nicm
bcafe51378 Make the check if printing is allowed the same as writing which is less
confusing.
2023-04-17 17:58:35 +00:00
Thomas Adam
21e00e4635 Merge branch 'obsd-master' 2023-01-06 09:02:00 +00:00
nicm
09afc6c8ee If a pane is killed, cancel reading from the file. GitHub issue 3422. 2023-01-06 07:09:27 +00:00
Thomas Adam
f7b30ed3d4 Merge branch 'obsd-master' 2022-08-24 10:01:13 +01:00
nicm
e867528209 Check for NULL returns from bufferevent_new. 2022-08-24 07:22:30 +00:00
Thomas Adam
03054598df Merge branch 'obsd-master' into master 2021-08-22 16:01:19 +01:00
nicm
72d905f32c Do not double free expanded path in source-file, also remove some
unnecessary assignments.
2021-08-22 13:48:29 +00:00
nicm
cfc7c9cf24 Fire check callback after cleaning up event so it does not get stuck,
from Jeongho Jang in GitHub issue 2695.
2021-06-10 07:51:43 +00:00
Nicholas Marriott
8da4573088 Fire check callback after cleaning up event so it does not get stuck, from
Jeongho Jang in GitHub issue 2695.
2021-05-03 10:49:51 +01:00
Thomas Adam
ce5de76592 Merge branch 'obsd-master' into master 2021-02-17 09:58:12 +00:00
nicm
632636dba5 Do not care about the server socket closing if exiting anyway. 2021-02-12 06:52:48 +00:00
nicm
2b58c226db Add a couple of helper functions, and flush imsgs on exit. 2021-02-11 09:39:29 +00:00
nicm
e40831a002 Move file handling protocol stuff all into file.c so it can be reused
more easily.
2021-02-11 08:28:45 +00:00
Thomas Adam
a4cb700269 Merge branch 'obsd-master' 2020-05-26 14:02:15 +01:00
nicm
ea610a3119 Pass the stdout file descriptor from the client as well as stdin and use
them for control clients directly instead of passing everything via the
client.
2020-05-26 08:41:47 +00:00
nicm
aa7dccf8e1 imsg.h needs uio.h, pointed out by deraadt 2020-05-08 14:15:11 +00:00
Nicholas Marriott
846b99e0cb Portable does not need sys/queue.h. 2020-05-03 10:49:16 +01:00
Nicholas Marriott
479d411dda Remove imsg.h. 2019-12-16 20:01:26 +00:00
nicm
1bdd4828bd If /dev/fd/X is a symlink and realpath() expands symlinks, /dev/fd/X
ends up pointing to the wrong place before it is passed to the client.
The path is only used internally so there is no real need for
realpath(), remove it and move the get_path function to file.c where all
the callers are.
2019-12-16 16:39:03 +00:00
nicm
b4520aaf2c Need to include message size in the maximum buffer calculation. 2019-12-16 16:09:28 +00:00
nicm
eaa58d28dc Instead of using large buffers in imsgs, add the data or path onto the end. 2019-12-16 15:48:50 +00:00
nicm
268f2b047a Do not check if client is dead if it is NULL. 2019-12-12 11:51:32 +00:00
nicm
c284ebe0ad Rewrite the code for reading and writing files. Now, if the client is
not attached, the server process asks it to open the file, similar to
how works for stdin, stdout, stderr. This makes special files like
/dev/fd/X work (used by some shells). stdin, stdout and stderr and
control mode are now just special cases of the same mechanism. This will
also make it easier to use for other commands that read files such as
source-file.
2019-12-12 11:39:56 +00:00