From: Zbigniew Jędrzejewski-Szmek Date: Mon, 2 Feb 2026 14:16:10 +0000 (+0100) Subject: ask-password: remove files in /run when query is aborted X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65f72f5dbbb2cd9c75b8ebca96f0e92d4a8e8b4f;p=thirdparty%2Fsystemd.git ask-password: remove files in /run when query is aborted Because of the missing 'goto', if the query was aborted, we would leave behind the ask.* ini file. --- diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index b8602eee788..57536688005 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -1004,8 +1004,10 @@ int ask_password_agent( goto finish; } - if (req->hup_fd >= 0 && pollfd[hup_fd_idx].revents & POLLHUP) - return -ECONNRESET; + if (req->hup_fd >= 0 && pollfd[hup_fd_idx].revents & POLLHUP) { + r = -ECONNRESET; + goto finish; + } if (inotify_fd >= 0 && pollfd[inotify_idx].revents != 0) { (void) flush_fd(inotify_fd);