Are these problems in _lsa_lookup_name, uid.c and windbind?

jtrostel at jtrostel at
Fri Sep 28 10:47:02 GMT 2001

Strange things are happening in the lsa_unk_get_connected to uid.c/lookup_name
path that are getting rid of the "proper" domain.

When I look at the username and domain name detected by _lsa_unk_get_connuser
in rpc_server/svr_lsa_nt.c, it detects (properly) that the connected user is
'jt' on a workgroup (not served by the domain controller) 'JTSNT'.  See below:

[2001/09/28 13:31:06, 0] rpc_server/srv_lsa_nt.c:_lsa_unk_get_connuser(536)
  in _lsa_unk_get_connuser, username => jt
[2001/09/28 13:31:06, 0] rpc_server/srv_lsa_nt.c:_lsa_unk_get_connuser(537)
  in _lsa_unk_get_connuser, domname => JTSNT

However, by the time the code gets to smbd/uid.c and the function
'lookup_name', the username is ok 'jt' but the domain has changed to 'CEO'. 
That IS the domain that the SAMBA server is in, but NOT the workgroup of the
connected user.

[2001/09/28 13:31:06, 0] smbd/uid.c:lookup_name(285)
  uid.c/lookup_name-before winbind_lookup_name: name_type => 8
[2001/09/28 13:31:06, 0] smbd/uid.c:lookup_name(287)
  uid.c/lookup_name-before winbind_lookup_name: jt_domain => CEO
[2001/09/28 13:31:06, 0] smbd/uid.c:lookup_name(288)
  uid.c/lookup_name-before winbind_lookup_name: jt_usename => jt

'lookup_name' calls 'winbind_lookup_name' and gets the following results:

[2001/09/28 13:31:06, 0] smbd/uid.c:lookup_name(291)
  uid.c/lookup_name-winbind_lookup_name: jtret => 1
[2001/09/28 13:31:06, 0] smbd/uid.c:lookup_name(292)
  uid.c/lookup_name-winbind_lookup_name: name => CEO\jt
[2001/09/28 13:31:06, 0] smbd/uid.c:lookup_name(293)
  uid.c/lookup_name-winbind_lookup_name: psid =>
[2001/09/28 13:31:06, 0] smbd/uid.c:lookup_name(294)
  uid.c/lookup_name-winbind_lookup_name: name_type => 8

Notice that winbind_lookup_name returned SUCCESS (1) for the 'CEO\jt'.  Not
only should this be 'JTSNT\jt', but there is no 'jt' user for the 'CEO' domain.
This should FAIL.  Is the last digit of the psid returned an indication that
the lookup was unsuccessful?

It seems a few things are screwy in the code.

1. How does the domain get changed from 'JTSNT' to 'CEO' between
_lsa_unk_get_connuser and lookup_names?

2. Why does winbind_lookup_name SUCCEED when it should fail?

3. What does that trailing '0' in the psid indicate?

John M. Trostel
Senior Software Engineer
Quantum / SnapAppliances
jtrostel at

More information about the samba-technical mailing list