History log of /freebsd/lib/libc/tests/db/dbm_perm_test.c (Results 1 – 1 of 1)
Revision Date Author Comments
# 14598537 25-Jul-2025 Bojan Novković <bnovkov@FreeBSD.org>

db/hash.c: Allow O_WRONLY in dbm_open

The dbm(3) manpage explicitly states that O_WRONLY is not allowed in
dbm_open, but a more recent comment in ` __hash_open` suggests otherwise.
Furthermore, POSI

db/hash.c: Allow O_WRONLY in dbm_open

The dbm(3) manpage explicitly states that O_WRONLY is not allowed in
dbm_open, but a more recent comment in ` __hash_open` suggests otherwise.
Furthermore, POSIX.1 allows O_WRONLY in dbm_open and states
that the underlying file must be opened for both reading and writing.

Fix this by correcting the O_WRONLY check and moving it further into
the function to make sure that the original flags are stored in hashp.

Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D51514

show more ...