summaryrefslogtreecommitdiffstats
path: root/src/nss-resolve/nss-resolve.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
commitfc53809803cd2bc2434e312b19a18fa36776da12 (patch)
treeb4b43bd6538f51965ce32856e9c053d0f90919c8 /src/nss-resolve/nss-resolve.c
parentAdding upstream version 255.5. (diff)
downloadsystemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz
systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/nss-resolve/nss-resolve.c')
-rw-r--r--src/nss-resolve/nss-resolve.c11
1 files changed, 6 insertions, 5 deletions
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)) {