diff options
author | Colin Watson <cjwatson@debian.org> | 2014-03-20 00:32:39 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2014-03-20 00:34:16 +0000 |
commit | 2ee2de47fd0f684f54218d31b4ec83930e69c18e (patch) | |
tree | 86848a7668424b392d48791a0e41e05f9df7b62b /sandbox-capsicum.c | |
parent | c9947303ad3c432b1cadfbeb1d95a7cd38662d66 (diff) | |
parent | 9cbb60f5e4932634db04c330c88abc49cc5567bd (diff) |
Merge 6.6p1.
* New upstream release (http://www.openssh.com/txt/release-6.6).
Diffstat (limited to 'sandbox-capsicum.c')
-rw-r--r-- | sandbox-capsicum.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sandbox-capsicum.c b/sandbox-capsicum.c index ee2a7e79e..655f0d217 100644 --- a/sandbox-capsicum.c +++ b/sandbox-capsicum.c | |||
@@ -94,10 +94,12 @@ ssh_sandbox_child(struct ssh_sandbox *box) | |||
94 | fatal("can't limit stderr: %m"); | 94 | fatal("can't limit stderr: %m"); |
95 | 95 | ||
96 | cap_rights_init(&rights, CAP_READ, CAP_WRITE); | 96 | cap_rights_init(&rights, CAP_READ, CAP_WRITE); |
97 | if (cap_rights_limit(box->monitor->m_recvfd, &rights) == -1) | 97 | if (cap_rights_limit(box->monitor->m_recvfd, &rights) < 0 && |
98 | errno != ENOSYS) | ||
98 | fatal("%s: failed to limit the network socket", __func__); | 99 | fatal("%s: failed to limit the network socket", __func__); |
99 | cap_rights_init(&rights, CAP_WRITE); | 100 | cap_rights_init(&rights, CAP_WRITE); |
100 | if (cap_rights_limit(box->monitor->m_log_sendfd, &rights) == -1) | 101 | if (cap_rights_limit(box->monitor->m_log_sendfd, &rights) < 0 && |
102 | errno != ENOSYS) | ||
101 | fatal("%s: failed to limit the logging socket", __func__); | 103 | fatal("%s: failed to limit the logging socket", __func__); |
102 | if (cap_enter() < 0 && errno != ENOSYS) | 104 | if (cap_enter() < 0 && errno != ENOSYS) |
103 | fatal("%s: failed to enter capability mode", __func__); | 105 | fatal("%s: failed to enter capability mode", __func__); |