don't set owner, group or mode as this may interfere with setting ACLs

This commit is contained in:
Nils Philippsen 2009-10-22 15:10:00 +00:00
parent 2be14136d9
commit de434829b6
2 changed files with 22 additions and 12 deletions

View File

@ -1,11 +1,19 @@
commit 91cbd80ad6f86af2d5696caeab2be0c404c4663c commit 9ba88134bd6d296ccbcf253c6ade3e646dc286b9
Author: Nils Philippsen <nils@redhat.com> Author: Nils Philippsen <nils@redhat.com>
Date: Thu Oct 22 14:29:41 2009 +0200 Date: Thu Oct 22 17:05:30 2009 +0200
patch: udev patch: udev
Squashed commit of the following: Squashed commit of the following:
commit a7541ac649bea3f352a249dfc569f3bc18b5a968
Author: Nils Philippsen <nils@redhat.com>
Date: Thu Oct 22 17:02:52 2009 +0200
don't set owner, group or mode
setting owner, group or mode may interfere with setting ACLs
commit e385558cf214d263af93147995f1f8b729d2dabe commit e385558cf214d263af93147995f1f8b729d2dabe
Author: Nils Philippsen <nils@redhat.com> Author: Nils Philippsen <nils@redhat.com>
Date: Thu Oct 22 14:19:53 2009 +0200 Date: Thu Oct 22 14:19:53 2009 +0200
@ -19,7 +27,7 @@ Date: Thu Oct 22 14:29:41 2009 +0200
adapt generated udev rules for Fedora adapt generated udev rules for Fedora
diff --git a/tools/sane-desc.c b/tools/sane-desc.c diff --git a/tools/sane-desc.c b/tools/sane-desc.c
index c317700..07f3a2b 100644 index c317700..2a410b2 100644
--- a/tools/sane-desc.c --- a/tools/sane-desc.c
+++ b/tools/sane-desc.c +++ b/tools/sane-desc.c
@@ -56,9 +56,9 @@ @@ -56,9 +56,9 @@
@ -40,29 +48,28 @@ index c317700..07f3a2b 100644
printf ("\n"); printf ("\n");
- printf ("ATTR{idVendor}==\"%s\", ATTR{idProduct}==\"%s\", MODE=\"%s\", GROUP=\"%s\", ENV{libsane_matched}=\"yes\"\n", - printf ("ATTR{idVendor}==\"%s\", ATTR{idProduct}==\"%s\", MODE=\"%s\", GROUP=\"%s\", ENV{libsane_matched}=\"yes\"\n",
- usbid->usb_vendor_id + 2, usbid->usb_product_id + 2, DEVMODE, DEVGROUP); - usbid->usb_vendor_id + 2, usbid->usb_product_id + 2, DEVMODE, DEVGROUP);
+ printf ("ATTR{idVendor}==\"%s\", ATTR{idProduct}==\"%s\", MODE=\"%s\", OWNER=\"%s\", GROUP=\"%s\", ENV{libsane_matched}=\"yes\"\n", + printf ("ATTR{idVendor}==\"%s\", ATTR{idProduct}==\"%s\", ENV{libsane_matched}=\"yes\"\n",
+ usbid->usb_vendor_id + 2, usbid->usb_product_id + 2, DEVMODE, DEVOWNER, DEVGROUP); + usbid->usb_vendor_id + 2, usbid->usb_product_id + 2);
usbid = usbid->next; usbid = usbid->next;
} }
@@ -3488,7 +3488,8 @@ print_udev (void) @@ -3488,7 +3488,7 @@ print_udev (void)
printf ("SUBSYSTEMS!=\"scsi\", GOTO=\"libsane_scsi_rules_end\"\n\n"); printf ("SUBSYSTEMS!=\"scsi\", GOTO=\"libsane_scsi_rules_end\"\n\n");
printf ("LABEL=\"libsane_scsi_rules_begin\"\n"); printf ("LABEL=\"libsane_scsi_rules_begin\"\n");
printf ("# Generic: SCSI device type 6 indicates a scanner\n"); printf ("# Generic: SCSI device type 6 indicates a scanner\n");
- printf ("KERNEL==\"sg[0-9]*\", NAME=\"%%k\", ATTRS{type}==\"6\", MODE=\"%s\", GROUP=\"%s\"\n", DEVMODE, DEVGROUP); - printf ("KERNEL==\"sg[0-9]*\", NAME=\"%%k\", ATTRS{type}==\"6\", MODE=\"%s\", GROUP=\"%s\"\n", DEVMODE, DEVGROUP);
+ printf ("KERNEL==\"sg[0-9]*\", ATTRS{type}==\"6\", MODE=\"%s\", OWNER=\"%s\", GROUP=\"%s\", ENV{libsane_matched}=\"yes\"\n", + printf ("KERNEL==\"sg[0-9]*\", ATTRS{type}==\"6\", ENV{libsane_matched}=\"yes\"\n");
+ DEVMODE, DEVOWNER, DEVGROUP);
printf ("# Some scanners advertise themselves as SCSI device type 3\n"); printf ("# Some scanners advertise themselves as SCSI device type 3\n");
while (scsiid) while (scsiid)
@@ -3521,8 +3522,8 @@ print_udev (void) @@ -3521,8 +3521,8 @@ print_udev (void)
} }
} }
printf ("\n"); printf ("\n");
- printf ("KERNEL==\"sg[0-9]*\", NAME=\"%%k\", ATTRS{type}==\"3\", ATTRS{vendor}==\"%s\", ATTRS{model}==\"%s\", MODE=\"%s\", GROUP=\"%s\"\n", - printf ("KERNEL==\"sg[0-9]*\", NAME=\"%%k\", ATTRS{type}==\"3\", ATTRS{vendor}==\"%s\", ATTRS{model}==\"%s\", MODE=\"%s\", GROUP=\"%s\"\n",
- scsiid->scsi_vendor_id, scsiid->scsi_product_id, DEVMODE, DEVGROUP); - scsiid->scsi_vendor_id, scsiid->scsi_product_id, DEVMODE, DEVGROUP);
+ printf ("KERNEL==\"sg[0-9]*\", ATTRS{type}==\"3\", ATTRS{vendor}==\"%s\", ATTRS{model}==\"%s\", MODE=\"%s\", OWNER=\"%s\", GROUP=\"%s\", ENV{libsane_matched}=\"yes\"\n", + printf ("KERNEL==\"sg[0-9]*\", ATTRS{type}==\"3\", ATTRS{vendor}==\"%s\", ATTRS{model}==\"%s\", ENV{libsane_matched}=\"yes\"\n",
+ scsiid->scsi_vendor_id, scsiid->scsi_product_id, DEVMODE, DEVOWNER, DEVGROUP); + scsiid->scsi_vendor_id, scsiid->scsi_product_id);
scsiid = scsiid->next; scsiid = scsiid->next;
} }
printf ("LABEL=\"libsane_scsi_rules_end\"\n\n"); printf ("LABEL=\"libsane_scsi_rules_end\"\n\n");

View File

@ -15,7 +15,7 @@
Summary: Scanner access software Summary: Scanner access software
Name: sane-backends Name: sane-backends
Version: 1.0.20 Version: 1.0.20
Release: 9%{?dist} Release: 10%{?dist}
# lib/ is LGPLv2+, backends are GPLv2+ with exceptions # lib/ is LGPLv2+, backends are GPLv2+ with exceptions
# Tools are GPLv2+, docs are public domain # Tools are GPLv2+, docs are public domain
# see LICENSE for details # see LICENSE for details
@ -189,6 +189,9 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/sane-backends.pc %{_libdir}/pkgconfig/sane-backends.pc
%changelog %changelog
* Thu Oct 22 2009 Nils Philippsen <nils@redhat.com> - 1.0.20-10
- don't set owner, group or mode as this may interfere with setting ACLs
* Thu Oct 22 2009 Nils Philippsen <nils@redhat.com> - 1.0.20-9 * Thu Oct 22 2009 Nils Philippsen <nils@redhat.com> - 1.0.20-9
- fix device file ownership and mode - fix device file ownership and mode