Porównaj commity

...

4 Commity

Autor SHA1 Wiadomość Data
symphorien 9eeac6dff6 Merge branch 'full-saned' into 'master'
saned: add option to allow relaying network scanners

See merge request sane-project/backends!834
2024-04-25 21:08:22 +00:00
Ralph Little 0f472aa205 Merge branch 'editorconfig_inline_comment' into 'master'
.editorconfig: inline comments are forbidden

See merge request sane-project/backends!832
2024-04-19 19:53:22 +00:00
Guillaume Girol a6d63a72ec .editorconfig: inline comments are forbidden
source: https://spec.editorconfig.org/#no-inline-comments

this makes neovim unhappy, at least.
2024-02-26 12:00:00 +00:00
Guillaume Girol 849e48c58b saned: add option to allow relaying network scanners
My intended use case is the following:
I want to compile saned backends with different libraries (for example
glibc) than a specific application (as if it were a chroot of another
distro version). This application cannot dlopen sane
backends because of the library mismatch.
The specific application will be
built with a stripped down libsane that only has the net backend,
and therefore very few dependencies. The net backend points to saned.
saned has a full config and set of backends, and is responsible for
exporting all scanners to the application. This option allows to
reexport network scanners this way. I only have to make sure saned does
not contact itself.
2024-02-25 12:00:00 +00:00
3 zmienionych plików z 23 dodań i 3 usunięć

Wyświetl plik

@ -6,7 +6,8 @@
# Your editor may need a plugin for this configuration to take effect.
# See http://editorconfig.org/#download for details.
root = true ; look no further
; look no further
root = true
[*]
charset = utf-8

Wyświetl plik

@ -92,6 +92,18 @@ will request
.B saned
to detach from the console and run in the background.
.TP
.BR \-n ", " \-\-allow\-network
allows
.B saned
to use network scanners. By default this is forbidden to prevent
.B saned
from contacting itself. When enabled, the configuration of the
.BR sane-net (5)
backend should not mention the address on which
.B saned
is listening.
.TP
.BR \-o ", " \-\-once
requests that

Wyświetl plik

@ -254,6 +254,7 @@ static int debug;
static int run_mode;
static int run_foreground;
static int run_once;
static int allow_network;
static int data_connect_timeout = 4000;
static Handle *handle;
static char *bind_addr;
@ -1869,7 +1870,7 @@ process_request (Wire * w)
reply.status =
sane_get_devices ((const SANE_Device ***) &reply.device_list,
SANE_TRUE);
!allow_network);
sanei_w_reply (w, (WireCodecFunc) sanei_w_get_devices_reply, &reply);
}
break;
@ -3436,6 +3437,7 @@ static void usage(char *me, int err)
" -a, --alone[=user] equal to `-l -D -u user'\n"
" -l, --listen run in standalone mode (listen for connection)\n"
" -u, --user=user run as `user'\n"
" -n, --allow-network allow saned to use network scanners\n"
" -D, --daemonize run in background\n"
" -o, --once exit after first client disconnects\n"
" -d, --debug=level set debug level `level' (default is 2)\n"
@ -3457,6 +3459,7 @@ static struct option long_options[] =
{"alone", optional_argument, 0, 'a'},
{"listen", no_argument, 0, 'l'},
{"user", required_argument, 0, 'u'},
{"allow-network", no_argument, 0, 'n'},
{"daemonize", no_argument, 0, 'D'},
{"once", no_argument, 0, 'o'},
{"debug", required_argument, 0, 'd'},
@ -3488,8 +3491,9 @@ main (int argc, char *argv[])
run_mode = SANED_RUN_INETD;
run_foreground = SANE_TRUE;
run_once = SANE_FALSE;
allow_network = SANE_FALSE;
while((c = getopt_long(argc, argv,"ha::lu:Dod:eb:p:B:", long_options, &long_index )) != -1)
while((c = getopt_long(argc, argv,"ha::lu:nDod:eb:p:B:", long_options, &long_index )) != -1)
{
switch(c) {
case 'a':
@ -3504,6 +3508,9 @@ main (int argc, char *argv[])
case 'u':
user = optarg;
break;
case 'n':
allow_network = SANE_TRUE;
break;
case 'D':
run_foreground = SANE_FALSE;
break;