summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/sandbox-capsicum.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/sandbox-capsicum.c')
-rw-r--r--crypto/openssh/sandbox-capsicum.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/openssh/sandbox-capsicum.c b/crypto/openssh/sandbox-capsicum.c
index 6064514..fd88de0 100644
--- a/crypto/openssh/sandbox-capsicum.c
+++ b/crypto/openssh/sandbox-capsicum.c
@@ -15,6 +15,7 @@
*/
#include "includes.h"
+__RCSID("$FreeBSD$");
#ifdef SANDBOX_CAPSICUM
@@ -94,11 +95,11 @@ 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) < 0 &&
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) < 0 &&
errno != ENOSYS)
fatal("%s: failed to limit the logging socket", __func__);
if (cap_enter() < 0 && errno != ENOSYS)
OpenPOWER on IntegriCloud