- Install hal and PoliceKit rules for visor module (#280251) put visor to
blacklist patch by Harald Hoyer - thanks, thanks Alex Lancaster
This commit is contained in:
parent
5bcc6a05b4
commit
8351e1d5d4
90
19-pam-acl-management.fdi
Normal file
90
19-pam-acl-management.fdi
Normal file
@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<deviceinfo version="0.2">
|
||||
|
||||
<device>
|
||||
<match key="info.capabilities" contains="serial">
|
||||
<!-- Pocket PC PDAs -->
|
||||
<match key="info.linux.driver" string="ipaq">
|
||||
<append key="info.capabilities" type="strlist">access_control</append>
|
||||
<merge key="access_control.type" type="string">pda</merge>
|
||||
<merge key="access_control.file" type="copy_property">linux.device_file</merge>
|
||||
</match>
|
||||
|
||||
<!-- PDAs via Linux 'visor' kernel driver -->
|
||||
<match key="info.linux.driver" string="visor">
|
||||
|
||||
<!--
|
||||
on Sony Clie 3.5 devices we need to mark port 0 instead of port 1. For
|
||||
this reason, we mark the usb interface with port number to use (FIXME: is
|
||||
there a better solution?). However, we should also do this for clies that
|
||||
have been upgraded to a later version of OS, but I'm not sure if those have
|
||||
the same product id - in that case this would not work for them. The driver
|
||||
doumentation however advertises that the information about what port should
|
||||
be used is written to syslog, perhaps we can somehow get that information
|
||||
from the driver directly?)
|
||||
-->
|
||||
<match key="usb.vendor_id" int="0x054c">
|
||||
<!-- Sony Clie 3.5 -->
|
||||
<match key="usb.product_id" int="0x0038">
|
||||
<append key="info.capabilities" type="strlist">access_control</append>
|
||||
<merge key="access_control.type" type="string">pda</merge>
|
||||
<merge key="access_control.file" type="copy_property">linux.device_file</merge>
|
||||
</match>
|
||||
<!-- Sony Clie SJ-22 -->
|
||||
<match key="usb.product_id" int="0x0066">
|
||||
<append key="info.capabilities" type="strlist">access_control</append>
|
||||
<merge key="access_control.type" type="string">pda</merge>
|
||||
<merge key="access_control.file" type="copy_property">linux.device_file</merge>
|
||||
</match>
|
||||
</match>
|
||||
</match>
|
||||
|
||||
<!-- Handspring -->
|
||||
<match key="usb.vendor_id" int="0x082d">
|
||||
<!-- Visor -->
|
||||
<match key="usb.product_id" int="0x0100">
|
||||
<append key="info.capabilities" type="strlist">access_control</append>
|
||||
<merge key="access_control.type" type="string">pda</merge>
|
||||
<merge key="access_control.file" type="copy_property">linux.device_file</merge>
|
||||
</match>
|
||||
</match>
|
||||
|
||||
<!-- Known Palm PDAs from Palm, Inc. -->
|
||||
<match key="usb.vendor_id" int="0x0830">
|
||||
<!-- Palm m130 -->
|
||||
<match key="usb.product_id" int="0x0050">
|
||||
<append key="info.capabilities" type="strlist">access_control</append>
|
||||
<merge key="access_control.type" type="string">pda</merge>
|
||||
<merge key="access_control.file" type="copy_property">linux.device_file</merge>
|
||||
<match key="serial.port" int="0">
|
||||
</match>
|
||||
<!-- Tungsten T5 -->
|
||||
<match key="usb.product_id" int="0x0061">
|
||||
<append key="info.capabilities" type="strlist">access_control</append>
|
||||
<merge key="access_control.type" type="string">pda</merge>
|
||||
<merge key="access_control.file" type="copy_property">linux.device_file</merge>
|
||||
</match>
|
||||
</match>
|
||||
|
||||
<!-- All the other PalmOS PDAs as fallback -->
|
||||
<match key="pda.platform" exists="false">
|
||||
<append key="info.capabilities" type="strlist">access_control</append>
|
||||
<merge key="access_control.type" type="string">pda</merge>
|
||||
<merge key="access_control.file" type="copy_property">linux.device_file</merge>
|
||||
|
||||
</match>
|
||||
|
||||
</match>
|
||||
</match>
|
||||
|
||||
<match key="info.subsystem" string="usb_device">
|
||||
<match key="info.product" contains="Palm Handheld">
|
||||
<append key="info.capabilities" type="strlist">access_control</append>
|
||||
<merge key="access_control.type" type="string">pda</merge>
|
||||
<merge key="access_control.file" type="copy_property">linux.device_file</merge>
|
||||
</match>
|
||||
</match>
|
||||
|
||||
</device>
|
||||
</deviceinfo>
|
@ -1,2 +0,0 @@
|
||||
<ttyUSB>=/dev/ttyUSB*
|
||||
<console> 0660 <ttyUSB> 0660 root.uucp
|
@ -1 +0,0 @@
|
||||
BUS=="usb", SYSFS{product}=="Palm Handheld*|Handspring*",KERNEL=="ttyUSB[13579]", SYMLINK="pilot", GROUP="uucp", MODE="0660"
|
1
blacklist-visor
Normal file
1
blacklist-visor
Normal file
@ -0,0 +1 @@
|
||||
blacklist visor
|
17
pilot-device-file.policy
Normal file
17
pilot-device-file.policy
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
|
||||
|
||||
<policyconfig>
|
||||
|
||||
<action id="org.freedesktop.hal.device-access.pda">
|
||||
<description>Directly access pda devices</description>
|
||||
<message>System policy prevents access to the pda devices</message>
|
||||
<defaults>
|
||||
<allow_inactive>no</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
|
||||
</policyconfig>
|
@ -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 <alexlan@fedoraproject.org> - 2:0.12.2-9
|
||||
- Install udev and console permission rules for visor module (#280251)
|
||||
* Tue Nov 27 2007 Ivana Varekova <varekova@redhat.com> - 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 <varekova@redhat.com> - 2:0.12.2-8
|
||||
- add SonyClie NR70 patch (#372821)
|
||||
|
Loading…
Reference in New Issue
Block a user