- closes trac#877
Signed-off-by: Jakub Filak <jfilak(a)redhat.com>
---
src/dbus/abrt-dbus.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/src/dbus/abrt-dbus.c b/src/dbus/abrt-dbus.c
index 797bfec..472ed4f 100644
--- a/src/dbus/abrt-dbus.c
+++ b/src/dbus/abrt-dbus.c
@@ -492,6 +492,13 @@ static void handle_method_call(GDBusConnection *connection,
return;
}
+ if (errno == ENOENT)
+ {
+ VERB1 log("Requested directory does not exist '%s'", problem_dir);
+ return_InvalidProblemDir_error(invocation, problem_dir);
+ return;
+ }
+
if (polkit_check_authorization_dname(caller, "org.freedesktop.problems.getall") != PolkitYes)
{
VERB1 log("not authorized");
@@ -565,6 +572,13 @@ static void handle_method_call(GDBusConnection *connection,
if (!dir_accessible_by_uid(problem_dir, caller_uid))
{
+ if (errno == ENOENT)
+ {
+ VERB1 log("Requested directory does not exist '%s'", problem_dir);
+ return_InvalidProblemDir_error(invocation, problem_dir);
+ return;
+ }
+
if (polkit_check_authorization_dname(caller, "org.freedesktop.problems.getall") != PolkitYes)
{
VERB1 log("not authorized");
@@ -646,6 +660,12 @@ static void handle_method_call(GDBusConnection *connection,
const char *dir_name = (const char*)l->data;
if (!dir_accessible_by_uid(dir_name, caller_uid))
{
+ if (errno == ENOENT)
+ {
+ VERB1 log("Requested directory does not exist '%s'", dir_name);
+ continue;
+ }
+
if (polkit_check_authorization_dname(caller, "org.freedesktop.problems.getall") != PolkitYes)
{ // if user didn't provide correct credentials, just move to the next dir
continue;
--
1.7.11.7