Author: lslezak
Date: Fri Jul 11 13:11:55 2008
New Revision: 48987
URL: http://svn.opensuse.org/viewcvs/yast?rev=48987&view=rev
Log:
- compile PolicyKit support only when it's has been enabled
Modified:
branches/tmp/lslezak/workshop/core/scr/src/DBusServer.cc
branches/tmp/lslezak/workshop/core/scr/src/DBusServer.h
branches/tmp/lslezak/workshop/core/scr/src/Makefile.am
Modified: branches/tmp/lslezak/workshop/core/scr/src/DBusServer.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/workshop/core/scr/src/DBusServer.cc?rev=48987&r1=48986&r2=48987&view=diff
==============================================================================
--- branches/tmp/lslezak/workshop/core/scr/src/DBusServer.cc (original)
+++ branches/tmp/lslezak/workshop/core/scr/src/DBusServer.cc Fri Jul 11 13:11:55 2008
@@ -104,13 +104,15 @@
opt_str = opt->toString();
}
+#ifdef HAVE_POLKIT
// PolicyKit check
if (!isActionAllowed(caller, path_str, method, arg_str, opt_str))
{
// access denied
- reply.createError(request, "Argument 'path' is empty", DBUS_ERROR_ACCESS_DENIED);
+ reply.createError(request, "System policy does not allow you to do the action", DBUS_ERROR_ACCESS_DENIED);
}
else
+#endif
{
YCPPath pth(path_str);
YCPValue ret;
@@ -191,6 +193,7 @@
}
}
+#ifdef HAVE_POLKIT
bool DBusServer::isActionAllowed(const std::string &caller, const std::string &path, const std::string &method,
const std::string &arg, const std::string &opt)
{
@@ -213,4 +216,4 @@
return ret;
}
-
+#endif
Modified: branches/tmp/lslezak/workshop/core/scr/src/DBusServer.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/workshop/core/scr/src/DBusServer.h?rev=48987&r1=48986&r2=48987&view=diff
==============================================================================
--- branches/tmp/lslezak/workshop/core/scr/src/DBusServer.h (original)
+++ branches/tmp/lslezak/workshop/core/scr/src/DBusServer.h Fri Jul 11 13:11:55 2008
@@ -6,11 +6,16 @@
#ifndef DBUSSERVER_H
#define DBUSSERVER_H
+#include "config.h"
+
#include