terminal-util: refuse a few more unexpected open flags in open_terminal()

This commit is contained in:
Lennart Poettering
2024-07-19 11:41:42 +02:00
parent 845be16ffd
commit 9a5e421af5
+1 -1
View File
@@ -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 (;;) {