Get Samba version or capability information from Windows

Corinna Vinschen corinna at
Mon Jan 21 15:07:59 GMT 2008

Hi Volker,

On Jan 19 19:47, Volker Lendecke wrote:
> Hi, Corinna!
> On Sat, Jan 19, 2008 at 03:04:20PM +0100, Corinna Vinschen wrote:
> > +struct smb_extra_info *samba_extra_info_version()
> > +{
> > +	static struct smb_extra_info extra_info;
> Hmmm. We got through some pain getting rid of this kind of
> static, I'd much rather prefer this to be on the stack,
> given to samba_extra_info_version() via a pointer.

Ok, no worries.  My first attempt was using this approach, but then I
saw that the samba_version_string() function also uses a static local
for the version string, so I changed my code to do the same.

> >  			unsigned char objid[16];
> >  			memcpy(pdata,create_volume_objectid(conn, objid),16);
> > +			memcpy(pdata+16,samba_extra_info_version(),48);
> [...]
> I'd much rather like to see the structure marshalled using
> the SIVAL() macro. This way you avoid both problems.

Expect a new patch soon.

Thanks for reviewing,

More information about the samba-technical mailing list