]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
swanctl: Clear config from memory
authorTobias Brunner <tobias@strongswan.org>
Thu, 30 Sep 2021 13:16:48 +0000 (15:16 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 4 Oct 2021 09:30:03 +0000 (11:30 +0200)
The 'secrets' section in the config file may contain passwords/PINs.

src/swanctl/commands/load_all.c
src/swanctl/commands/load_authorities.c
src/swanctl/commands/load_conns.c
src/swanctl/commands/load_creds.c
src/swanctl/commands/load_pools.c

index d0032467ac2087a4c6b09cd2d06300368d2c0a56..1b1cf2a8fb11019824126cc4aeb246909d58a84e 100644 (file)
@@ -86,7 +86,7 @@ static int load_all(vici_conn_t *conn)
                ret = load_conns_cfg(conn, format, cfg);
        }
 
-       cfg->destroy(cfg);
+       cfg->destroy_clear(cfg);
 
        return ret;
 }
index 832509bf4d739084d8cea2fd12f1a77150dfc8d2..95a29f7dd5e3f87f30960b7cd84f3a63f0668ffb 100644 (file)
@@ -345,7 +345,7 @@ static int load_authorities(vici_conn_t *conn)
 
        ret = load_authorities_cfg(conn, format, cfg);
 
-       cfg->destroy(cfg);
+       cfg->destroy_clear(cfg);
 
        return ret;
 }
index 47e434956bbdf1259969432f242d36d1c939acf9..76d78a0d7db9247bbc63d553f21b2106307bd7e6 100644 (file)
@@ -462,7 +462,7 @@ static int load_conns(vici_conn_t *conn)
 
        ret = load_conns_cfg(conn, format, cfg);
 
-       cfg->destroy(cfg);
+       cfg->destroy_clear(cfg);
 
        return ret;
 }
index c6c24d2337473aa00a0222c0e2e83d2aa3bf9c3a..3c58f3bdcc5fb23850dd007779e6501b569ff6a9 100644 (file)
@@ -990,7 +990,7 @@ static int load_creds(vici_conn_t *conn)
 
        ret = load_creds_cfg(conn, format, cfg, clear, noprompt);
 
-       cfg->destroy(cfg);
+       cfg->destroy_clear(cfg);
 
        return ret;
 }
index a3bbcfd3ae5967102bd8e93c1b8773e5ed308cb3..f698c07c7722fadf3901a6f74cbd4f49f98e4e03 100644 (file)
@@ -285,7 +285,7 @@ static int load_pools(vici_conn_t *conn)
 
        ret = load_pools_cfg(conn, format, cfg);
 
-       cfg->destroy(cfg);
+       cfg->destroy_clear(cfg);
 
        return ret;
 }