[PATCH] nss: Ignore stayopen flag and keep the db open
Sam James
sam@gentoo.org
Tue Oct 21 09:43:14 GMT 2025
Ponnuvel Palaniyappan <pponnuvel@gmail.com> writes:
> Currently the DB file is opened and closed for processing
> each of the entries in the DB file. This results in considerably
> poor performance in environments with large DB files.
>
Please append to the commit summary (the first line of the commit
message): [BZ#33558]
Reading the linked Debian bug, there's some context that I think would
be worth explaining in the commit message, as well as some existing
practice wrt other modules not respecting stayopen.
(The change wasn't really reviewable for me without that context I found
via your links on the bug.)
> Signed-off-by: Ponnuvel Palaniyappan <pponnuvel@gmail.com>
> ---
> nss/nss_db/db-XXX.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/nss/nss_db/db-XXX.c b/nss/nss_db/db-XXX.c
> index 9769d49d77..227e3de438 100644
> --- a/nss/nss_db/db-XXX.c
> +++ b/nss/nss_db/db-XXX.c
> @@ -73,8 +73,8 @@ CONCAT(_nss_db_set,ENTNAME) (int stayopen)
>
> if (status == NSS_STATUS_SUCCESS)
> {
> - /* Remember STAYOPEN flag. */
> - keep_db |= stayopen;
> + /* Ignore STAYOPEN flag. */
> + keep_db |= 1;
>
> /* Reset the sequential index. */
> entidx = NULL;
More information about the Libc-alpha
mailing list