From fc53809803cd2bc2434e312b19a18fa36776da12 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 05:50:40 +0200 Subject: Adding upstream version 256. Signed-off-by: Daniel Baumann --- src/nss-resolve/nss-resolve.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/nss-resolve') diff --git a/src/nss-resolve/nss-resolve.c b/src/nss-resolve/nss-resolve.c index c4e02bc..3cefb63 100644 --- a/src/nss-resolve/nss-resolve.c +++ b/src/nss-resolve/nss-resolve.c @@ -20,7 +20,7 @@ #include "strv.h" #include "varlink.h" -static JsonDispatchFlags json_dispatch_flags = 0; +static JsonDispatchFlags json_dispatch_flags = JSON_ALLOW_EXTENSIONS; static void setup_logging(void) { log_parse_environment_variables(); @@ -202,9 +202,10 @@ static uint64_t query_flag( const char *name, const int value, uint64_t flag) { + int r; - r = getenv_bool_secure(name); + r = secure_getenv_bool(name); if (r >= 0) return r == value ? flag : 0; if (r != -ENXIO) @@ -261,7 +262,7 @@ enum nss_status _nss_resolve_gethostbyname4_r( * configuration can distinguish such executed but negative replies from complete failure to * talk to resolved). */ const char *error_id; - r = varlink_call(link, "io.systemd.Resolve.ResolveHostname", cparams, &rparams, &error_id, NULL); + r = varlink_call(link, "io.systemd.Resolve.ResolveHostname", cparams, &rparams, &error_id); if (r < 0) goto fail; if (!isempty(error_id)) { @@ -423,7 +424,7 @@ enum nss_status _nss_resolve_gethostbyname3_r( goto fail; const char *error_id; - r = varlink_call(link, "io.systemd.Resolve.ResolveHostname", cparams, &rparams, &error_id, NULL); + r = varlink_call(link, "io.systemd.Resolve.ResolveHostname", cparams, &rparams, &error_id); if (r < 0) goto fail; if (!isempty(error_id)) { @@ -641,7 +642,7 @@ enum nss_status _nss_resolve_gethostbyaddr2_r( goto fail; const char* error_id; - r = varlink_call(link, "io.systemd.Resolve.ResolveAddress", cparams, &rparams, &error_id, NULL); + r = varlink_call(link, "io.systemd.Resolve.ResolveAddress", cparams, &rparams, &error_id); if (r < 0) goto fail; if (!isempty(error_id)) { -- cgit v1.2.3