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;