]> git.ipfire.org Git - thirdparty/shadow.git/commit
utmp: call prepare_utmp() even if utent is NULL
authorIker Pedrosa <ipedrosa@redhat.com>
Fri, 15 Sep 2023 07:55:02 +0000 (09:55 +0200)
committerAlejandro Colomar <alx@kernel.org>
Sun, 29 Oct 2023 23:00:19 +0000 (00:00 +0100)
commitde50b394757eedcfa86298971cc20176ed8778ba
treec61bd2373dd4b31e7f61ff02a03c4e9134f3f54e
parentb5c99ec30eb5fbe46ed3f4d7bf03415132850a30
utmp: call prepare_utmp() even if utent is NULL

update_utmp() should also return 0 when success.

Fixes: 1f368e1c1838de9d476a36897d7c53394569de08 ("utmp: update
`update_utmp()")
Resolves: https://github.com/shadow-maint/shadow/issues/805

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Cherry-picked-from: 5178f8c5afb612f6ddf5363823547e080e7f546b
Link: <https://github.com/shadow-maint/shadow/issues/805>
Link: <https://github.com/shadow-maint/shadow/pull/808>
Reviewed-by: Michael Vetter <jubalh@iodoru.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/utmp.c