]> git.feebdaed.xyz Git - 0xmirror/strongswan.git/commitdiff
agent: Fix compiler warning when building with clang master
authorTobias Brunner <tobias@strongswan.org>
Fri, 12 Dec 2025 14:59:38 +0000 (15:59 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 12 Dec 2025 14:59:38 +0000 (15:59 +0100)
Fixes: 8b467ad39a76 ("agent: Add option to open socket as specific user")
src/libstrongswan/plugins/agent/agent_private_key.c

index c1d371cb6f6d9acbe2cac10ffe7ba13f02b92582..802298cc9b0ff82e920b13c7f89aad1939932d19 100644 (file)
@@ -188,6 +188,7 @@ static int open_connection(char *path, char *user)
                                close(s);
                                return -1;
                        case 0:
+                       {
                                /* child, do everything manually to avoid interacting with
                                 * mutexes etc. that are potentially locked in the parent */
                                struct passwd *pwp;
@@ -209,6 +210,7 @@ static int open_connection(char *path, char *user)
                                }
                                exit(EXIT_FAILURE);
                                /* not reached */
+                       }
                        default:
                                /* parent */
                                if (waitpid(pid, &status, 0) == -1 ||