variable length strings in smbclient
Luke Kenneth Casson Leighton
lkcl at switchboard.net
Fri Jun 12 12:30:18 GMT 1998
richard,
i have a mem_buffer structure plus support routines, already used in
the dce/rpc code, which may be useful for your needs. membuffer.c
On Thu, 11 Jun 1998, Richard Sharpe wrote:
> Hi,
>
> I was about to add variable length string support to client.c and clitar.c
> so that clitar.c can handle directory paths longer than 1024 bytes
> (although the length restriction will be the size of an SMB minus the
> header overhead).
>
> I was planning to create a set of routines var_str{cpy|cat} that would be
> passed a pointer to a pointer to a string, and a string length, and if it
> found that the destination string was too short, would lengthen it
> (alloc/realloc) and then copy ot cat ...
>
> 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 ...
>
>
>
> Regards
> -------
> Richard Sharpe, sharpe at ns.aus.com, NIC-Handle:RJS96
> NS Computer Software and Services P/L,
> Ph: +61-8-8281-0063, FAX: +61-8-8250-2080,
> Samba, Linux, Apache, Digital UNIX, AIX, Netscape, Stronghold, C, ...
>
More information about the samba-technical
mailing list