]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
homectl: fix error handling in shell_is_ok()
authorZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Tue, 5 May 2026 16:37:13 +0000 (18:37 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Tue, 5 May 2026 16:37:13 +0000 (18:37 +0200)
Fixes f233132a67a4c2c6dff053afac2385f570e8e3fe.

src/home/homectl.c

index 37714aa2b018527c7ace1681cbf4bf0ff76c5842..454aa5bfe6bb31718f36923713a9612abb8d06a6 100644 (file)
@@ -2837,7 +2837,7 @@ static int shell_is_ok(const char *path, void *userdata) {
                 return false;
         }
 
-        r = chase_and_access(path, /* root= */ NULL, CHASE_MUST_BE_REGULAR, X_OK, /* ret_path= */ NULL) >= 0;
+        r = chase_and_access(path, /* root= */ NULL, CHASE_MUST_BE_REGULAR, X_OK, /* ret_path= */ NULL);
         if (r == -ENOENT) {
                 log_error_errno(r, "Shell '%s' does not exist, try again.", path);
                 return false;