From 8351e1d5d4c0d0f5042210d4821fd2a2f71e48e5 Mon Sep 17 00:00:00 2001 From: Ivana Varekova Date: Thu, 29 Nov 2007 14:22:27 +0000 Subject: [PATCH] - Install hal and PoliceKit rules for visor module (#280251) put visor to blacklist patch by Harald Hoyer - thanks, thanks Alex Lancaster --- 19-pam-acl-management.fdi | 90 +++++++++++++++++++++++++++++++++++++++ 60-pilot.perms | 2 - 60-pilot.rules | 1 - blacklist-visor | 1 + pilot-device-file.policy | 17 ++++++++ pilot-link.spec | 33 ++++++++------ 6 files changed, 129 insertions(+), 15 deletions(-) create mode 100644 19-pam-acl-management.fdi delete mode 100644 60-pilot.perms delete mode 100644 60-pilot.rules create mode 100644 blacklist-visor create mode 100644 pilot-device-file.policy diff --git a/19-pam-acl-management.fdi b/19-pam-acl-management.fdi new file mode 100644 index 0000000..ec36333 --- /dev/null +++ b/19-pam-acl-management.fdi @@ -0,0 +1,90 @@ + + + + + + + + + access_control + pda + linux.device_file + + + + + + + + + + access_control + pda + linux.device_file + + + + access_control + pda + linux.device_file + + + + + + + + + access_control + pda + linux.device_file + + + + + + + + access_control + pda + linux.device_file + + + + + access_control + pda + linux.device_file + + + + + + access_control + pda + linux.device_file + + + + + + + + + access_control + pda + linux.device_file + + + + + diff --git a/60-pilot.perms b/60-pilot.perms deleted file mode 100644 index 30cbd6b..0000000 --- a/60-pilot.perms +++ /dev/null @@ -1,2 +0,0 @@ -=/dev/ttyUSB* - 0660 0660 root.uucp diff --git a/60-pilot.rules b/60-pilot.rules deleted file mode 100644 index 291d0ce..0000000 --- a/60-pilot.rules +++ /dev/null @@ -1 +0,0 @@ -BUS=="usb", SYSFS{product}=="Palm Handheld*|Handspring*",KERNEL=="ttyUSB[13579]", SYMLINK="pilot", GROUP="uucp", MODE="0660" diff --git a/blacklist-visor b/blacklist-visor new file mode 100644 index 0000000..04944bb --- /dev/null +++ b/blacklist-visor @@ -0,0 +1 @@ +blacklist visor diff --git a/pilot-device-file.policy b/pilot-device-file.policy new file mode 100644 index 0000000..fcdc677 --- /dev/null +++ b/pilot-device-file.policy @@ -0,0 +1,17 @@ + + + + + + + Directly access pda devices + System policy prevents access to the pda devices + + no + yes + + + + diff --git a/pilot-link.spec b/pilot-link.spec index d3a2a46..aca9d18 100644 --- a/pilot-link.spec +++ b/pilot-link.spec @@ -11,8 +11,9 @@ Summary: File transfer utilities between Linux and PalmPilots URL: http://www.pilot-link.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source0: pilot-link-%{version}.tar.bz2 -Source1: 60-pilot.rules -Source2: 60-pilot.perms +Source1: 19-pam-acl-management.fdi +Source2: pilot-device-file.policy +Source3: blacklist-visor ExcludeArch: s390 s390x #Patch1: pilot-link-0.11.0-perlmd5.patch # May be still applied @@ -55,6 +56,7 @@ Requires: %{name} = %{epoch}:%{version}-%{release} Requires: libpng-devel Requires: readline-devel + %description devel This package contains the development headers that are used to build the pilot-link package. It also includes the static libraries @@ -131,13 +133,17 @@ rm -f %{buildroot}%{_libdir}/*.la # remove broken prog rm -f %{buildroot}%{_bindir}/pilot-prc -# Install udev rules file. -mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d -install -p -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/udev/rules.d/60-pilot.rules +# Install hal rules file. +mkdir -p %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor/ +install -p -m644 %{SOURCE1} %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor/19-pam-acl-management.fdi -# Install device permissions -mkdir -p %{buildroot}%{_sysconfdir}/security/console.perms.d/ -install -p -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/security/console.perms.d/60-pilot.perms +# Install PolicyKit +mkdir -p %{buildroot}%{_datadir}/PolicyKit/policy +install -p -m644 %{SOURCE2} %{buildroot}%{_datadir}/PolicyKit/policy/pilot-device-file.policy + +# Put visor to blacklist +mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d/ +install -p -m644 %{SOURCE3} %{buildroot}%{_sysconfdir}/modprobe.d/blacklist-visor %post -p /sbin/ldconfig @@ -157,8 +163,9 @@ rm -rf %{buildroot} %{_bindir}/* %{_datadir}/pilot-link %{_mandir}/man?/* -%config(noreplace) %{_sysconfdir}/udev/rules.d/* -%config(noreplace) %{_sysconfdir}/security/console.perms.d/* +%config(noreplace) %{_datadir}/hal/fdi/policy/10osvendor/19-pam-acl-management.fdi +%config(noreplace) %{_datadir}/PolicyKit/policy/pilot-device-file.policy +%config(noreplace) %{_sysconfdir}/modprobe.d/blacklist-visor %files devel %defattr(-,root,root) @@ -169,8 +176,10 @@ rm -rf %{buildroot} %{_datadir}/aclocal/*.m4 %changelog -* Tue Nov 27 2007 Alex Lancaster - 2:0.12.2-9 -- Install udev and console permission rules for visor module (#280251) +* Tue Nov 27 2007 Ivana Varekova - 2:0.12.2-9 +- Install hal and PoliceKit rules for visor module (#280251) + put visor to blacklist + patch by Harald Hoyer - thanks, thanks Alex Lancaster * Fri Nov 23 2007 Ivana Varekova - 2:0.12.2-8 - add SonyClie NR70 patch (#372821)