]> git.ipfire.org Git - thirdparty/systemd.git/commit
user-record: validate JSON shell fields with valid_shell() 41780/head
authorlogical-misha <220645577+logical-misha@users.noreply.github.com>
Fri, 17 Jul 2026 23:17:02 +0000 (23:17 +0000)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 23 Jul 2026 17:57:04 +0000 (02:57 +0900)
commit841ebcbb7d6c5135d52dd180bc4bae8ce9a3d655
treea3c747690cc924b0643fe85262dcbee0b59a1f7b
parent34c60f113e78db7554c5521e856265feb53f1096
user-record: validate JSON shell fields with valid_shell()

The user record loader currently uses a generic filename-or-path check
for shell and fallbackShell. This allows values that homectl rejects,
including relative names, control characters, colons, and trailing
slashes.

Use valid_shell() for all three record locations and cover the top-level,
matching per-machine, and status fallback fields at the loader boundary.

Fixes #43066
src/shared/user-record.c
src/test/test-user-record.c