samba-3.0alpha23: smbclient -M ... ?

David Lee t.d.lee at durham.ac.uk
Thu Apr 24 21:33:41 GMT 2003


On Thu, 24 Apr 2003, Christopher R. Hertel wrote:

> [...]
> Sounds as though the names are being written in Unicode, which sounds like
> the wrong thing to do in this case.
>
> > #            0: 0003 470e 18ff 0800 2004 c4ea 0800 4500    ..G..... .....E.
> > #           16: 006e ca27 4000 4006 67f8 81ea 0246 81ea    .n.'@. at .g....F..
> > #           32: 0250 804e 008b 7146 2b36 635a b292 5018    .P.N..qF+6cZ..P.
> > #           48: 60f4 ca0a 0000 0000 0042 ff53 4d42 d500    `........B.SMB..
> > #           64: 0000 0008 01c8 0000 0000 0000 0000 0000    ................
> > #           80: 0000 ffff 9109 0000 0100 001f 0004 7300    ..............s.
> > #           96: 6100 6d00 6200 6100 0000 0400 6900 7400    a.m.b.a.....i.t.
> > #          112: 7300 7000 6300 3800 3000 0000              s.p.c.8.0...
>
> Hmmm... Unicode *and* lower case.  Probably both wrong...
>
> > Is there some sort of attempt at non-ASCII coding going on here?  (Does
> > the so-called "Flags2" play a role here?)  What will happen when these
> > names bump up against the 15-byte transmission limit within SMDsendstrt?
>
> [...]
> Anyway, yes...  The Unicode bit in the Flags2 is set in the second example
> (Samba 3.0).  The messenger service is old, and probably hasn't been
> updated for Unicode, so I think that this is wrong.

Many thanks for your reply, Chris.

Subsequent to my original message, I locally hacked (quick'n'dirty) my 3.0
to try to avoid doing UNICODE, and that seemed successfully to sidestep
the problem (the "smbclient" message was then successfully transmitted).

Are you able to reproduce the problem and (hopefully, with relative ease)
confirm changed "on the wire" encoding from Samba 2.2 to 3.0?

Assuming I have hit a genuine problem (which you suggest is probably the
case) what do we do about it?  I don't know the encoding stuff at all.

Might a possible cure be something relatively simple such as changing
   p += clistr_push(cli, p, username, -1, STR_TERMINATE);
   ...
   p += clistr_push(cli, p, host, -1, STR_TERMINATE);
to something like:
   p += clistr_push(cli, p, username, -1, (STR_TERMINATE|STR_ASCII));
   ...
   p += clistr_push(cli, p, host, -1, (STR_TERMINATE|STR_ASCII));

in "climessage.c"?

-- 

:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:  http://www.dur.ac.uk/t.d.lee/            South Road            :
:                                           Durham                :
:  Phone: +44 191 334 2752                  U.K.                  :


More information about the samba-technical mailing list