Skip to content

Commit 658d9e5

Browse files
committed
fix: paths must not contain interior null bytes
1 parent 5533b7f commit 658d9e5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/proxmox-rest-server/src/lib.rs b/proxmox-rest-server/src/lib.rs
2+
index 03942519..01e4950b 100644
3+
--- a/proxmox-rest-server/src/lib.rs
4+
+++ b/proxmox-rest-server/src/lib.rs
5+
@@ -101,7 +101,7 @@ pub fn read_pid(pid_fn: &str) -> Result<i32, Error> {
6+
pub fn ctrl_sock_from_pid(pid: i32) -> String {
7+
// Note: The control socket always uses @/run/proxmox-backup/ as prefix
8+
// for historc reason.
9+
- format!("\0{}/control-{}.sock", "/run/proxmox-backup", pid)
10+
+ format!("{}/control-{}.sock", "/run/proxmox-backup", pid)
11+
}
12+
13+
/// Returns the control socket path for this server.

0 commit comments

Comments
 (0)