Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help dependabot #340

Merged
merged 3 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/shim-rune.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Kubernetes can launch Pod and OCI-compatible containers with one shim per Pod.

## Goals

- Implements [Containerd Runtime V2 (Shim API)](https://github.com/containerd/containerd/tree/main/runtime/v2)
- Implements [Containerd Runtime V2 (Shim API)](https://github.com/containerd/containerd/tree/96bf529cbf55940ddb96bb8adc8be51b11922ebb/core/runtime/v2)
- Use `rune` OCI runtime to manage container
- Launch agent enclave container during PodSandbox creation
- Complete PullImage with agent enclave container with ttrpc communication
Expand Down
31 changes: 4 additions & 27 deletions src/runtime-boot/init/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/runtime-boot/init/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ edition = "2018"
libc = "0.2.152"
serde = { version = "1.0.195", features = ["derive"] }
serde_json = "1.0.111"
nix = { version = "0.26" }
anyhow = { version = "1.0", default-features = false }
nix = { version = "0.27.1", features = ["mount"] }
anyhow = { version = "1.0", default-features = false }
5 changes: 1 addition & 4 deletions src/runtime-boot/init/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ use libc::syscall;
use nix::mount::MsFlags;
use std::env;
use std::error::Error;
use std::fs;
use std::fs::File;
use std::io::prelude::*;
use std::io::{ErrorKind, Read};

use anyhow::Result;
Expand All @@ -22,6 +20,7 @@ fn main() -> Result<(), Box<dyn Error>> {

// Mount the image
const SYS_MOUNT_FS: i64 = 363;
const KEY_FILE: &str = "/tmp/key.txt";

let ret = match agent_boot {
true => {
Expand Down Expand Up @@ -50,7 +49,6 @@ fn main() -> Result<(), Box<dyn Error>> {
eprintln!("Error mounting keys: {}", err);
});

let KEY_FILE: &str = "/tmp/key.txt";
// Get the key of FS image
let key = {
let key_str = load_key(KEY_FILE)?;
Expand Down Expand Up @@ -81,7 +79,6 @@ fn main() -> Result<(), Box<dyn Error>> {
hostfs_target: std::ptr::null(),
envp: envp.as_ptr(),
};
let key_null_ptr: *const i8 = std::ptr::null();
unsafe { syscall(SYS_MOUNT_FS, key_ptr, &rootfs_config) }
}
};
Expand Down
Loading