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.
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user