Returns a list of problem ids whose data are not accessible without authorization.
The method itself doesn't require any authorization because it is not an security issue to see other's problem ids.
Related to rhbz#973125
Signed-off-by: Jakub Filak jfilak@redhat.com --- doc/problems-service/org.freedesktop.Problems.xml.in | 11 +++++++++++ src/dbus/abrt-dbus.c | 13 +++++++++++++ 2 files changed, 24 insertions(+)
diff --git a/doc/problems-service/org.freedesktop.Problems.xml.in b/doc/problems-service/org.freedesktop.Problems.xml.in index d4cd816..c6c1337 100644 --- a/doc/problems-service/org.freedesktop.Problems.xml.in +++ b/doc/problems-service/org.freedesktop.Problems.xml.in @@ -157,6 +157,17 @@ prblms = problems.GetProblems()
</method>
+ <method name='GetForeignProblems'> + tp:docstringGets a list of problem identifiers for problems not directly accessible by the caller.</tp:docstring> + + <arg type='as' name='response' direction='out'> + tp:docstringList of problem identifiers</tp:docstring> + </arg> + + </method> + + + <method name='GetAllProblems'> tp:docstringGets a list of problems visible by the caller.</tp:docstring>
diff --git a/src/dbus/abrt-dbus.c b/src/dbus/abrt-dbus.c index 421822f..968890e 100644 --- a/src/dbus/abrt-dbus.c +++ b/src/dbus/abrt-dbus.c @@ -32,6 +32,9 @@ static const gchar introspection_xml[] = " <method name='GetAllProblems'>" " <arg type='as' name='response' direction='out'/>" " </method>" + " <method name='GetForeignProblems'>" + " <arg type='as' name='response' direction='out'/>" + " </method>" " <method name='GetInfo'>" " <arg type='s' name='problem_dir' direction='in'/>" " <arg type='as' name='element_names' direction='in'/>" @@ -389,6 +392,16 @@ static void handle_method_call(GDBusConnection *connection, return; }
+ if (g_strcmp0(method_name, "GetForeignProblems") == 0) + { + GList * dirs = get_problem_dirs_not_accessible_by_uid(caller_uid, g_settings_dump_location); + response = variant_from_string_list(dirs); + list_free_with_free(dirs); + + g_dbus_method_invocation_return_value(invocation, response); + return; + } + if (g_strcmp0(method_name, "ChownProblemDir") == 0) { const gchar *problem_dir;