Any more progress on Citrix Metaframe vs. Samba PDC?

Andy Polyakov appro at
Mon May 24 14:07:13 GMT 1999

> I know that some time ago Andy Polyakov posted the very useful
> "Citrix Metaframe demystified" message to this list with his patch to
> make Samba PDC work with NT Terminal Server (Citrix Metaframe).
Well, it feels like a long shot (the question was posted a month ago),
but it's never too late to post something useful:-)
> We've been running the Samba PDC code with that patch since then and
> our NT-TS system does, indeed work, but the problem remains of logins
> to it taking a *LONG* time.
I know the feeling:-)
> This must have to do with some kind of timeouts on the registry
> queries to Samba.
It has *nothing* to do with registry queries. It's (primarily!)
timeouts on name registration queries that make TSE domain logons
slow (see below). 
>  My question - is there any way to keep the current
> functionality, but circumvent the timeouts somehow? I'm asking for
> anything like full registry support,
As it has nothing to do with registry the answer to the question is
"don't need to. well, at least not for this very reason." But of
course you may wonder what's the heck *is* going on then?

When a user attempts domain logon, among other things TSE tries to
register and deregister certain name. One I've observed was
"1\0\0\0\0\0\0\0\0\0\0\x8|_GT", where last T is the type field.
I have no idea what does the name stand for, but here is what's
going on:

- TSE sends WINS register for "1<00>...(10)><08>|_GT" to Samba;
- Samba WINS says "sure! you stand for "1              T" name now";
- TSE does *not* find the answer satisfactory and keeps trying to
  WINS-register "1<00>...(10)><08>|_GT" with 1.5 s intervals for two
  more times;
- every damn time Samba confirms "1              T" name;
- after extra 1.5s TSE seems to loose confidence in Samba WINS and
  starts broadcasting registration request for "1<00>...(10)><08>|_GT";
- it does it four times with 0.75s intervals with no reply in return;

The whole thing takes 7.5 s and the catch is that the sequence is
repeated 4 times during logon procedure resulting in 30 seconds delay.
There're also several others timeouts I'm looking at now, but this
delay seem to be the biggest one...

> just some "kludge" to speed up these TS logins...
Sure! But you're not going to like it:-) Try following (line numbers
might be out of order, the point is that we're looking at put_nmb_name

*** ./source/libsmb/nmblib.c.orig       Sun Feb 14 14:12:32 1999
--- ./source/libsmb/nmblib.c    Fri Mar 26 19:09:31 1999
*** 255,261 ****
--- 255,267 ----
      buf1[0] = '*';
      buf1[15] = name->name_type;
    } else {
+ #if 0
      slprintf(buf1, sizeof(buf1) - 1,"%-15.15s%c",name->name,name->name_type);
+ #else
+     bcopy(name->name,buf1,15);
+     for (m=14;m>0;m--) if (buf1[m]=='\0') buf1[m]=' '; else break;
+     buf1[15] = name->name_type;
+ #endif
    buf[offset] = 0x20;

Idea is to make Samba WINS return "sure! you stand for
"1<00>...(10)><08>|_GT" name now" reply. BUT! *Do* note that it's
still "1#T" that gets registered in locks/wins.dat and that's why
you shouldn't like this. From other hand you did ask for a "kludge",
didn't you? I believe such workaround is perfectly qualified to the
term:-) In either case yet opened question is what happens if two
users attempt to login simultaneously on the same of diffetent TSEs.
If you could give some feedback on the matter I'll be most grateful.

Cheers. Andy.

More information about the samba-ntdom mailing list