-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
parse XML configuration files #159
base: main
Are you sure you want to change the base?
parse XML configuration files #159
Conversation
bcea200
to
07e1119
Compare
9320376
to
6402177
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly have nitpicks but overall it looks pretty good already. Let's try and get it merged soon.
Sure thing.
Awesome! I'll have a look soon.
That's ok, we can handle them later. If you could list them here, that would be great though, just to ensure that we don't end up leaving something very important/critical. Also do we add tests to parse system and session configuration from |
Do you mean I should copy the default configuration files from dbus-broker in as tests? Or should busd try to read these files by default if run with |
So busd should most definitely read them from those paths and later when we've some build configuration (#77), we can make the paths configurable at build time too. I was saying we should have tests that also try to load from those paths on Linux but we can also copy them into the repo to keep the tests self-contained (then the tests don't need to be linux-only). |
I've updated the TODO checklist in the PR description |
Weird, this passed on my machine, I'll have to take a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I wrote on the matrix channel:
- This PR now breaks busd on launch. We need to add handling of
tmpdir
already (could be done in a separate PR first that this PR can be rebased on after that's merged). - It probably makes sense at this point to just merge most commits in this branch.
82a5f7b
to
57ae57a
Compare
This crate offers a serde-compatible Deserializer for XML data
57ae57a
to
102cf3a
Compare
based on reading https://dbus.freedesktop.org/doc/dbus-daemon.1.html#configuration_file
Fixes #78 and #79 and #148
Related to #23 and #146
<limit>
parts per Hardcoded security limits #148<policy>
parts that we don't implement per Implement essential policy #79<policy>
parts that evendbus-broker
doesn't implement: feat: initial work on supporting dbus-daemon XML configuration files #146 (comment)<type>
<user>
<fork>
<keep_umask>
<syslog>
<pidfile>
<allow_anonymous>
<listen>
<auth>
<servicedir>
<include>
<includedir>
<standard_session_servicedirs />
<standard_session_servicedirs />
<standard_system_servicedirs />
<standard_system_servicedirs />
<policy>
<allow>
and all supported attributes<deny>
and all supported attributes<(allow|deny) send_member=...
: Implement essential policy #79 (comment)TODOs for follow-up PRs:
<selinux>
<associate>
<apparmor>
<include>
/<includedirs>
<include if_selinux_enabled=...>
<include selinux_root_relative=...>
<listen>
better thanString
values (e.g. parse and validate into more useful type)<auth>
better thanString
, is there anenum
of specific values we support< standard_session_servicedirs />
in a system config<standard_system_servicedirs />
in a session config<busconfig>
Ord
/PartialOrd
trait forPolicy
to facilitate use during evaluation