diff options
author | Daniil Baturin <daniil@vyos.io> | 2024-08-13 09:32:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-13 09:32:50 +0100 |
commit | 948efe77310820a39083745573ae99644e30ef6e (patch) | |
tree | c7c18f627f50f8667333a5927bc86d29f152be3e /src/shim/vyshim.c | |
parent | dc34fb02dfdc1c271ff73555a0cf707d9b4f7a2d (diff) | |
parent | a55e35470a4b76cab4193e287235f8c6900b6a58 (diff) | |
download | vyos-1x-948efe77310820a39083745573ae99644e30ef6e.tar.gz vyos-1x-948efe77310820a39083745573ae99644e30ef6e.zip |
Merge pull request #3974 from vyos/mergify/bp/circinus/pr-3937
configd: T6633: inject missing env vars for configfs utility (backport #3937)
Diffstat (limited to 'src/shim/vyshim.c')
-rw-r--r-- | src/shim/vyshim.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/shim/vyshim.c b/src/shim/vyshim.c index 4d836127d..a78f62a7b 100644 --- a/src/shim/vyshim.c +++ b/src/shim/vyshim.c @@ -185,6 +185,20 @@ int initialization(void* Requester) } debug_print("sudo_user is %s\n", sudo_user); + char *temp_config_dir = getenv("VYATTA_TEMP_CONFIG_DIR"); + if (!temp_config_dir) { + char none[] = ""; + temp_config_dir = none; + } + debug_print("temp_config_dir is %s\n", temp_config_dir); + + char *changes_only_dir = getenv("VYATTA_CHANGES_ONLY_DIR"); + if (!changes_only_dir) { + char none[] = ""; + changes_only_dir = none; + } + debug_print("changes_only_dir is %s\n", changes_only_dir); + debug_print("Sending init announcement\n"); char *init_announce = mkjson(MKJSON_OBJ, 1, MKJSON_STRING, "type", "init"); @@ -252,6 +266,16 @@ int initialization(void* Requester) zmq_recv(Requester, buffer, 16, 0); debug_print("Received sudo_user receipt\n"); + debug_print("Sending config session temp_config_dir\n"); + zmq_send(Requester, temp_config_dir, strlen(temp_config_dir), 0); + zmq_recv(Requester, buffer, 16, 0); + debug_print("Received temp_config_dir receipt\n"); + + debug_print("Sending config session changes_only_dir\n"); + zmq_send(Requester, changes_only_dir, strlen(changes_only_dir), 0); + zmq_recv(Requester, buffer, 16, 0); + debug_print("Received changes_only_dir receipt\n"); + return 0; } |