From 24c09f913d82528ada14013e3d673d277cf04a93 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Jacke?= Date: Mon, 28 Jun 2021 16:55:04 +0200 Subject: [PATCH] ntvfs: add missing COM/LPT ports that are also reserved names see also: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN BUG: https://bugzilla.samba.org/show_bug.cgi?id=8776 Signed-off-by: Bjoern Jacke Reviewed-by: Jeremy Allison --- source4/ntvfs/posix/pvfs_shortname.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c index 46a235429aa..902ff23d88f 100644 --- a/source4/ntvfs/posix/pvfs_shortname.c +++ b/source4/ntvfs/posix/pvfs_shortname.c @@ -80,8 +80,10 @@ #define FLAG_CHECK(c, flag) (ctx->char_flags[(uint8_t)(c)] & (flag)) static const char *reserved_names[] = -{ "AUX", "CON", "COM1", "COM2", "COM3", "COM4", - "LPT1", "LPT2", "LPT3", "NUL", "PRN", NULL }; +{ "AUX", "CON", + "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9" + "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", + "NUL", "PRN", NULL }; struct pvfs_mangle_context { -- 2.11.4.GIT