variable length strings in smbclient

Jeremy Allison jallison at
Fri Jun 12 02:23:22 GMT 1998

Richard Sharpe wrote:
> However, when I was checking the source for what samba does, I find that in
> places like reply.c pstrings are used extensively. In functions like
> reply_chkpth, a pstring us used to copy the name to, thus limiting these
> functions to handling path lenghts of up to 1024 bytes and no more ...
> So, I was wondering if anyone is planning on putting any work into this? It
> should be relatively easy in the main samba code. For the most part, simply
> allocate a string of the size specified in the SMB and copy ...

On the list of things to add, but somewhat behind
the domain stuff. It's not *quite* that easy ("simply
allocate a string of the size specified in the SMB and copy")
as a bunch of code needs to be gone through first
checking for overruns. 

When I (finally) get ElectricFence or Purity 
working on Samba I might have a go at it.

Until then, to paraphrase a famous person in the
1980's "1024 character pathnames should be enough
for anyone." :-) :-).



Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.

More information about the samba-technical mailing list