-
Notifications
You must be signed in to change notification settings - Fork 140
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
Move D-Bus support from bridge into usbguard-daemon. #319
base: main
Are you sure you want to change the base?
Conversation
I can take care of the rebase. |
4fc3385
to
f4e62e4
Compare
65e97a5
to
ea0ab0b
Compare
I ended up having to move all the glib initialization out of the constructor into the D-Bus IPC server thread. |
The change as is doesn't currently provide a way to offer the D-Bus interface on the session bus, it is system only. I don't believe that will be a problem, but I thought I would highlight it in case you all are aware of particular reasons to also support binding to session buses. |
@@ -339,6 +527,30 @@ namespace usbguard | |||
with_interface_string.c_str()); | |||
return builder; | |||
} | |||
|
|||
void DBusIPCServerPrivate::addAllowedUID(uid_t uid, const IPCServer::AccessControl& ac) |
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.
What is the current behavior without these functions implemented? If it is expected for them to be empty, could you add a comment to make that clear? Thanks
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.
I added a comment.
} | ||
|
||
void IPCServer::addAllowedUID(uid_t uid, const IPCServer::AccessControl& ac) | ||
{ | ||
d_pointer->addAllowedUID(uid, ac); | ||
for (const auto& d_pointer : d_pointers) { | ||
d_pointer->addAllowedUID(uid, ac); |
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.
What's the intended behavior if any of the IPC implementation fail? Should we check the return values?
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.
There aren't return values to check. Though I did go through and convert some error log statements to exceptions, so the D-Bus IPC server better matches the behavior of the libqb IPC server code.
aa97914
to
bd4a9d3
Compare
No description provided.