Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145952709
D12985.id34905.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
D12985.id34905.diff
View Options
Index: usr.sbin/bhyve/uart_emul.c
===================================================================
--- usr.sbin/bhyve/uart_emul.c
+++ usr.sbin/bhyve/uart_emul.c
@@ -678,20 +678,24 @@
if (retval == 0)
retval = fcntl(sc->tty.fd, F_SETFL, O_NONBLOCK);
+ if (retval == 0) {
#ifndef WITHOUT_CAPSICUM
- cap_rights_init(&rights, CAP_EVENT, CAP_IOCTL, CAP_READ, CAP_WRITE);
- if (cap_rights_limit(sc->tty.fd, &rights) == -1 && errno != ENOSYS)
- errx(EX_OSERR, "Unable to apply rights for sandbox");
- if (cap_ioctls_limit(sc->tty.fd, cmds, nitems(cmds)) == -1 && errno != ENOSYS)
- errx(EX_OSERR, "Unable to apply rights for sandbox");
- if (!uart_stdio) {
- if (caph_limit_stdin() == -1 && errno != ENOSYS)
+ cap_rights_init(&rights, CAP_EVENT, CAP_IOCTL, CAP_READ,
+ CAP_WRITE);
+ if (cap_rights_limit(sc->tty.fd, &rights) == -1 &&
+ errno != ENOSYS)
errx(EX_OSERR, "Unable to apply rights for sandbox");
- }
+ if (cap_ioctls_limit(sc->tty.fd, cmds, nitems(cmds)) == -1 &&
+ errno != ENOSYS)
+ errx(EX_OSERR, "Unable to apply rights for sandbox");
+ if (!uart_stdio) {
+ if (caph_limit_stdin() == -1 && errno != ENOSYS)
+ errx(EX_OSERR,
+ "Unable to apply rights for sandbox");
+ }
#endif
-
- if (retval == 0)
uart_opentty(sc);
+ }
return (retval);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 27, 11:54 AM (1 m, 22 s ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29017161
Default Alt Text
D12985.id34905.diff (1 KB)
Attached To
Mode
D12985: bhyve: don't try to capsicumise after failed open
Attached
Detach File
Event Timeline
Log In to Comment