diff options
author | pjd <pjd@FreeBSD.org> | 2014-02-04 21:48:09 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2014-02-04 21:48:09 +0000 |
commit | ed07d3e6e2d1e13f178abe493ede8d6a95fb5dbb (patch) | |
tree | 27b816582d4aac4ae54efa5ef9e8e2615787abf2 /crypto/openssh | |
parent | 0248f22ea442ec1c6f84b2c22509cff26cb28548 (diff) | |
download | FreeBSD-src-ed07d3e6e2d1e13f178abe493ede8d6a95fb5dbb.zip FreeBSD-src-ed07d3e6e2d1e13f178abe493ede8d6a95fb5dbb.tar.gz |
Fix installations that use kernels without CAPABILITIES support.
Approved by: des
Diffstat (limited to 'crypto/openssh')
-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 ee2a7e7..6064514 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__); |