summaryrefslogtreecommitdiffstats
path: root/src/basic/terminal-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-07-10 17:01:47 +0200
committerLennart Poettering <lennart@poettering.net>2024-07-19 11:41:42 +0200
commit9a5e421af5b2cf3f997bd94a8dc8563ba2a3b37c (patch)
tree4948f2684ddd0493cdfb05d161c9a7ed00cecd13 /src/basic/terminal-util.c
parentterminal-util: trivial white space fix (diff)
downloadsystemd-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.c2
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 (;;) {