nss_db: Propagate ERANGE error if parse_line fails [BZ #19837]
Commit Message
Other call sites of parse_line already use these error codes (including
one earlier in this file).
The symptom is that getgrent (without _r) would not retry reading with a
larger buffer.
It's not possible to write a test for this without resorting to chroot.
Thanks,
Florian
Comments
On 03/17/2016 07:53 PM, Florian Weimer wrote:
> [BZ #19837]
> * nss/nss_db/db-XXX.c (_nss_db_getENTNAME_r): Propagate ERANGE
> error if parse_line fails.
Ping?
<https://sourceware.org/ml/libc-alpha/2016-03/msg00456.html>
Thanks,
Florian
Florian Weimer <fweimer@redhat.com> writes:
> [BZ #19837]
> * nss/nss_db/db-XXX.c (_nss_db_getENTNAME_r): Propagate ERANGE
> error if parse_line fails.
Ok.
Andreas.
2016-03-17 Florian Weimer <fweimer@redhat.com>
[BZ #19837]
* nss/nss_db/db-XXX.c (_nss_db_getENTNAME_r): Propagate ERANGE
error if parse_line fails.
@@ -288,8 +288,8 @@ CONCAT(_nss_db_get,ENTNAME_r) (struct STRUCTURE *result, char *buffer,
}
if (err < 0)
{
- H_ERRNO_SET (HOST_NOT_FOUND);
- status = NSS_STATUS_NOTFOUND;
+ H_ERRNO_SET (NETDB_INTERNAL);
+ status = NSS_STATUS_TRYAGAIN;
break;
}