Package: ksmbd-tools
Version: 3.4.7-1
Severity: minor
X-Debbugs-Cc: edidecarswel...@yahoo.com

After installing the ksmbd-tools package, it enables and starts `ksmbd.service`
by default, which starts `ksmbd.mountd`. The problem arises when `ksmbd.mountd`
spawns a `ksmbd-worker` and the worker attempts to read the nonexistent config
file `/etc/ksmbd/ksmbd.conf`. An example file `/etc/ksmbd/ksmbd.conf.example`
is provided, that requires user intervention to get the proper config setup.

Because of this disconnect, the worker process dies and `ksmbd.mountd` tries to
spawn another one in its place. This happens almost every second, flooding the
system logs, and continues indefinitely until the user stops `ksmbd.service` or 
places a file at `/etc/ksmbd/ksmbd.conf` (even an empty file works). 

I see two solutions here:

1. Create an empty file at the expected location, or

2. Add a `ConditionPathExists` statement to the service:

mkdir /etc/systemd/system/ksmbd.service.d
cat <<EOF >/etc/systemd/system/ksmbd.service.d/override.conf
[service]
ConditionPathExists=/etc/ksmbd/ksmbd.conf
EOF

Or it could just be added directly to the service definition that ships with
the package. Here's the log spam, for reference:

ksmbd[3585871]: [ksmbd.mountd/3585871]: INFO: Worker PID 1254218 changed state
ksmbd[1255342]: [ksmbd-worker/1255342]: INFO: User database does not exist, 
only guest sessions may work
ksmbd[1255342]: [ksmbd-worker/1255342]: ERROR: Failed to parse configuration 
file
ksmbd[3585871]: [ksmbd.mountd/3585871]: INFO: Worker PID 1255342 changed state
ksmbd[1255343]: [ksmbd-worker/1255343]: INFO: User database does not exist, 
only guest sessions may work
ksmbd[1255343]: [ksmbd-worker/1255343]: ERROR: Failed to parse configuration 
file
ksmbd[3585871]: [ksmbd.mountd/3585871]: INFO: Worker PID 1255343 changed state
ksmbd[1257501]: [ksmbd-worker/1257501]: INFO: User database does not exist, 
only guest sessions may work
ksmbd[1257501]: [ksmbd-worker/1257501]: ERROR: Failed to parse configuration 
file
ksmbd[3585871]: [ksmbd.mountd/3585871]: INFO: Worker PID 1257501 changed state
ksmbd[1257502]: [ksmbd-worker/1257502]: INFO: User database does not exist, 
only guest sessions may work
ksmbd[1257502]: [ksmbd-worker/1257502]: ERROR: Failed to parse configuration 
file
ksmbd[3585871]: [ksmbd.mountd/3585871]: INFO: Worker PID 1257502 changed state
...


R/S

Eddie Carswell

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

Kernel: Linux 6.1.0-20-amd64 (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, 
TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ksmbd-tools depends on:
ii  libc6             2.36-9+deb12u5
ii  libglib2.0-0      2.74.6-2
ii  libnl-3-200       3.7.0-0.2+b1
ii  libnl-genl-3-200  3.7.0-0.2+b1

ksmbd-tools recommends no packages.

ksmbd-tools suggests no packages.

-- no debconf information

Reply via email to