The Samba-Bugzilla – Attachment 16668 Details for
Bug 8776
Not all reserved device names are escaped (e.g. LPT4)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix list of reserved names in Samba
fix-reserved-names.patch (text/plain), 3.58 KB, created by
Björn Jacke
on 2021-06-28 15:11:15 UTC
(
hide
)
Description:
fix list of reserved names in Samba
Filename:
MIME Type:
Creator:
Björn Jacke
Created:
2021-06-28 15:11:15 UTC
Size:
3.58 KB
patch
obsolete
>From b6543b2c4de74709bf6a6593ed93cf28b52675d6 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= <bj@sernet.de> >Date: Mon, 28 Jun 2021 16:55:04 +0200 >Subject: [PATCH 1/3] ntvfs: add missin 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 <bjacke@samba.org> >--- > 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 46a235429aa0..902ff23d88f3 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.25.1 > > >From aadfa89cbab373e9e8a03c92644afdfaee404516 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= <bj@sernet.de> >Date: Mon, 28 Jun 2021 16:56:18 +0200 >Subject: [PATCH 2/3] mangle_hash2: add missin 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 <bjacke@samba.org> >--- > source3/smbd/mangle_hash2.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c >index 92319495f2a7..e7811663250b 100644 >--- a/source3/smbd/mangle_hash2.c >+++ b/source3/smbd/mangle_hash2.c >@@ -101,8 +101,10 @@ static const char basechars[36] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; > > /* the list of reserved dos names - all of these are illegal */ > static const char * const reserved_names[] = >-{ "AUX", "LOCK$", "CON", "COM1", "COM2", "COM3", "COM4", >- "LPT1", "LPT2", "LPT3", "NUL", "PRN", NULL }; >+{ "AUX", "LOCK$", "CON", >+ "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", >+ "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", >+ "NUL", "PRN", NULL }; > > #define DYNAMIC_MANGLE_TABLES 0 > >-- >2.25.1 > > >From 3de2f004c96d60fa6ef224636cda957d8e8ec75d Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= <bj@sernet.de> >Date: Mon, 28 Jun 2021 17:00:54 +0200 >Subject: [PATCH 3/3] mangle_hash2: remove LOCK$ from list of 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 <bjacke@samba.org> >--- > source3/smbd/mangle_hash2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c >index e7811663250b..53e944ef61b4 100644 >--- a/source3/smbd/mangle_hash2.c >+++ b/source3/smbd/mangle_hash2.c >@@ -101,7 +101,7 @@ static const char basechars[36] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; > > /* the list of reserved dos names - all of these are illegal */ > static const char * const reserved_names[] = >-{ "AUX", "LOCK$", "CON", >+{ "AUX", "CON", > "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", > "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", > "NUL", "PRN", NULL }; >-- >2.25.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8776
: 16668