Skip to content

Commit 9a3dcaf

Browse files
siretartLuap99
authored andcommitted
fix(deps): update rust crate zbus to v5
Based on patch provided by NoisyCoil in https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=1093690;filename=update-zbus.patch;msg=5 Signed-off-by: Reinhard Tartler <[email protected]> Signed-off-by: Paul Holzinger <[email protected]>
1 parent fd440e1 commit 9a3dcaf

File tree

5 files changed

+39
-36
lines changed

5 files changed

+39
-36
lines changed

Cargo.lock

Lines changed: 23 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ serde-value = "0.7.0"
4343
serde_json = "1.0.136"
4444
sysctl = "0.6.0"
4545
url = "2.5.3"
46-
zbus = { version = "4.3.1" }
46+
zbus = { version = "5.5.0" }
4747
nix = { version = "0.29.0", features = ["sched", "signal", "user"] }
4848
rand = "0.9.0"
4949
sha2 = "0.10.8"

src/commands/firewalld_reload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{
33
path::Path,
44
};
55

6-
use zbus::{blocking::Connection, proxy, CacheProperties};
6+
use zbus::{blocking::Connection, proxy, proxy::CacheProperties};
77

88
use crate::{
99
error::{ErrorWrap, NetavarkResult},

src/error/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ impl From<zbus::zvariant::Error> for NetavarkError {
192192
}
193193
}
194194

195+
// map the new zvariant::signature::Error to a
196+
// NetavarkError::DbusVariant, like zvariant::Error
197+
impl From<zbus::zvariant::signature::Error> for NetavarkError {
198+
fn from(err: zbus::zvariant::signature::Error) -> NetavarkError {
199+
NetavarkError::DbusVariant(err.into())
200+
}
201+
}
202+
195203
impl From<sysctl::SysctlError> for NetavarkError {
196204
fn from(err: sysctl::SysctlError) -> NetavarkError {
197205
NetavarkError::Sysctl(err)

src/firewall/firewalld.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ impl firewall::FirewallDriver for FirewallD {
191191
))
192192
}
193193
};
194-
let mut port_forwarding_rules: Array = Array::new(sig_ssss);
195-
let mut rich_rules: Array = Array::new(sig_s.clone());
196-
let mut localhost_rich_rules: Array = Array::new(sig_s);
194+
let mut port_forwarding_rules: Array = Array::new(&sig_ssss);
195+
let mut rich_rules: Array = Array::new(&sig_s.clone());
196+
let mut localhost_rich_rules: Array = Array::new(&sig_s);
197197

198198
// Create any necessary port forwarding rule(s) and add them to the
199199
// policy config we grabbed above.
@@ -408,7 +408,7 @@ impl firewall::FirewallDriver for FirewallD {
408408
))
409409
}
410410
};
411-
let mut port_forwarding_rules = Array::new(sig);
411+
let mut port_forwarding_rules = Array::new(&sig);
412412

413413
let ipv4 = teardown_pf.config.container_ip_v4.map(|i| i.to_string());
414414
let ipv6 = teardown_pf.config.container_ip_v6.map(|i| i.to_string());
@@ -481,7 +481,7 @@ impl firewall::FirewallDriver for FirewallD {
481481
))
482482
}
483483
};
484-
let mut new_rich_rules = Array::new(sig);
484+
let mut new_rich_rules = Array::new(&sig);
485485

486486
let ipv4 = teardown_pf.config.container_ip_v4.map(|i| i.to_string());
487487
let ipv6 = teardown_pf.config.container_ip_v6.map(|i| i.to_string());
@@ -564,7 +564,7 @@ impl firewall::FirewallDriver for FirewallD {
564564
))
565565
}
566566
};
567-
let mut new_rich_rules = Array::new(sig);
567+
let mut new_rich_rules = Array::new(&sig);
568568

569569
let ipv4 = teardown_pf.config.container_ip_v4.map(|i| i.to_string());
570570

0 commit comments

Comments
 (0)