[PATCH] s3: set native os according to Windows and NBT_ANNOUNCE_VERSION defines

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Jan 8 00:34:24 MST 2014


On Wed, Jan 08, 2014 at 07:37:29AM +1300, Andrew Bartlett wrote:
> On Tue, 2014-01-07 at 15:57 +0100, Björn Jacke wrote:
> > When the native os in sessionsetup is "Unix" then broken Konica Minolta
> > printers refuse to talk to those CIFS servers. Other CIFS servers also announce
> > themselves with native os Windows. Let's do the same to improve
> > interoperability with broken devices like those printers from Konica Minolta.
> > Thanks to Daniel Hoffmann for finding and reporting this Konika printer
> > brokenness.
> > 
> > This fixes Bug #10168.
> 
> I do worry what the engineer that deliberately added this insane check
> will add next (such as checking the next string, which I would be much
> more worried about changing, due to loss of debugging).  However, I'm
> not objecting to the concept. 

We should at least optionally be non-distinguishable from
Windows. So anything an engineer finds where we behave
differently is good for us.

> Can you please at least match the next string and asprintf it, or move
> both to talloc_asprintf?  In general, we were trying to move away from
> fstring to talloc strings. 

Here I disagree. Strings that are temporary and clearly fit
into an fstring should be an fstring on the stack.
talloc_asprintf is expensive. Anything that we don't fully
control should be dynamically allocated, sure.

See for example commit 5baa740, full_path_tos(). This makes
a measurable difference.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list