29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
From 8b393e10d52876aef1c2c4ac0878eab6e1962f48 Mon Sep 17 00:00:00 2001
|
|
From: zhongtao <zhongtao17@huawei.com>
|
|
Date: Thu, 19 Dec 2024 15:11:16 +0800
|
|
Subject: [PATCH] add adapter for runc sandboxer
|
|
|
|
Signed-off-by: zhongtao <zhongtao17@huawei.com>
|
|
---
|
|
src/client/client.rs | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/src/client/client.rs b/src/client/client.rs
|
|
index fe1b1c2..7323197 100644
|
|
--- a/src/client/client.rs
|
|
+++ b/src/client/client.rs
|
|
@@ -121,6 +121,10 @@ pub fn new_conn(container_id: &String, addr: &String) -> Result<()> {
|
|
let fd = if addr.starts_with("ttrpc+vsock://") {
|
|
let address = addr.strip_prefix("ttrpc+vsock://").unwrap();
|
|
connect_to_vsock(address)?
|
|
+ } else if addr.starts_with("ttrpc+unix://") {
|
|
+ let address = addr.strip_prefix("ttrpc+unix://").unwrap();
|
|
+ let path = Path::new(&MAIN_SEPARATOR.to_string()).join(address);
|
|
+ connect_to_unix_socket(!addr.starts_with("ttrpc+unix://"), &path.to_string_lossy())?
|
|
} else {
|
|
let address = if addr.starts_with("unix://") {
|
|
addr.strip_prefix("unix://").unwrap()
|
|
--
|
|
2.45.0
|
|
|