• Bug#1104169: wish: adduser _radvd on new installs

    From Geert Stappers@1:229/2 to Chris Hofstaedtler on Sat Apr 26 22:40:01 2025
    XPost: linux.debian.bugs.dist
    From: stappers@debian.org

    On Sat, Apr 26, 2025 at 07:20:38PM +0200, Chris Hofstaedtler wrote:
    On Sat, Apr 26, 2025 at 05:26:33PM +0200, Geert Stappers wrote:
    Package: radvd

    Wish: Do `adduser _radvd` on new installs.
    Actual: Make it possible to increase Standards-Version.


    Standards-Version 4.5.0
    Released January, 2020.

    9.2.1
    When maintainers choose a new hardcoded or dynamically generated
    username for packages to use, they should start this username with
    an underscore.

    radvd picked a username in the past,
    it is not picking a new username.

    The plan is to pick a new username ....

    --- a/debian/radvd.postinst
    +++ b/debian/radvd.postinst
    @@ -3,8 +3,8 @@
    set -e

    if [ "" = configure ]; then
    - if ! getent passwd radvd >/dev/null; then
    - adduser --quiet --system --no-create-home --home /run/radvd radvd
    + if ! getent passwd _radvd >/dev/null; then
    + adduser --quiet --system --no-create-home --home /run/radvd _radvd
    fi
    for i in /run/radvd; do
    if dpkg-statoverride --list >/dev/null; then
    --- a/debian/radvd.init
    +++ b/debian/radvd.init
    @@ -16,7 +16,7 @@ DESC=radvd
    CONFIG=/etc/radvd.conf
    PIDDIR=/var/run/radvd
    PIDFILE=/radvd.pid
    -OPTIONS="-u radvd -p "
    +OPTIONS="-u _radvd -p "
    PROC_SYS_IP6_FORWARDING=/proc/sys/net/ipv6/conf/all/forwarding

    . /lib/lsb/init-functions


    There is no requirement to change the username

    acknowledge

    Advantage I see is that systems getting a system user
    that can by the leading underscore easily identified as system user.

    and it's probably a bad idea.

    One disadvantage I see is upgraded systems getting
  • From Bastian Blank@1:229/2 to Geert Stappers on Sat Apr 26 22:50:01 2025
    XPost: linux.debian.bugs.dist
    From: waldi@debian.org

    On Sat, Apr 26, 2025 at 10:18:46PM +0200, Geert Stappers wrote:
    The plan is to pick a new username ....

    While you are at it, please switch to sysusers (see dh_installsysusers).

    --- a/debian/radvd.init
    +++ b/debian/radvd.init
    @@ -16,7 +16,7 @@ DESC=radvd
    CONFIG=/etc/radvd.conf
    PIDDIR=/var/run/radvd
    PIDFILE=/radvd.pid
    -OPTIONS="-u radvd -p "
    +OPTIONS="-u _radvd -p "
    PROC_SYS_IP6_FORWARDING=/proc/sys/net/ipv6/conf/all/forwarding

    Where is the corresponding change in the systemd unit? Do you need to
    store persistent data accessible by others, or could you just switch to
    dynamic user allocation? (DynamicUser=true)

    Bastian

    --
    If I can have honesty, it's easier to overlook mistakes.
    -- Kirk, "Space Seed", stardate 3141.9

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Geert Stappers@1:229/2 to Bastian Blank on Sun Apr 27 14:10:01 2025
    XPost: linux.debian.bugs.dist
    From: stappers@stappers.nl

    On Sat, Apr 26, 2025 at 10:29:07PM +0200, Bastian Blank wrote:
    On Sat, Apr 26, 2025 at 10:18:46PM +0200, Geert Stappers wrote:
    --- a/debian/radvd.init
    +++ b/debian/radvd.init

    Where is the corresponding change in the systemd unit?

    Work in progress, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1104229


    Groeten
    Geert Stappers
    --
    Silence is hard to parse

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)