summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordnovotny <danny@rawhide.localdomain>2009-09-14 09:39:15 -0400
committerdnovotny <danny@rawhide.localdomain>2009-09-14 09:39:15 -0400
commit814506ae62986c3c3b667afdae7a33fe6b9e690f (patch)
tree552f51d17cf069f0430b361a8f29724414771168
parent1c98691adb56fe708ed3ef4a3c6638e7cbcae698 (diff)
downloadabrt-814506ae62986c3c3b667afdae7a33fe6b9e690f.tar.gz
abrt-814506ae62986c3c3b667afdae7a33fe6b9e690f.tar.xz
abrt-814506ae62986c3c3b667afdae7a33fe6b9e690f.zip
Polkit moved to Utils (can be used both in daemon and plugins)
-rw-r--r--lib/Utils/Makefile.am8
-rw-r--r--lib/Utils/Polkit.cpp (renamed from src/Daemon/Polkit.cpp)3
-rw-r--r--lib/Utils/Polkit.h (renamed from src/Daemon/Polkit.h)1
-rw-r--r--src/Daemon/Makefile.am7
4 files changed, 12 insertions, 7 deletions
diff --git a/lib/Utils/Makefile.am b/lib/Utils/Makefile.am
index aa6ddc9d..cb5b3377 100644
--- a/lib/Utils/Makefile.am
+++ b/lib/Utils/Makefile.am
@@ -5,11 +5,13 @@ libABRTUtils_la_SOURCES = \
xfuncs.cpp \
read_write.cpp \
logging.cpp \
- copyfd.cpp
+ copyfd.cpp \
+ Polkit.cpp \
+ Polkit.h
libABRTUtils_la_LDFLAGS = -version-info 0:1:0
-libABRTUtils_la_LIBADD = -lmagic
-libABRTUtils_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../../lib/CommLayer
+libABRTUtils_la_LIBADD = -lmagic $(POLKIT_LIBS)
+libABRTUtils_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../../lib/CommLayer $(POLKIT_CFLAGS)
install-data-local:
$(mkdir_p) '$(DESTDIR)/$(DEBUG_DUMPS_DIR)'
diff --git a/src/Daemon/Polkit.cpp b/lib/Utils/Polkit.cpp
index 8d533696..04ea724c 100644
--- a/src/Daemon/Polkit.cpp
+++ b/lib/Utils/Polkit.cpp
@@ -21,6 +21,8 @@
#include <polkit/polkit.h>
#include <glib-object.h>
+#include <sys/types.h>
+#include <unistd.h>
#include "Polkit.h"
@@ -62,3 +64,4 @@ PolkitResult polkit_check_authorization(const char *dbus_name, const char *actio
return PolkitUnknown;
}
+
diff --git a/src/Daemon/Polkit.h b/lib/Utils/Polkit.h
index a1e54f53..c126f864 100644
--- a/src/Daemon/Polkit.h
+++ b/lib/Utils/Polkit.h
@@ -35,5 +35,6 @@ typedef enum {
} PolkitResult;
PolkitResult polkit_check_authorization(const char *dbus_name, const char *action_id);
+PolkitResult polkit_check_authorization(unsigned int UID, const char *action_id);
#endif
diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am
index 498223c2..f6bb9c15 100644
--- a/src/Daemon/Makefile.am
+++ b/src/Daemon/Makefile.am
@@ -13,8 +13,7 @@ abrtd_SOURCES = \
CommLayerServerSocket.h CommLayerServerSocket.cpp \
CommLayerServerDBus.h CommLayerServerDBus.cpp \
Daemon.cpp Daemon.h \
- Settings.h Settings.cpp \
- Polkit.h Polkit.cpp
+ Settings.h Settings.cpp
abrtd_CPPFLAGS = \
-I$(srcdir)/../../inc \
-I$(srcdir)/../../lib/MiddleWare \
@@ -26,11 +25,11 @@ abrtd_CPPFLAGS = \
-DCONF_DIR=\"$(CONF_DIR)\" \
-DVAR_RUN=\"$(VAR_RUN)\" \
$(GLIB_CFLAGS) $(DBUS_CFLAGS) \
- $(ENABLE_SOCKET_OR_DBUS) $(POLKIT_CFLAGS)
+ $(ENABLE_SOCKET_OR_DBUS)
abrtd_LDADD = \
../../lib/MiddleWare/libABRTMiddleWare.la \
../../lib/CommLayer/libABRTCommLayer.la \
- $(DL_LIBS) $(DBUS_LIBS) $(RPM_LIBS) $(POLKIT_LIBS)
+ $(DL_LIBS) $(DBUS_LIBS) $(RPM_LIBS)
dbusabrtconfdir = ${sysconfdir}/dbus-1/system.d/
dist_dbusabrtconf_DATA = dbus-abrt.conf