Bug 4448 - share name is truncated at the first encountered ']' character
Summary: share name is truncated at the first encountered ']' character
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.19.3
Hardware: Other All
: P3 trivial (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-14 16:05 UTC by alexisdm59
Modified: 2024-01-06 02:16 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alexisdm59 2007-03-14 16:05:28 UTC
When you have the following line in smb.conf:
[test[foo].dir]
the share name is set to "test[foo".

On SVN you can see that both samba 3.0.x (iniparser.c) and samba 4.0 (params.c) truncate the name at the first ']'.
Shouldn't '[' and ']' be both invalid or valid ?

Windows systems can perfectly see and access shares containing '[' and ']' characters, but can't share themselves such share.
Comment 1 Björn Jacke 2024-01-06 02:16:41 UTC
this is a limitation of the iniparser. Just use a registry share if you need something like this. The following works properly:

# net conf addshare "M[y]share" /tmp/