mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
io_jail: Use rlim64_t for minijail_rlimit
The libminijail API defines rlim_t as an alias for rlim64_t. Change the FFI bindings to use rlim64_t. BUG=none TEST=`tast run kevin vm.Virtiofs` Change-Id: I21ece499bcef187b358574bca0918b39f5971586 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1933612 Tested-by: Chirantan Ekbote <chirantan@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Auto-Submit: Chirantan Ekbote <chirantan@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
This commit is contained in:
parent
2b0bc61ea7
commit
3ea11281eb
2 changed files with 2 additions and 3 deletions
|
@ -253,7 +253,6 @@ impl Minijail {
|
|||
cur: libc::rlim64_t,
|
||||
max: libc::rlim64_t,
|
||||
) -> Result<()> {
|
||||
// TODO(chirantan): Switch to minijail_rlimit64 once that lands in libminijail.
|
||||
let errno = unsafe { libminijail::minijail_rlimit(self.jail, kind, cur, max) };
|
||||
if errno == 0 {
|
||||
Ok(())
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
use libc::{gid_t, pid_t, uid_t};
|
||||
use libc::{gid_t, pid_t, rlim64_t, uid_t};
|
||||
use std::os::raw::{c_char, c_int, c_long, c_ulong};
|
||||
|
||||
/// Struct minijail is an opaque type inside libminijail.
|
||||
|
@ -19,7 +19,7 @@ extern "C" {
|
|||
pub fn minijail_keep_supplementary_gids(j: *mut minijail);
|
||||
pub fn minijail_change_user(j: *mut minijail, user: *const c_char) -> c_int;
|
||||
pub fn minijail_change_group(j: *mut minijail, group: *const c_char) -> c_int;
|
||||
pub fn minijail_rlimit(j: *mut minijail, kind: c_int, cur: u64, max: u64) -> c_int;
|
||||
pub fn minijail_rlimit(j: *mut minijail, kind: c_int, cur: rlim64_t, max: rlim64_t) -> c_int;
|
||||
pub fn minijail_use_seccomp(j: *mut minijail);
|
||||
pub fn minijail_no_new_privs(j: *mut minijail);
|
||||
pub fn minijail_use_seccomp_filter(j: *mut minijail);
|
||||
|
|
Loading…
Reference in a new issue