]> git.ipfire.org Git - thirdparty/systemd.git/commit
homed: fix home_unlocking_finish reporting success as failure
authordongshengyuan <545258830@qq.com>
Thu, 25 Jun 2026 03:30:25 +0000 (11:30 +0800)
committerLennart Poettering <lennart@poettering.net>
Thu, 25 Jun 2026 15:14:23 +0000 (17:14 +0200)
commitf301d07ac6d7cceda367dcf6c423bcdfece8bd59
tree62ed2583a40ec60d215192010ef0cc58c7c26d90
parentb2fcb12af9989619aa339d341879031925a7ae6c
homed: fix home_unlocking_finish reporting success as failure

In home_unlocking_finish(), the success path calls operation_result_unref()
with the local variable r and the uninitialized error object. If either
user_record_good_authentication() or home_save_record() fails (both are
logged as "ignoring"), r is left negative and the D-Bus caller receives
an error reply despite the home having been unlocked successfully.

This causes PAM to reject the session even though the home directory is
mounted and accessible.

Fix by passing 0 and NULL — consistent with every other success path in
the file (home_locking_finish(), home_activation_finish(), etc.).

Signed-off-by: dongshengyuan <dongshengyuan@uniontech.com>
src/home/homed-home.c