Your message dated Thu, 26 Jan 2017 21:36:13 +0000
with message-id <[email protected]>
and subject line Bug#821255: fixed in sane-backends 1.0.25-3
has caused the Debian Bug report #821255,
regarding sane-backends: saned option to report network-attached devices
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
821255: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=821255
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: sane-backends
Version: 1.0.25-2
Severity: wishlist
Tags: patch

Dear Maintainer,

Recently I needed to implement access control to a network-attached
scanner and found out saned can be used for that if it's made to report
network-attached devices. Then I found that a patch to implement this
feature was sent upstream in 2014 but it has not been included yet.
After some minor changes I've applied that patch to the current
sane-backends source and I've verified that it works as expected; the
network-attached scanner is reported by saned and it can successfully be
used with xsane.

Attached you will find a debdiff with the updated patch. I think that
the possibility of implementing access control to a network-attached
device is an useful feature that may be considered for inclusion ahead
of upstream.

Best regards,


-- System Information:
Debian Release: 8.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=es_VE.UTF-8, LC_CTYPE=es_VE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)


-- 
Dhionel Díaz
Centro Nacional de Desarrollo e Investigación en Tecnologías Libres
Ministerio del Poder Popular para
Educación Universitaria, Ciencia y Tecnología
diff -Nru sane-backends-1.0.25/debian/patches/0233-saned-remotescanners.patch sane-backends-1.0.25/debian/patches/0233-saned-remotescanners.patch
--- sane-backends-1.0.25/debian/patches/0233-saned-remotescanners.patch	1969-12-31 20:00:00.000000000 -0400
+++ sane-backends-1.0.25/debian/patches/0233-saned-remotescanners.patch	2016-04-13 18:38:35.000000000 -0430
@@ -0,0 +1,159 @@
+Description: saned option to report network-attached devices to clients
+Author: Jens-U. Mozdzen <[email protected]>
+Author: Dhionel Díaz <[email protected]>
+Bug: https://alioth.debian.org/tracker/index.php?func=detail&aid=314768&group_id=30186&atid=410366
+Last-Update: 2016-04-13
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/doc/saned.man
++++ b/doc/saned.man
+@@ -10,6 +10,7 @@
+ .I [ n ]
+ .B | \-s
+ .I [ n ]
++.B | \-r
+ .B | \-h
+ .B ]
+ .SH DESCRIPTION
+@@ -37,6 +38,14 @@
+ .B saned
+ will drop root privileges and run as this user (and group).
+ .PP
++If the
++.B \-r
++flag is specified, saned will also report remote scanners (those that are accessed
++via saned's "net" backend) when receiving an inquiry to list all devices. As the
++remote scanner may not be available at the time of the request, enabling this
++option may cause a significant delay, experienced by the remote client.
++Default is not to report those scanners.
++.PP
+ The
+ .B \-d
+ and
+@@ -94,6 +103,14 @@
+ machine, we strongly recommend using the Netfilter
+ \fInf_conntrack_sane\fP module instead.
+ .PP
++\fBreexport_remote_scanners\fP = \fI[ true | yes | 1 ]\fP
++Enables reporting remote scanners (those accessed via saned's "net"
++backend) to clients. As the remote scanner may not be available at
++the time of the request, enabling this option may cause a significant
++delay, experienced by the remote client.
++Any value other than "true", "yes" or "1" will keep this option disabled,
++which is the default when this option nor the command line flag "-r" is specified.
++.PP
+ The access list is a list of host names, IP addresses or IP subnets
+ (CIDR notation) that are permitted to use local SANE devices. IPv6
+ addresses must be enclosed in brackets, and should always be specified
+--- a/frontend/saned.c
++++ b/frontend/saned.c
+@@ -246,6 +246,7 @@
+ static int num_handles;
+ static int debug;
+ static int run_mode;
++static SANE_Bool reexport_remote_scanners_disabled = SANE_TRUE;
+ static Handle *handle;
+ static union
+ {
+@@ -1834,7 +1835,7 @@
+ 
+ 	reply.status =
+ 	  sane_get_devices ((const SANE_Device ***) &reply.device_list,
+-			    SANE_TRUE);
++			    reexport_remote_scanners_disabled);
+ 	sanei_w_reply (w, (WireCodecFunc) sanei_w_get_devices_reply, &reply);
+       }
+       break;
+@@ -2697,6 +2698,23 @@
+                   DBG (DBG_INFO, "read_config: data port range: %d - %d\n", data_port_lo, data_port_hi);
+                 }
+             }
++          else if (strstr(config_line, "reexport_remote_scanners") != NULL)
++            {
++              optval = sanei_config_skip_whitespace (++optval);
++	      if ((optval != NULL) && (*optval != '\0'))
++	        {
++		  if (optval == endval)
++		    {
++                      DBG (DBG_ERR, "read_config: invalid value for data_portrange\n");
++                      continue;
++                    }
++		  else if ((strcmp( optval, "yes") == 0) || (strcmp( optval, "true") == 0) ||(strcmp( optval, "1") == 0))
++		    {
++                      reexport_remote_scanners_disabled = SANE_FALSE;
++                      DBG (DBG_INFO, "main: enabled serving remote scanner devices\n");
++		    }
++		}
++            }
+         }
+       fclose (fp);
+       DBG (DBG_INFO, "read_config: done reading config\n");
+@@ -3274,35 +3292,43 @@
+   numchildren = 0;
+   run_mode = SANED_RUN_INETD;
+ 
+-  if (argc >= 2)
+-    {
+-      if (strncmp (argv[1], "-a", 2) == 0)
+-	run_mode = SANED_RUN_ALONE;
+-      else if (strncmp (argv[1], "-d", 2) == 0)
+-	{
+-	  run_mode = SANED_RUN_DEBUG;
+-	  log_to_syslog = SANE_FALSE;
+-	}
+-      else if (strncmp (argv[1], "-s", 2) == 0)
+-	run_mode = SANED_RUN_DEBUG;
+-      else
+-        {
+-          printf ("Usage: saned [ -a [ username ] | -d [ n ] | -s [ n ] ] | -h\n");
+-          if ((strncmp (argv[1], "-h", 2) == 0) ||
+-               (strncmp (argv[1], "--help", 6) == 0))
+-            exit (EXIT_SUCCESS);
+-          else
+-            exit (EXIT_FAILURE);
+-        }
+-    }
++  int optc;
+ 
+-  if (run_mode == SANED_RUN_DEBUG)
+-    {
+-      if (argv[1][2])
+-	debug = atoi (argv[1] + 2);
++  opterr = 0; /* wir wollen keine fremden Ausgaben */
++
++  do {
++    switch (optc = getopt(argc, argv, "ad:s:r")) {
++
++    case 'a': /* stand-alone */
++      run_mode = SANED_RUN_ALONE;
++      break;
++    case 'd': /* debug */
++      run_mode = SANED_RUN_DEBUG;
++      log_to_syslog = SANE_FALSE;
+ 
++      debug = atoi( optarg);
+       DBG (DBG_WARN, "main: starting debug mode (level %d)\n", debug);
++      break;
++    case 's': /* debug to syslog */
++      run_mode = SANED_RUN_DEBUG;
++
++      debug = atoi( optarg);
++      DBG (DBG_WARN, "main: starting debug mode (level %d)\n", debug);
++      break;
++    case 'r': /* re-export network-attached scanners */
++      reexport_remote_scanners_disabled = SANE_FALSE;
++      DBG (DBG_INFO, "main: enabled serving remote scanner devices\n");
++      break;
++    case '?': /* unknown option */
++      printf ("Usage: saned [ -a [ username ] | -d [ n ] | -s [ n ] ] | -r | -h\n");
++      if ((strncmp (argv[1], "-h", 2) == 0) ||
++           (strncmp (argv[1], "--help", 6) == 0))
++        exit (EXIT_SUCCESS);
++      else
++        exit (EXIT_FAILURE);
++      break;
+     }
++  } while (optc != -1);
+ 
+   if (log_to_syslog)
+     openlog ("saned", LOG_PID | LOG_CONS, LOG_DAEMON);
diff -Nru sane-backends-1.0.25/debian/patches/series sane-backends-1.0.25/debian/patches/series
--- sane-backends-1.0.25/debian/patches/series	2015-11-06 22:58:19.000000000 -0430
+++ sane-backends-1.0.25/debian/patches/series	2016-04-16 19:37:14.000000000 -0430
@@ -16,3 +16,4 @@
 0705-kfreebsd.patch
 0710-sane-desc.c_debian_mods.patch
 0125-multiarch_dll_search_path.patch
+0233-saned-remotescanners.patch

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
Source: sane-backends
Source-Version: 1.0.25-3

We believe that the bug you reported is fixed in the latest version of
sane-backends, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jörg Frings-Fürst <[email protected]> (supplier of updated 
sane-backends package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 10 Dec 2016 13:45:15 +0100
Source: sane-backends
Binary: sane-utils libsane-common libsane libsane-dev libsane-dbg
Architecture: source all amd64
Version: 1.0.25-3
Distribution: sid
Urgency: medium
Maintainer: Jörg Frings-Fürst <[email protected]>
Changed-By: Jörg Frings-Fürst <[email protected]>
Description:
 libsane    - API library for scanners
 libsane-common - API library for scanners -- documentation and support files
 libsane-dbg - API development library for scanners [debug symbols]
 libsane-dev - API development library for scanners [development files]
 sane-utils - API library for scanners -- utilities
Closes: 806104 820964 821255 829244
Changes:
 sane-backends (1.0.25-3) unstable; urgency=medium
 .
   * debian/rules:
     - Fix FTBFS when building with 'dpkg-buildpackage -A' (Closes: #806104):
       + Split file into *-arch and *-indep parts.
       + Move "empty dependency_libs in all .la files" to
         override_dh_makeshlibs-arch.
       + Move installing of doc files for libsane-dev to
         override_dh_installdocs-arch.
       + New debian/libsane-dev.dirs.
   * Drop package libsane-bin binary package (Closes: #820964):
     - Remove libsane-bin binary package section, remove it from
       reverse dependencies of other packages in debian/control.
     - Remove debian/libsane-bin.*.
     - New debian/NEWS.Debian.
   * debian/patches:
     - Refresh and fix new typos:
       + 0100-source_spelling.patch
       + 0605-man_typo.patch.
     - New 0135-saned-remotescanners.patch:
         + Add patch to allow saned to report network-attached
         devices (Closes: #821255).
         Thanks to Dhionel Díaz <[email protected]>.
   * debian/watch:
     - Bump version to 4 (no changes required).
   * debian/control:
     - Bump Standards-Version to 3.9.8 (no changes required).
     - Change Vcs-Browser to secure URI.
     - Add lsb-base to Depends for sane-utils.
   * Add year 2016 for debian/* in debian/copyright.
   * debian/sane-utils.saned.init:
     - Fix handling of stop and restart actions (Closes: #829244).
       Thanks to Chris Lamb <[email protected]>.
   * Remove unused lintian overrides.
   * Migrate to debhelper 10:
     - Change debian/compat to 10.
     - Bump minimum debhelper version in debian/control to >= 10.
     - Refresh debian/patches to add changes in Makefile.am:
       + 0005-libsane_deps.patch
       + 0010-unneeded_doc.patch
       + 0015-frontend_libs.patch
       + 0025-multiarch_manpages_libdir.patch
       + 0125-multiarch_dll_search_path.patch
     - Refresh debian/libsane.shlibs
     - Refresh debian/libsane.symbols
Checksums-Sha1:
 8f6ed59f10e135205978501de1f28995de8a284f 2483 sane-backends_1.0.25-3.dsc
 ebc102d45598547bac9359684c2409713a872313 111264 
sane-backends_1.0.25-3.debian.tar.xz
 a590615d8d595b493f07c4f022395fc50e778295 1011858 
libsane-common_1.0.25-3_all.deb
 371f857752c9985565276172d6dd3cec1a5f3884 7055370 libsane-dbg_1.0.25-3_amd64.deb
 e3d4fd4bdb7d80dfeedadf98f8232e10e2d1c29d 2268226 libsane-dev_1.0.25-3_amd64.deb
 340c8956acbc9cee6cf2e0bed5c3d093d64a1660 2112518 libsane_1.0.25-3_amd64.deb
 64594e8c3d2ed9da9778e5b78348a746d27d9a2b 9110 
sane-backends_1.0.25-3_amd64.buildinfo
 c0fd6435640c6a062f986db97e2afab9465d121f 224798 sane-utils_1.0.25-3_amd64.deb
Checksums-Sha256:
 9563ead7c223860ae144fc501c1a3b9a66bd621c151d8a00d25ad7dba5d010e6 2483 
sane-backends_1.0.25-3.dsc
 3210bec326db5d1a8521fe31d8dd93a504fe49441649e7e6be8c804712cd8f76 111264 
sane-backends_1.0.25-3.debian.tar.xz
 9c692ccd3f322d14ef5c03bc91135c3b4ae0b3d3170400bf8256f7d03cad37b2 1011858 
libsane-common_1.0.25-3_all.deb
 8b111270d0cef4defeb48fac131de4daddf19faba9949151f9452f98e398d817 7055370 
libsane-dbg_1.0.25-3_amd64.deb
 2373b2f52b1d17a65c3b105920a16dba7dc327bfec907fe2e58969b2b6bb1519 2268226 
libsane-dev_1.0.25-3_amd64.deb
 9af5dde224410b6de48052db84efe358094b45436415006dfb5378dde4473a83 2112518 
libsane_1.0.25-3_amd64.deb
 fecb113576405eda88f27b4da9f796dc0658255d27b45e59d9889026950881a4 9110 
sane-backends_1.0.25-3_amd64.buildinfo
 120b904f07ec4f6ffa4d14bcc821f6643287c34bd1c1767188eb8344d10da50f 224798 
sane-utils_1.0.25-3_amd64.deb
Files:
 d912b0c3b22e5a186f9934391b65d4d0 2483 graphics optional 
sane-backends_1.0.25-3.dsc
 6df6a85b4b11bca92d8c0c50aee58865 111264 graphics optional 
sane-backends_1.0.25-3.debian.tar.xz
 007fc55045adb4c3770aee4b182f1d08 1011858 libs optional 
libsane-common_1.0.25-3_all.deb
 72c41f29a9c842b7ab3e9f5c0adfbfc0 7055370 debug extra 
libsane-dbg_1.0.25-3_amd64.deb
 9cfe0c6dd507a50c41ac1f1ca6c5af3a 2268226 libdevel optional 
libsane-dev_1.0.25-3_amd64.deb
 3f1682d7ab3880f7dc26c6d07f1a952e 2112518 libs optional 
libsane_1.0.25-3_amd64.deb
 037f8b8cd75f1bab141d9299301a4c9e 9110 graphics optional 
sane-backends_1.0.25-3_amd64.buildinfo
 b3bce2ae0de4acfe3622edb94717f5ce 224798 graphics optional 
sane-utils_1.0.25-3_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEYv+KdYTgKVaVRgAGdCY7N/W1+RMFAliKZTEACgkQdCY7N/W1
+RP6WA/9GpMx25Msp0RPgcIE1rSYBflzCmEixONjUw3SNqfY7ELdMz+gQbkm3k3y
uL5Jwa236ePsEEMm5UtrVqcXswZRcfvadXBu/N9X93DTbc4PA1P4mV8JYgogiTDX
B58JScgflCD//Ml5KNLQQpHlxaMIBAf2rS9oq015RqfBvGB6rRbHQuEOhLmNI8v1
lN37+oyj0DzHvXduff14D+YvfsVMs/Ob3H4e5aRpiQHXILiKs7gr6iY1AAJIr3wW
F57JMVmzDEtfA8r10MCC1lBkhlwUZcFao+XJFaa/DThVRAGM1x1BSEpmFeE/Qv0E
10xb0Fh3XhhvbarYznDEjeGWgYtzams2unKvN4ECqjUsUmuHBKL+Uob/HVRPELyj
BBU3aa98X/I6rEBzvIKRKrXldrq3NrgHMgrlWwSsFDnOlQVpINshKagh1RfrQaix
mfxz7qwwIv5c33YPl7ZwH0ve8apYCaGp00Ws3XmtRx/+wwf8J4k2cFbB3PxF3g43
JFqRqDpQy/LlFCkGWKuImaYp6RGuH8O7AxAKuCiOVlW+kFWvHW6QpdxAVms6zFZg
OdwKq8qyQ5v/EKF20tW47kc1PCXwvqNtzGKIKqKyhtDYj/j3kSfQxuhyeWH+yydN
9Ptoa7dup1GO4BkZ2qp7HqyymodP7CpqaMGSOjsiCt38uzJu/Ps=
=Xm3u
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to