aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssh/sandbox-capsicum.c
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2014-02-04 21:48:09 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2014-02-04 21:48:09 +0000
commitd62289d0137d1f51efdfe3a35c7437effa614467 (patch)
tree27b816582d4aac4ae54efa5ef9e8e2615787abf2 /crypto/openssh/sandbox-capsicum.c
parent49133c6d52243e3666e4eabdc4bf81b26b32ca7c (diff)
downloadsrc-d62289d0137d1f51efdfe3a35c7437effa614467.tar.gz
src-d62289d0137d1f51efdfe3a35c7437effa614467.zip
Notes
Diffstat (limited to 'crypto/openssh/sandbox-capsicum.c')
-rw-r--r--crypto/openssh/sandbox-capsicum.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/openssh/sandbox-capsicum.c b/crypto/openssh/sandbox-capsicum.c
index ee2a7e79eafa..6064514ef858 100644
--- a/crypto/openssh/sandbox-capsicum.c
+++ b/crypto/openssh/sandbox-capsicum.c
@@ -94,10 +94,12 @@ ssh_sandbox_child(struct ssh_sandbox *box)
fatal("can't limit stderr: %m");
cap_rights_init(&rights, CAP_READ, CAP_WRITE);
- if (cap_rights_limit(box->monitor->m_recvfd, &rights) == -1)
+ if (cap_rights_limit(box->monitor->m_recvfd, &rights) == -1 &&
+ errno != ENOSYS)
fatal("%s: failed to limit the network socket", __func__);
cap_rights_init(&rights, CAP_WRITE);
- if (cap_rights_limit(box->monitor->m_log_sendfd, &rights) == -1)
+ if (cap_rights_limit(box->monitor->m_log_sendfd, &rights) == -1 &&
+ errno != ENOSYS)
fatal("%s: failed to limit the logging socket", __func__);
if (cap_enter() < 0 && errno != ENOSYS)
fatal("%s: failed to enter capability mode", __func__);