nwdbm: honor ignore-case volumes when creating SYS dirs
All checks were successful
Source release / source-package (push) Successful in 49s

Treat the `i` volume option like `k` when choosing the Unix-side
case for the automatically created SYS directories.

With a volume configured as `itO` (ignore case, trustees, OS/2 LFN),
the server currently recreates uppercase directories such as LOGIN,
PUBLIC, SYSTEM and MAIL on startup, even when the installed tree uses
lowercase login/public/system/mail. This leaves duplicate host
directories that appear as ambiguous entries from DOS clients.

Use lowercase Unix names for the auto-created SYS directories when
the volume is configured either as downshift (`k`) or ignore-case (`i`).
This commit is contained in:
Mario Fetka
2026-05-27 11:42:22 +02:00
parent 12b9106732
commit 07ee7fa659

View File

@@ -1963,7 +1963,16 @@ static int get_sys_unixname(uint8 *unixname, uint8 *sysname, uint8 *sysentry)
if (founds > 2) {
uint8 *p;
for (p=optionstr; *p; p++) {
if (*p=='k') {
if (*p=='k' || *p=='i') {
/*
* Keep the automatically created SYS subdirectories in the
* canonical lower-case form when the volume is configured for
* either explicit downshift ('k') or case-insensitive lookup ('i').
* Without this, a SYS volume installed with lower-case directories
* such as public/login/system/mail and configured as 'itO' will
* recreate upper-case PUBLIC/LOGIN/SYSTEM/MAIL on every server
* start, which then shows duplicate DOS-visible entries.
*/
result|=1; /* downshift */
} else if (*p=='t') {
result|=2; /* trustees */