diff options
author | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2014-02-04 21:48:09 +0000 |
---|---|---|
committer | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2014-02-04 21:48:09 +0000 |
commit | d62289d0137d1f51efdfe3a35c7437effa614467 (patch) | |
tree | 27b816582d4aac4ae54efa5ef9e8e2615787abf2 /crypto/openssh/sandbox-capsicum.c | |
parent | 49133c6d52243e3666e4eabdc4bf81b26b32ca7c (diff) | |
download | src-d62289d0137d1f51efdfe3a35c7437effa614467.tar.gz src-d62289d0137d1f51efdfe3a35c7437effa614467.zip |
Notes
Diffstat (limited to 'crypto/openssh/sandbox-capsicum.c')
-rw-r--r-- | crypto/openssh/sandbox-capsicum.c | 6 |
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__); |