Devuan bug report logs - #921
sane-utils: init script prompts for file removal when status is queried by nonroot user

version graph

Package: sane-utils; Maintainer for sane-utils is Devuan developers <devuan-dev@lists.dyne.org>; Source for sane-utils is src:sane-backends.

Reported by: Alexander Rehbein <rehbein.alexander@gmail.com>

Date: Fri, 31 Oct 2025 17:04:01 UTC

Severity: normal

Tags: debian, patch, upstream

Found in version 1.2.1-2

Full log


Message #5 received at submit@bugs.devuan.org (full text, mbox, reply):

Received: (at submit) by bugs.devuan.org; 31 Oct 2025 17:03:03 +0000
Return-Path: <rehbein.alexander@gmail.com>
Delivered-To: bugs@devuan.org
Received: from email.devuan.org [2a01:4f9:fff1:13::5fd9:f9e4]
	by doc.devuan.org with IMAP (fetchmail-6.4.39)
	for <debbugs@localhost> (single-drop); Fri, 31 Oct 2025 17:03:03 +0000 (UTC)
Received: from email.devuan.org
	by email.devuan.org with LMTP
	id NFXLKnnrBGkrcgAAmSBk0A
	(envelope-from <rehbein.alexander@gmail.com>)
	for <bugs@devuan.org>; Fri, 31 Oct 2025 17:01:45 +0000
Received: by email.devuan.org (Postfix, from userid 109)
	id 7F302173; Fri, 31 Oct 2025 17:01:45 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on email.devuan.org
X-Spam-Level: ****
X-Spam-Status: No, score=4.4 required=5.0 tests=DKIM_ADSP_CUSTOM_MED,
	FORGED_GMAIL_RCVD,FREEMAIL_FROM,KHOP_HELO_FCRDNS,NML_ADSP_CUSTOM_MED,
	RCVD_IN_PBL,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,
	RCVD_IN_VALIDITY_SAFE,RDNS_DYNAMIC,SPF_SOFTFAIL,SPOOFED_FREEMAIL,
	SPOOF_GMAIL_MID,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no
	version=3.4.6
Received-SPF: Softfail (mailfrom) identity=mailfrom; client-ip=92.196.6.120; helo=[127.0.0.1]; envelope-from=rehbein.alexander@gmail.com; receiver=bugs.devuan.org 
Received: from [127.0.0.1] (port-92-196-6-120.dynamic.as20676.net [92.196.6.120])
	by email.devuan.org (Postfix) with ESMTP id A447D37
	for <submit@bugs.devuan.org>; Fri, 31 Oct 2025 17:01:43 +0000 (UTC)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Alexander Rehbein <rehbein.alexander@gmail.com>
To: Devuan Bug Tracking System <submit@bugs.devuan.org>
Subject: sane-utils: init script prompts for file removal when status is queried by nonroot user
Message-ID: <176193010207.1104.13037963498210612981.reportbug@localhost>
X-Mailer: reportbug 12.0.0+devuan2
Date: Fri, 31 Oct 2025 18:01:42 +0100
Package: sane-utils
Version: 1.2.1-2
Severity: normal
Tags: patch upstream
X-Debbugs-Cc: rehbein.alexander@gmail.com

Dear Maintainer,

when running the command '/usr/sbin/service --status-all' as nonroot,
the script hangs inside '/etc/init.d/saned' until I press 'Enter'.
Same for '/usr/sbin/service saned status'.

I would expect the command to just finish outputting all statuses.

It's an easy fix, just add the '-f' flag to the 'rm' command.

I did this and now both commands run through for nonroot without waiting for input.

Thank you

Alexander

-- System Information:
Distributor ID:	Devuan
Description:	Devuan GNU/Linux 5 (daedalus)
Release:	5
Codename:	daedalus
Architecture: x86_64

Kernel: Linux 6.1.0-40-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages sane-utils depends on:
ii  adduser                          3.134
ii  debconf [debconf-2.0]            1.5.82
ii  init-system-helpers              1.65.2devuan1
ii  libavahi-client3                 0.8-10+deb12u1devuan1
ii  libavahi-common3                 0.8-10+deb12u1devuan1
ii  libc6                            2.36-9+deb12u13
ii  libelogind-compat [libsystemd0]  246.10-5
ii  libieee1284-3                    0.2.11-14
ii  libjpeg62-turbo                  1:2.1.5-2
ii  libpng16-16                      1.6.39-2
ii  libsane1                         1.2.1-2
ii  libusb-1.0-0                     2:1.0.26-1
ii  libxml2                          2.9.14+dfsg-1.3~deb12u4
ii  update-inetd                     4.53

sane-utils recommends no packages.

Versions of packages sane-utils suggests:
ii  avahi-daemon  0.8-10+deb12u1devuan1
pn  unpaper       <none>

-- Configuration Files:
/etc/init.d/saned changed:
. /lib/lsb/init-functions
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/saned
NAME=saned
DESC="SANE network scanner server"
test -x $DAEMON || exit 0
RUN=no
RUN_AS_USER=saned
. /lib/lsb/init-functions
if [ -f /etc/default/saned ] ; then
    . /etc/default/saned
fi
DAEMON_OPTS="-a $RUN_AS_USER"
set -e
case "$1" in
  start)
	log_daemon_msg "Starting $DESC" "$NAME"
	start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
		--exec $DAEMON -- $DAEMON_OPTS
	log_end_msg $?
	;;
  stop)
	log_daemon_msg "Stopping $DESC" "$NAME"
	start-stop-daemon --stop --oknodo --quiet --pidfile /var/run/$NAME.pid \
		--retry 10 --exec $DAEMON
	log_end_msg $?
	;;
  force-reload)
	# check whether $DAEMON is running. If so, restart
	start-stop-daemon --stop --test --quiet --pidfile \
		/var/run/$NAME.pid --exec $DAEMON \
	&& $0 restart \
	|| exit 0
	;;
  restart)
	log_daemon_msg "Restarting $DESC" "$NAME"
	$0 stop
	$0 start
	;;
  status)
	if [ -s /var/run/$NAME.pid ]; then
            RUNNING=$(cat /var/run/$NAME.pid)
            if [ -d /proc/$RUNNING ]; then
                if [ $(readlink /proc/$RUNNING/exe) = $DAEMON ]; then
                    log_success_msg "$NAME is running"
                    exit 0
                fi
            fi
            # No such PID, or executables don't match
            log_failure_msg "$NAME is not running, but pidfile existed"
            rm -f /var/run/$NAME.pid
            exit 1
        else
            rm -f /var/run/$NAME.pid
            log_failure_msg "$NAME not running"
            exit 1
        fi
	;;
  *)
	N=/etc/init.d/$NAME
	log_failure_msg "Usage: $N {start|stop|restart|force-reload}"
	exit 1
	;;
esac


-- debconf information excluded

Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Fri Nov 7 21:35:35 2025;