From c9ecd03156418390fa28b12825beb90626709c95 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Wed, 4 Sep 2013 20:15:38 +0100 Subject: Convert to polkit from usermode consolehelper for gaining root privileges polkit is better integrated into various environments, both console and GUI and offers better access rules and prevents the internal need to run su which is prone to errors and doesn't offer an environment agnostic prompt to the user. In this case the current package policy (in rpm spec) has been migrated here and is as follows: drakclock requires no authentication to run (just a console login) drakfont requires authentication as the current user. drakups, drakauth, draklog and drakxservices require authentication as and administrator. --- perl-install/Makefile.drakxtools | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'perl-install/Makefile.drakxtools') diff --git a/perl-install/Makefile.drakxtools b/perl-install/Makefile.drakxtools index a5a9394e2..92b2951e4 100644 --- a/perl-install/Makefile.drakxtools +++ b/perl-install/Makefile.drakxtools @@ -16,10 +16,12 @@ DATADIR = $(PREFIX)/usr/share ICONSDIR= $(DATADIR)/icons BINDEST = $(PREFIX)/usr/bin SBINDEST = $(PREFIX)/usr/sbin +LIBEXECDEST = $(PREFIX)/usr/libexec ETCDEST = $(PREFIX)/etc/gtk LIBDEST = $(LIBDIR)/$(NAME) PIXDIR = $(DATADIR)/$(NAME)/pixmaps INITDIR = $(PREFIX)/etc/rc.d/init.d +POLKITPOLICYDEST = $(PREFIX)/usr/share/polkit-1/actions .PHONY: $(DIRS) all: ../tools/rpcinfo-flushed $(DIRS) @@ -30,7 +32,7 @@ $(DIRS): install: perl -pi -e "s/\"VER\"(; # version)/\"$(VERSION)\"\1/" standalone.pm - mkdir -p $(BINDEST) $(ETCDEST) $(SBINDEST) $(DATADIR)/{applications,harddrake,pixmaps,icons/{large,mini},autostart} $(PIXDIR) $(INITDIR) $(MENUDIR) + mkdir -p $(BINDEST) $(ETCDEST) $(SBINDEST) $(DATADIR)/{applications,harddrake,pixmaps,icons/{large,mini},autostart} $(PIXDIR) $(INITDIR) $(MENUDIR) $(LIBEXECDEST) $(POLKITPOLICYDEST) install -d $(INLIBDEST_DIRS:%=$(LIBDEST)/%) install $(STANDALONEPMS) standalone/convert $(SBINDEST) install -s ../tools/rpcinfo-flushed ../tools/serial_probe/serial_probe $(SBINDEST) @@ -42,6 +44,11 @@ install: mv -f $(SBINDEST)/display_help $(BINDEST) mv -f $(SBINDEST)/display_release_notes.pl $(BINDEST) mv -f $(SBINDEST)/localedrake $(BINDEST) + # All the things handled by polkit + mv -f $(SBINDEST)/drak{auth,boot,clock,font,ups,xservices} $(LIBEXECDEST) + mv -f $(SBINDEST)/logdrake $(LIBEXECDEST)/draklog + install polkit/wrappers/* $(BINDEST) + install polkit/policy/* $(POLKITPOLICYDEST) install -m 644 *.pm $(LIBDEST) for i in $(PMS_DIRS); do install -d $(LIBDEST)/$$i ; install -m 644 $$i/*.pm $(LIBDEST)/$$i/;done @@ -78,7 +85,7 @@ install: ln -s {drakclock,$(SBINDEST)/clock.pl} ln -s {harddrake2,$(SBINDEST)/drakhardware} ln -s {localedrake,$(BINDEST)/draklocale} - ln -s {logdrake,$(SBINDEST)/draklog} + ln -s {draklog,$(BINDEST)/logdrake} ln -s {scannerdrake,$(SBINDEST)/drakscanner} check: -- cgit v1.2.1