diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-08-21 10:09:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-21 10:09:33 +0200 |
commit | 7692fed98b784be92f900151d867f0be0975e062 (patch) | |
tree | 74af3a142a54344cb739ff0bc485bb8ad5ef60ec /src/resolve | |
parent | Merge pull request #9811 from poettering/random-seed-tweaks (diff) | |
parent | Rename USER_CREDS_SYNTHESIZE_FALLBACK to …_PREFER_NSS (diff) | |
download | systemd-7692fed98b784be92f900151d867f0be0975e062.tar.xz systemd-7692fed98b784be92f900151d867f0be0975e062.zip |
Merge pull request #9783 from poettering/get-user-creds-flags
beef up get_user_creds() a bit and other improvements
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/resolved.c | 2 | ||||
-rw-r--r-- | src/resolve/test-resolved-etc-hosts.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/resolve/resolved.c b/src/resolve/resolved.c index 6ff56bc974..d4d6cba201 100644 --- a/src/resolve/resolved.c +++ b/src/resolve/resolved.c @@ -37,7 +37,7 @@ int main(int argc, char *argv[]) { goto finish; } - r = get_user_creds(&user, &uid, &gid, NULL, NULL); + r = get_user_creds(&user, &uid, &gid, NULL, NULL, 0); if (r < 0) { log_error_errno(r, "Cannot resolve user name %s: %m", user); goto finish; diff --git a/src/resolve/test-resolved-etc-hosts.c b/src/resolve/test-resolved-etc-hosts.c index b7dba0d780..1b22e38202 100644 --- a/src/resolve/test-resolved-etc-hosts.c +++ b/src/resolve/test-resolved-etc-hosts.c @@ -34,6 +34,7 @@ static void test_parse_etc_hosts(const char *fname) { assert_se(fd >= 0); f = fdopen(fd, "r+"); + assert_se(f); fputs("1.2.3.4 some.where\n", f); fputs("1.2.3.5 some.where\n", f); fputs("::0 some.where some.other\n", f); @@ -49,7 +50,7 @@ static void test_parse_etc_hosts(const char *fname) { if (fname) return; - + EtcHostsItemByName *bn; assert_se(bn = hashmap_get(hosts.by_name, "some.where")); assert_se(bn->n_addresses == 3); |