Skip to content

Commit

Permalink
🔇 Remove unimplemented/deprecated warnings for now
Browse files Browse the repository at this point in the history
As discussed on Matrix, we'd prefer to err on the side of less-noisy operation, rather that output a lot of warnings
  • Loading branch information
jokeyrhyme committed Nov 20, 2024
1 parent e6ba5df commit da94eb8
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use serde::Deserialize;
pub mod limits;
mod xml;

use tracing::warn;
use xml::{
Document, Element, PolicyContext, PolicyElement, RuleAttributes, RuleElement, TypeElement,
};
Expand Down Expand Up @@ -103,7 +102,7 @@ impl TryFrom<Document> for Config {
}
Element::KeepUmask => bc.keep_umask = true,
Element::Limit => {
warn!("busd does not implement `<limit>`");
// NO-OP: deprecated and ignored
}
Element::Listen(s) => {
bc.listen.insert(s);
Expand Down Expand Up @@ -338,10 +337,7 @@ impl TryFrom<PolicyElement> for OptionalPolicy {
group: None,
user: None,
..
} => {
warn!(r#"busd does not implement `<policy at_context="...">`"#);
Ok(None)
}
} => Ok(None),
PolicyElement {
at_console: None,
context: Some(c),
Expand Down Expand Up @@ -434,7 +430,6 @@ impl TryFrom<RuleElement> for OptionalRule {
..
}) => {
// see: https://github.com/dbus2/busd/pull/146#issuecomment-2408429760
warn!(r#"eavesdropping is deprecated and ignored: `<allow eavesdrop="true" />`"#);
Ok(None)
}
RuleElement::Allow(
Expand All @@ -448,18 +443,12 @@ impl TryFrom<RuleElement> for OptionalRule {
},
) => {
// see: https://github.com/dbus2/busd/pull/146#issuecomment-2408429760
warn!(
"explicit policies on replies and errors are deprecated and ignored: `<allow ... (receive|send)_requested_reply=...`"
);
Ok(None)
}
RuleElement::Allow(attrs) => {
if attrs.eavesdrop == Some(true) {
// see: https://github.com/dbus2/busd/pull/146#issuecomment-2408429760
warn!(
r#"eavesdropping is deprecated and ignored: `<allow ... eavesdrop="true" ...`"#
);
}
// if attrs.eavesdrop == Some(true) {
// see: https://github.com/dbus2/busd/pull/146#issuecomment-2408429760
// }
match OptionalOperation::try_from(attrs)? {
Some(some) => Ok(Some((Access::Allow, some))),
None => Ok(None),
Expand All @@ -470,9 +459,6 @@ impl TryFrom<RuleElement> for OptionalRule {
..
}) => {
// see: https://github.com/dbus2/busd/pull/146#issuecomment-2408429760
warn!(
r#"eavesdropping is deprecated and ignored: `<deny ... eavesdrop="true" ...`"#
);
Ok(None)
}
RuleElement::Deny(
Expand All @@ -486,9 +472,6 @@ impl TryFrom<RuleElement> for OptionalRule {
},
) => {
// see: https://github.com/dbus2/busd/pull/146#issuecomment-2408429760
warn!(
"explicit policies on replies and errors are deprecated and ignored: `<deny ... (receive|send)_requested_reply=...`"
);
Ok(None)
}
RuleElement::Deny(attrs) => match OptionalOperation::try_from(attrs)? {
Expand Down

0 comments on commit da94eb8

Please sign in to comment.