diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-07-10 17:01:47 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-07-19 11:41:42 +0200 |
commit | 9a5e421af5b2cf3f997bd94a8dc8563ba2a3b37c (patch) | |
tree | 4948f2684ddd0493cdfb05d161c9a7ed00cecd13 /src/basic/terminal-util.c | |
parent | terminal-util: trivial white space fix (diff) | |
download | systemd-9a5e421af5b2cf3f997bd94a8dc8563ba2a3b37c.tar.xz systemd-9a5e421af5b2cf3f997bd94a8dc8563ba2a3b37c.zip |
terminal-util: refuse a few more unexpected open flags in open_terminal()
Diffstat (limited to '')
-rw-r--r-- | src/basic/terminal-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c index e3e0295c8e..345fc15b94 100644 --- a/src/basic/terminal-util.c +++ b/src/basic/terminal-util.c @@ -344,7 +344,7 @@ int open_terminal(const char *name, int mode) { * https://bugs.launchpad.net/ubuntu/+source/linux/+bug/554172/comments/245 */ - if (mode & O_CREAT) + if ((mode & (O_CREAT|O_PATH|O_DIRECTORY|O_TMPFILE)) != 0) return -EINVAL; for (;;) { |