File openct-udev-permission.patch of Package openct

--- openct-0.6.20/etc/openct.udev.in.old	2013-11-08 17:18:41.053545855 -0200
+++ openct-0.6.20/etc/openct.udev.in	2013-11-08 18:23:41.693013415 -0200
@@ -25,49 +25,50 @@
 PROGRAM="/bin/sleep 0.1"
 
 # ccid
-ATTR{bInterfaceClass}=="0b", ATTR{bInterfaceSubClass}=="00", ATTR{bInterfaceProtocol}=="00", ATTRS{idVendor}=="?*"  RUN+="@udevdir@/openct_usb /dev/$parent"
+ATTR{bInterfaceClass}=="0b", ATTR{bInterfaceSubClass}=="00", ATTR{bInterfaceProtocol}=="00", ATTRS{idVendor}=="?*", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$parent"
 
 # egate
-ATTR{idVendor}=="0973", ATTR{idProduct}=="0001", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="0973", ATTR{idProduct}=="0001", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
 # eToken
-ATTR{idVendor}=="0529", ATTR{idProduct}=="050c", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="0529", ATTR{idProduct}=="0514", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="0529", ATTR{idProduct}=="050c", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="0529", ATTR{idProduct}=="0514", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
 # eToken 64
-ATTR{idVendor}=="0529", ATTR{idProduct}=="0600", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="0529", ATTR{idProduct}=="0700", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="0529", ATTR{idProduct}=="0600", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="0529", ATTR{idProduct}=="0700", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
 # eutron
-ATTR{idVendor}=="073d", ATTR{idProduct}=="0005", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="073d", ATTR{idProduct}=="0005", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
 # ikey2k
-ATTR{idVendor}=="04b9", ATTR{idProduct}=="1200", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="04b9", ATTR{idProduct}=="1200", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="04b9", ATTR{idProduct}=="1202", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
 # ikey3k
-ATTR{idVendor}=="04b9", ATTR{idProduct}=="1300", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="04b9", ATTR{idProduct}=="1300", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
 # starkey
-ATTR{idVendor}=="096e", ATTR{idProduct}=="0005", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="096e", ATTR{idProduct}=="0005", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
 # cardman
-#ATTR{idVendor}=="076b", ATTR{idProduct}=="0596", RUN+="@udevdir@/openct_usb /dev/$name"
-#ATTR{idVendor}=="076b", ATTR{idProduct}=="1784", RUN+="@udevdir@/openct_usb /dev/$name"
-#ATTR{idVendor}=="08d4", ATTR{idProduct}=="0009", RUN+="@udevdir@/openct_usb /dev/$name"
+#ATTR{idVendor}=="076b", ATTR{idProduct}=="0596", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+#ATTR{idVendor}=="076b", ATTR{idProduct}=="1784", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+#ATTR{idVendor}=="08d4", ATTR{idProduct}=="0009", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
 
 # spr 532 - ccid, but with wrong interface class (vendor) :(
-ATTR{idVendor}=="04e6", ATTR{idProduct}=="0003", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="04e6", ATTR{idProduct}=="E003", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="04e6", ATTR{idProduct}=="0003", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="04e6", ATTR{idProduct}=="E003", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
 # pertosmart1030
-ATTR{idVendor}=="072f", ATTR{idProduct}=="0001", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="072f", ATTR{idProduct}=="8009", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="072f", ATTR{idProduct}=="0001", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="072f", ATTR{idProduct}=="8009", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
 # pertosmart1038
-ATTR{idVendor}=="072f", ATTR{idProduct}=="9000", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="072f", ATTR{idProduct}=="9006", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="072f", ATTR{idProduct}=="9007", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="072f", ATTR{idProduct}=="90d0", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="072f", ATTR{idProduct}=="9000", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="072f", ATTR{idProduct}=="9006", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="072f", ATTR{idProduct}=="9007", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="072f", ATTR{idProduct}=="90d0", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
 # wbeiuu	- driver not working yet.
-#ATTR{idVendor}=="104f", ATTR{idProduct}=="0004", RUN+="@udevdir@/openct_usb /dev/$name"
+#ATTR{idVendor}=="104f", ATTR{idProduct}=="0004", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
 # cyberjack
-ATTR{idVendor}=="0c4b", ATTR{idProduct}=="0100", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="0c4b", ATTR{idProduct}=="0100", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
 # rutoken
-ATTR{idVendor}=="0a89", ATTR{idProduct}=="0020", RUN+="@udevdir@/openct_usb /dev/$name"
-ATTR{idVendor}=="0a89", ATTR{idProduct}=="0012", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="0a89", ATTR{idProduct}=="0020", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="0a89", ATTR{idProduct}=="0012", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
 # ePass3000
-ATTR{idVendor}=="096e", ATTR{idProduct}=="0401", RUN+="@udevdir@/openct_usb /dev/$name"
+ATTR{idVendor}=="096e", ATTR{idProduct}=="0401", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_usb /dev/$name"
 
 LABEL="openct_usb_rules_end"
 
@@ -77,9 +78,9 @@
 ACTION!="add", GOTO="openct_pcmcia_rules_end"
 
 # omnikey cardman 4040
-SUBSYSTEM=="cardman_4040", RUN+="@udevdir@/openct_pcmcia /dev/$name"
+SUBSYSTEM=="cardman_4040", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_pcmcia /dev/$name"
 
 # Gemplus PCMCIA Card
-DRIVERS=="serial_cs", ATTR{prod_id1}=="Gemplus", ATTR{prod_id2}=="SerialPort", ATTR{prod_id3}=="GemPC Card", RUN+="@udevdir@/openct_serial /dev/$name"
+DRIVERS=="serial_cs", ATTR{prod_id1}=="Gemplus", ATTR{prod_id2}=="SerialPort", ATTR{prod_id3}=="GemPC Card", MODE="0660", GROUP="scard", RUN+="@udevdir@/openct_serial /dev/$name"
 
 LABEL="openct_pcmcia_rules_end"