projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21ab3f5
)
core/exec-invoke: reopen OpenFile= fds with O_NOCTTY
author
Mike Yuan
<me@yhndnzj.com>
Mon, 24 Jun 2024 16:26:15 +0000
(18:26 +0200)
committer
Mike Yuan
<me@yhndnzj.com>
Mon, 24 Jun 2024 16:31:36 +0000
(18:31 +0200)
src/core/exec-invoke.c
patch
|
blob
|
history
diff --git
a/src/core/exec-invoke.c
b/src/core/exec-invoke.c
index 45f1539f7580eb43cffb888992854f98e73d546f..254f014141e6d97faba239d744d52db72a0adf07 100644
(file)
--- a/
src/core/exec-invoke.c
+++ b/
src/core/exec-invoke.c
@@
-3776,7
+3776,7
@@
static int get_open_file_fd(const ExecContext *c, const ExecParameters *p, const
else if (FLAGS_SET(of->flags, OPENFILE_TRUNCATE))
flags |= O_TRUNC;
- fd = fd_reopen(ofd, flags
|
O_CLOEXEC);
+ fd = fd_reopen(ofd, flags
|O_NOCTTY|
O_CLOEXEC);
if (fd < 0)
return log_exec_error_errno(c, p, fd, "Failed to reopen file '%s': %m", of->path);