diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-05-05 22:06:34 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-05-10 18:08:38 +0200 |
commit | 58dbf4c925aadf92a2de62943648b76ae1063c4a (patch) | |
tree | ecff06886b40df2b88542b590b5386c2bba2b4fc | |
parent | a346a34f7ffe3101761717b672f71c3aca3e3e0a (diff) | |
download | systemd-58dbf4c925aadf92a2de62943648b76ae1063c4a.tar.gz |
userdb: return ESRCH if we didn't find a single varlink service
Clearly communicate to callers that we didn't find a single varlink
service, when a lookup is attempted. Note that the fallback's to NSS,
drop-ins and synthesis might eat up this error again, but we should
really make this case reasonably recognizable, in particular as our
various tools already handle this condition correctly and print a nice
message then.
-rw-r--r-- | src/shared/userdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/userdb.c b/src/shared/userdb.c index 3e08b339f5..33a1442460 100644 --- a/src/shared/userdb.c +++ b/src/shared/userdb.c @@ -510,7 +510,7 @@ static int userdb_start_query( } if (set_isempty(iterator->links)) - return ret; /* propagate last error we saw if we couldn't connect to anything. */ + return ret < 0 ? ret : -ESRCH; /* propagate last error we saw if we couldn't connect to anything. */ /* We connected to some services, in this case, ignore the ones we failed on */ return 0; |