Q: pstring size. OpenVMS 7.2 Alpha has 4096 character path names.
John E. Malmberg
wb8tyw at qsl.net
Fri Jun 16 13:16:43 GMT 2000
It looks like pstring is an anagram for path-string.
I also note that while most of the code uses sizeof(pstring), client.c
(2.0.6) uses the constant 1023 instead. Possibly a bug.
For older versions of OpenVMS, this was sufficient, as the maximum path size
was 254 characters. The latest Alpha versions now support a path of 4096
This feature in OpenVMS appears to be mainly to support their LANMAN server
product "Advanced Server".
This indicates to me that it could be an issue on other platforms.
(I do not know who would want to torture them self with a path that long :-)
Since a complete path in OpenVMS is now 4096 characters, it looks like I
would need to change SMB.H to be the following:
#define MAX_FILEPATH 1024
typedef char pstring[MAX_FILEPATH];
And then in config.h I can put:
#define MAX_FILEPATH 4096
However in the SAMBA 2.0.6 source code, there are 100 references to "1024"
or "1023" that could be affected. An obvious one is in client.c, as the
comment identified it as a pstring size.
Since many of them are in header files, the impact of a change of the file
path length is not entirely obvious to me.
So if there are any suggestions, I will be listening appreciatively.
wb8tyw at qsl.network
More information about the samba-technical