From: Scott Barninger Date: Sat, 13 Feb 2010 17:32:42 +0000 (-0500) Subject: Changes to run bat as nonroot user. X-Git-Tag: Release-7.0.0~2219 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=49f530d453ab1eebf1798d8fb184d05d604a3c5c;p=bacula%2Fbacula Changes to run bat as nonroot user. --- diff --git a/bacula/platforms/rpm/bacula-bat.spec b/bacula/platforms/rpm/bacula-bat.spec index a407fa55ef..f8998c52ec 100644 --- a/bacula/platforms/rpm/bacula-bat.spec +++ b/bacula/platforms/rpm/bacula-bat.spec @@ -197,6 +197,7 @@ rm -rf $RPM_BUILD_ROOT%{_prefix}/share/doc/bacula %if %{suse} cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop +touch RPM_BUILD_ROOT%{sysconfdir}/bat.kdesu %else cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png cp -p scripts/bat.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bat.desktop @@ -207,12 +208,17 @@ ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bat %files %defattr(-,root,root) -%{_sbindir}/bat +%attr(-, root, %{daemon_group}) %{_sbindir}/bat %attr(-, root, %{daemon_group}) %dir %{sysconf_dir} %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bat.conf /usr/share/pixmaps/bat_icon.png /usr/share/applications/bat.desktop +# if user is a member of daemon_group then kdesu will run bat as user +%if %{suse} +%attr(0660, root, %{daemon_group}) %{sysconf_dir}/bat.kdesu +%endif + %if ! %{suse} # add the console helper files %config(noreplace,missingok) /etc/pam.d/bat @@ -261,6 +267,8 @@ fi rm -rf $RPM_BUILD_DIR/depkgs-qt %changelog +* Sat Feb 13 2010 D. Scott Barninger +- create file to allow bat to run nonroot with kdesu * Sat Jan 30 2010 D. Scott Barninger - fix consolehelper/xsu for suse packages * Sat Aug 1 2009 Kern Sibbald diff --git a/bacula/scripts/bat.console_apps.in b/bacula/scripts/bat.console_apps.in index ed71121637..3f660a9a5b 100644 --- a/bacula/scripts/bat.console_apps.in +++ b/bacula/scripts/bat.console_apps.in @@ -1,3 +1,4 @@ USER=root PROGRAM=@sbindir@/bat SESSION=true +FALLBACK=true diff --git a/bacula/scripts/bat.desktop.xsu.in b/bacula/scripts/bat.desktop.xsu.in index d4a66f554e..cced5a00c3 100644 --- a/bacula/scripts/bat.desktop.xsu.in +++ b/bacula/scripts/bat.desktop.xsu.in @@ -2,7 +2,7 @@ Name=Bacula Administration Tool Comment=Bacula Director Console Icon=/usr/share/pixmaps/bat_icon.png -Exec=gnomesu -t "Query" -c "@sbindir@/bat -c @sysconfdir@/bat.conf" -d -e -m "In order to run the bacula console as root, ^additional information is required." +Exec=kdesu -t -c "@sbindir@/bat -c @sysconfdir@/bat.conf" -f @sysconfdir@/bat.kdesu Terminal=false Type=Application Encoding=UTF-8