Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 927375 - media-gfx/sane-backends-1.2.1[-systemd]: add options to configure default listening address and port
Summary: media-gfx/sane-backends-1.2.1[-systemd]: add options to configure default lis...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-20 18:34 UTC by i.Dark_Templar
Modified: 2024-03-20 18:40 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description i.Dark_Templar 2024-03-20 18:34:50 UTC
saned provides two options to configure listening address and port. Otherwise, by default it listens whole world, i.e. :::6566 if you have ipv6. And while there are options to change that, Gentoo by default doesn't provide configuration for them in openrc scripts. It would be great to provide them.

Options in question are '-b address' (--bind=address) and '-p port' (--port=port).

Reproducible: Always

Steps to Reproduce:
1. emerge -1 sane-backends
2. $EDITOR /etc/conf.d/saned
Actual Results:  
Only username setting is available

Expected Results:  
Username, address and port settings are exposed

Changes like these could do the job:

diff --git a/conf.d/saned b/conf.d/saned
index adb1eab..3be1ad9 100644
--- a/conf.d/saned
+++ b/conf.d/saned
@@ -1,2 +1,4 @@
 # The user saned should drop its privileges to after startup
 #SANED_USER=""
+#SANED_ADDRESS="127.0.0.1"
+#SANED_PORT="6566"

diff --git a/init.d/saned b/init.d/saned
index e7f2ebd..864171d 100755
--- a/init.d/saned
+++ b/init.d/saned
@@ -4,7 +4,7 @@
 
 pidfile="/var/run/saned/saned.pid"
 command="/usr/sbin/saned"
-command_args="-a ${SANED_USER:-root}"
+command_args="-a${SANED_USER:-root} ${SANED_ADDRESS:+-b} ${SANED_ADDRESS} ${SANED_PORT:+-p} ${SANED_PORT}"
 
 start_pre() {
        checkpath -d -o ${SANED_USER:-root} ${pidfile%/*}