diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2019-12-06 18:26:34 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2019-12-06 18:26:34 +0000 |
| commit | 10a93cc038a7876c7cd4ae1b399ff4afbdbf8aa9 (patch) | |
| tree | 2b90dc59aed3f279afd2178da48ad2b2e79eae01 /bin | |
| parent | 15ec422b2b6f05de0c228291cfd702767d0fb30c (diff) | |
Notes
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/dd/dd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/dd/dd.c b/bin/dd/dd.c index 4913479e3a0a..46175fa4c8f2 100644 --- a/bin/dd/dd.c +++ b/bin/dd/dd.c @@ -157,7 +157,7 @@ setup(void) getfdtype(&in); cap_rights_init(&rights, CAP_READ, CAP_SEEK); - if (cap_rights_limit(in.fd, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(in.fd, &rights) == -1) err(1, "unable to limit capability rights"); if (files_cnt > 1 && !(in.flags & ISTAPE)) @@ -188,10 +188,9 @@ setup(void) getfdtype(&out); - if (cap_rights_limit(out.fd, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(out.fd, &rights) == -1) err(1, "unable to limit capability rights"); - if (cap_ioctls_limit(out.fd, cmds, nitems(cmds)) == -1 && - errno != ENOSYS) + if (caph_ioctls_limit(out.fd, cmds, nitems(cmds)) == -1) err(1, "unable to limit capability rights"); if (in.fd != STDIN_FILENO && out.fd != STDIN_FILENO) { |
