diff options
author | dtucker <dtucker> | 2014-01-18 11:12:15 +0000 |
---|---|---|
committer | dtucker <dtucker> | 2014-01-18 11:12:15 +0000 |
commit | 9a0f9f0f3e69e6b29956c487b9a6c51c58c6aac3 (patch) | |
tree | 1996a1234526e30d6ae759a51a82c9eb641d5745 /sandbox-capsicum.c | |
parent | 7f5da3211ef3764c9b62cd4048c9cff0389c8104 (diff) | |
download | openssh-9a0f9f0f3e69e6b29956c487b9a6c51c58c6aac3.tar.gz |
- (dtucker) [sandbox-capsicum.c] Correct some error messages and make the
return value check for cap_enter() consistent with the other uses in
FreeBSD. From by Loganaden Velvindron @ AfriNIC via bz#2140.
Diffstat (limited to 'sandbox-capsicum.c')
-rw-r--r-- | sandbox-capsicum.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sandbox-capsicum.c b/sandbox-capsicum.c index 5853a13e..f648c6ec 100644 --- a/sandbox-capsicum.c +++ b/sandbox-capsicum.c @@ -87,9 +87,9 @@ ssh_sandbox_child(struct ssh_sandbox *box) if (cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS) fatal("can't limit stdin: %m"); if (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) - fatal("can't limit stdin: %m"); + fatal("can't limit stdout: %m"); if (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS) - fatal("can't limit stdin: %m"); + fatal("can't limit stderr: %m"); cap_rights_init(&rights, CAP_READ, CAP_WRITE); if (cap_rights_limit(box->monitor->m_recvfd, &rights) == -1) @@ -97,7 +97,7 @@ ssh_sandbox_child(struct ssh_sandbox *box) cap_rights_init(&rights, CAP_WRITE); if (cap_rights_limit(box->monitor->m_log_sendfd, &rights) == -1) fatal("%s: failed to limit the logging socket", __func__); - if (cap_enter() != 0 && errno != ENOSYS) + if (cap_enter() < 0 && errno != ENOSYS) fatal("%s: failed to enter capability mode", __func__); } |