Skip to content

Commit

Permalink
s3: set native os according to Windows and NBT_ANNOUNCE_VERSION defines
Browse files Browse the repository at this point in the history
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.

https://bugzilla.samba.org/show_bug.cgi?id=10168

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
  • Loading branch information
Björn Jacke authored and jrasamba committed Jan 15, 2014
1 parent 4701e19 commit 666948c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source3/smbd/sesssetup.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@ static int push_signature(uint8 **outbuf)
{
char *lanman;
int result, tmp;
fstring native_os;

result = 0;

tmp = message_push_string(outbuf, "Unix", STR_TERMINATE);
fstr_sprintf(native_os, "Windows %d.%d", SAMBA_MAJOR_NBT_ANNOUNCE_VERSION,
SAMBA_MINOR_NBT_ANNOUNCE_VERSION);

tmp = message_push_string(outbuf, native_os, STR_TERMINATE);

if (tmp == -1) return -1;
result += tmp;
Expand Down

0 comments on commit 666948c

Please sign in to comment.