Closed jan-cerny closed 8 years ago
Displaying "This needs to be run as root." is not the right thing IMO. Running openscap-daemon as a different user may be perfectly fine, depending on dbus policy. Let's catch the exception and wrap it in something user friendly. Personally I like tracebacks being included in errors, when users report issues it makes it much easier to fix them. Perhaps I am missing something here.
Yes, catching the exception and displaying user-friendly message is the solution that I expected. Just the text of the message should be something like "Permission denied on accessing dbus". Thanks for the clarification.
oscapd-cli eval needs to be run as root. When run as normal user it produces a traceback. I suggest to display a message instead. For example: "This command needs to be run as root."
Traceback:
I am using deamon 0.1.6 on Fedora 23 with Python3, from git with head 21e884e33169660d27bcb7930cc486bbdf3b1932