Bug#918358: libsane:amd64: Missing permissions for scanner group on usb device

2020-06-12 Thread Jörg Frings-Fürst
Hello Chris,

the version 1.0.30-1~experimental2 is almost ready to start the upcoming
transition. At the moment only the build on 2 architectures[1] is missing.

As soon as they are finished I will talk to my mentor and apply for the start of
the transition.

Since the fix to fix the bug is quite simple[2] there is no bugfix release.

CU
Jörg

[1] 
https://buildd.debian.org/status/package.php?p=sane-backends=experimental
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=918358#12

-- 
New:
GPG Fingerprint: 63E0 075F C8D4 3ABB 35AB  30EE 09F8 9F3C 8CA1 D25D
GPG key (long) : 09F89F3C8CA1D25D
GPG Key: 8CA1D25D
CAcert Key S/N : 0E:D4:56

Old pgp Key: BE581B6E (revoked since 2014-12-31).

Jörg Frings-Fürst
D-54470 Lieser


git:  https://jff.email/cgit/

Threema:  SYR8SJXB
Wire: @joergfringsfuerst
Skype:joergpenguin
Ring: jff
Telegram: @joergfringsfuerst


My wish list: 
 - Please send me a picture from the nature at your home.



signature.asc
Description: This is a digitally signed message part


Bug#918358: libsane:amd64: Missing permissions for scanner group on usb device

2020-06-10 Thread Chris Nospam
Dear Maintainer, dear Jörg,

the bug is closed since a couple of weeks. However, there was no patch released 
at least for debian testing. The (lib)sane version is still 1.0.27 and the 
bug(s) still exists.

$ dpkg -l | grep sane
ii  libcommon-sense-perl  3.75-1+b1 
  amd64module that implements some sane defaults for Perl programs
ii  libkf5sane-data   19.08.1-1 
  all  scanner library (data files)
ii  libkf5sane5:amd64 19.08.1-1+b1  
  amd64scanner library (runtime)
ii  libsane:amd64 1.0.27-3.2+b1 
  amd64API library for scanners
ii  libsane:i386  1.0.27-3.2+b1 
  i386 API library for scanners
ii  libsane-common1.0.27-3.2
  all  API library for scanners -- documentation and support files
ii  libsane-hpaio:amd64   3.20.5+dfsg0-3
  amd64HP SANE backend for multi-function peripherals
ii  sane  1.0.14-15 
  amd64scanner graphical frontends
ii  sane-utils1.0.27-3.2+b1 
  amd64API library for scanners -- utilities
ii  xsane 0.999-8   
  amd64featureful graphical frontend for SANE (Scanner Access Now 
Easy)
ii  xsane-common  0.999-8   
  all  xsane architecture independent files

Are there any remaining quirks which are not documented here preventing a patch 
release? If not, please release the new version to testing.

Thanks for maintaining sane,

Chris



Bug#918358: libsane:amd64: Missing permissions for scanner group on usb device

2019-12-26 Thread Chris Nospam
On my Buster machine I can completely reproduce that. However, things are more 
complicated. For any somehow newer Epson scanner one needs to install the 
vendor drivers from http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX 
, e.g., like it i the case for my Perfection V37.

While installing the package iscan-data-xx.deb (among others of them), 
/lib/udev/60-iscan.rules was generated which is basically a copy of the 
60-libsane.rules file of the machine, enriched with some own rules. Once I 
installed iscan-data there was the old operating version of 60-libsance.rules 
and thus the generated 60-iscan.rules contains the rule to set the ACL right on 
the device file.

Thus, until now installing a new version iscan 2.30.4, I noticed nothing, 
although I have had updated libsane continuously. But now the dance started.
During installation of iscan-data the (contained and quite naive) post-install 
script /usr/lib/iscan-data/make-policy-file tried to generate a new version of 
60-iscan.rules but silently failed as the structure of the parsed 
60-libsane.conf changed. It copied something, but could not manage to include 
alle rules, like the ones about vendor or product ids. And of course no 
ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}" 
as this was not contained any more.

Of course, I know that it is not Debian's fault if a proprietary script of 
Epson fails, however, I think that many people will fall over this and have 
then to find and fix TWO interacting failures. As a workaround I now list a 
manually created version of 60-iscan.conf to put into /etc/udev/rules.6 which 
overrules the not operable version under /lib/...:

ACTION!="add", GOTO="iscan_rules_end"
ENV{DEVTYPE}=="usb_device", GOTO="iscan_create_usb_dev"
SUBSYSTEMS=="scsi", GOTO="iscan_scsi_rules_begin"
SUBSYSTEM=="usb_device", GOTO="iscan_usb_rules_begin"
SUBSYSTEM!="usb_device", GOTO="iscan_usb_rules_end"

# Kernel >= 2.6.22 jumps here
LABEL="iscan_create_usb_dev"

# For Linux >= 2.6.22 without CONFIG_USB_DEVICE_CLASS=y
# If the following rule does not exist on your system yet, uncomment it
# ENV{DEVTYPE}=="usb_device", MODE="0664", OWNER="root", GROUP="root"

# Kernel < 2.6.22 jumps here
LABEL="iscan_usb_rules_begin"

ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0101", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0102", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0103", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0104", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0105", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0106", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0107", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0108", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0109", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="010a", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="010b", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="010c", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="010d", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="010e", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="010f", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0110", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0112", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0114", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0116", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0118", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0119", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="011a", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="011b", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="011c", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="011d", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="011e", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="011f", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0120", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0121", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0122", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0126", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0128", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0129", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="012a", ENV{libsane_matched}="yes"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="012b", ENV{libsane_matched}="yes"

Bug#918358: libsane:amd64: Missing permissions for scanner group on usb device

2019-10-17 Thread Florent Rougon
Hello,

Same problem for me as well as for other people at [1]. This happened
after upgrading to 'buster' the machine where the scanner is plugged.
Adding the udev rule fixes the issue. This regression is annoying, it
would be nice for other users if our dear maintainers could fix it. :-)

Thanks & regards

[1] https://www.raspberrypi.org/forums/viewtopic.php?t=243513

-- 
Florent



Bug#918358: libsane:amd64: Missing permissions for scanner group on usb device

2019-10-17 Thread Jürgen Mellinger
I experience the same problem with 1.0.27-3.2.
Inspecting the udev rules, I found that the file 60-libsane.rules is missing a 
line to apply permissions to the device if it has been recognized.
Such a line is present towards the file’s end in older versions:

ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"

Putting this line into a file /etc/udev/rules.d/65-libsane.rules allows 
scanners to be recognized normally after a reboot.

-Juergen


On Sat, 05 Jan 2019 14:46:36 +0100 =?utf-8?q?Alexandre_Vaissi=C3=A8re?= 
 wrote:
> Package: libsane
> Version: 1.0.27-3.1
> Severity: normal
> 
> Dear Maintainer,
> 
> I experience this issue since december 2018. I scan my docs every two monthes,
> so I would not have noticed any change between october and december.
> 
> Context
> ---
> 
> * investigation on the following issue
> https://gitlab.gnome.org/World/OpenPaperwork/paperwork/issues/810
> * Canon LiDE 700F scanner (USB)
> * usage via saned daemon (run by systemd with saned user)
> * saned user is in scanner group
> * I have enabled saned daemon with
> 
>  systemctl enable saned.socket
>  systemctl start saned.socket
> 
> 
> Observed behaviour
> --
> 
> saned seems to never find my device.
> 
> Indeed here are the results of sane-find-scanner, run by saned and by root:
> 
> $ sudo -u saned sane-find-scanner -q
> could not open USB device 0x0b05/0x179c at 003:007: Access denied 
> (insufficient
> permissions)
> could not open USB device 0x0451/0x8142 at 003:015: Access denied 
> (insufficient
> permissions)
> could not open USB device 0x04a9/0x1907 at 003:014: Access denied 
> (insufficient
> permissions)
> could not open USB device 0x0451/0x8142 at 003:013: Access denied 
> (insufficient
> permissions)
> could not open USB device 0x046d/0xc52b at 003:004: Access denied 
> (insufficient
> permissions)
> could not open USB device 0x1050/0x0407 at 003:006: Access denied 
> (insufficient
> permissions)
> could not open USB device 0x05e3/0x0608 at 003:003: Access denied 
> (insufficient
> permissions)
> could not open USB device 0x8087/0x0024 at 003:002: Access denied 
> (insufficient
> permissions)
> could not open USB device 0x1d6b/0x0002 at 003:001: Access denied 
> (insufficient
> permissions)
> could not open USB device 0x1d6b/0x0003 at 006:001: Access denied 
> (insufficient
> permissions)
> could not open USB device 0x1d6b/0x0002 at 005:001: Access denied 
> (insufficient
> permissions)
> could not open USB device 0x1d6b/0x0003 at 004:001: Access denied 
> (insufficient
> permissions)
> could not open USB device 0x1d6b/0x0002 at 002:001: Access denied 
> (insufficient
> permissions)
> could not open USB device 0x8087/0x0024 at 001:002: Access denied 
> (insufficient
> permissions)
> could not open USB device 0x1d6b/0x0002 at 001:001: Access denied 
> (insufficient



Bug#918358: libsane:amd64: Missing permissions for scanner group on usb device

2019-01-05 Thread Alexandre Vaissière
Package: libsane
Version: 1.0.27-3.1
Severity: normal

Dear Maintainer,

I experience this issue since december 2018. I scan my docs every two monthes,
so I would not have noticed any change between october and december.

Context
---

* investigation on the following issue
https://gitlab.gnome.org/World/OpenPaperwork/paperwork/issues/810
* Canon LiDE 700F scanner (USB)
* usage via saned daemon (run by systemd with saned user)
* saned user is in scanner group
* I have enabled saned daemon with

 systemctl enable saned.socket
 systemctl start saned.socket


Observed behaviour
--

saned seems to never find my device.

Indeed here are the results of sane-find-scanner, run by saned and by root:

$ sudo -u saned sane-find-scanner -q
could not open USB device 0x0b05/0x179c at 003:007: Access denied (insufficient
permissions)
could not open USB device 0x0451/0x8142 at 003:015: Access denied (insufficient
permissions)
could not open USB device 0x04a9/0x1907 at 003:014: Access denied (insufficient
permissions)
could not open USB device 0x0451/0x8142 at 003:013: Access denied (insufficient
permissions)
could not open USB device 0x046d/0xc52b at 003:004: Access denied (insufficient
permissions)
could not open USB device 0x1050/0x0407 at 003:006: Access denied (insufficient
permissions)
could not open USB device 0x05e3/0x0608 at 003:003: Access denied (insufficient
permissions)
could not open USB device 0x8087/0x0024 at 003:002: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0002 at 003:001: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0003 at 006:001: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0002 at 005:001: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0003 at 004:001: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0002 at 002:001: Access denied (insufficient
permissions)
could not open USB device 0x8087/0x0024 at 001:002: Access denied (insufficient
permissions)
could not open USB device 0x1d6b/0x0002 at 001:001: Access denied (insufficient
permissions)

$ sudo sane-find-scanner -q
found USB scanner (vendor=0x04a9 [Canon], product=0x1907 [CanoScan],
chip=GL847) at libusb:003:014

saned user does not have the proper permissions!

Expected behaviour
--

saned user should see my scanner, so that this scanner is usable via saned
daemon.

Possible lead
-

It seems to me that the /lib/udev/rules.d/60-libsane.rules file should contain
an action line such as

ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"

but i cannot find in my system version of this file.



-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), 
LANGUAGE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libsane:amd64 depends on:
ii  acl2.2.52-3+b1
ii  adduser3.118
ii  libavahi-client3   0.7-4+b1
ii  libavahi-common3   0.7-4+b1
ii  libc6  2.28-2
ii  libgphoto2-6   2.5.21-1
ii  libgphoto2-port12  2.5.21-1
ii  libieee1284-3  0.2.11-13
ii  libjpeg62-turbo1:1.5.2-2+b1
ii  libsane-common 1.0.27-3.1
ii  libsnmp30  5.7.3+dfsg-4+b2
ii  libssl1.1  1.1.1a-1
ii  libtiff5   4.0.10-3
ii  libusb-1.0-0   2:1.0.22-2
ii  udev   240-2

Versions of packages libsane:amd64 recommends:
ii  sane-utils  1.0.27-3.1

Versions of packages libsane:amd64 suggests:
ii  avahi-daemon  0.7-4+b1
ii  hplip 3.18.12+dfsg0-2

-- no debconf information