We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3dbded8 commit 1d08e24Copy full SHA for 1d08e24
src/seccomp/policy/DefaultPolicy.cc
@@ -188,6 +188,16 @@ void DefaultPolicy::addFileSystemAccessRules(bool readOnly) {
188
"openat",
189
action::ActionAllow(),
190
(filter::SyscallArg(2) & (O_RDWR | O_WRONLY)) == 0));
191
+ for (const auto& mode: {O_RDWR, O_WRONLY}) {
192
+ rules_.emplace_back(SeccompRule(
193
+ "open",
194
+ action::ActionErrno(EROFS),
195
+ (filter::SyscallArg(1) & mode) == mode));
196
197
+ "openat",
198
199
+ (filter::SyscallArg(2) & mode) == mode));
200
+ }
201
202
for (const auto& syscall: {
203
"unlink",
0 commit comments