Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F158030157
D8290.id22798.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8290.id22798.diff
View Options
Index: bin/dd/dd.c
===================================================================
--- bin/dd/dd.c
+++ bin/dd/dd.c
@@ -142,8 +142,6 @@
in.fd = open(in.name, O_RDONLY, 0);
if (in.fd == -1)
err(1, "%s", in.name);
- if (caph_limit_stdin() == -1)
- err(1, "unable to limit capability rights");
}
getfdtype(&in);
@@ -176,8 +174,6 @@
}
if (out.fd == -1)
err(1, "%s", out.name);
- if (caph_limit_stdout() == -1)
- err(1, "unable to limit capability rights");
}
getfdtype(&out);
@@ -188,6 +184,16 @@
errno != ENOSYS)
err(1, "unable to limit capability rights");
+ if (in.fd != STDIN_FILENO && out.fd != STDIN_FILENO) {
+ if (caph_limit_stdin() == -1)
+ err(1, "unable to limit capability rights");
+ }
+
+ if (in.fd != STDOUT_FILENO && out.fd != STDOUT_FILENO) {
+ if (caph_limit_stdout() == -1)
+ err(1, "unable to limit capability rights");
+ }
+
if (in.fd != STDERR_FILENO && out.fd != STDERR_FILENO) {
if (caph_limit_stderr() == -1)
err(1, "unable to limit capability rights");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 28, 4:39 PM (18 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33589412
Default Alt Text
D8290.id22798.diff (1 KB)
Attached To
Mode
D8290: Capsicumise bhyve
Attached
Detach File
Event Timeline
Log In to Comment