[PATCH] fix sid_to_uid() return correct sidtype

Michael Steffens michael.steffens at hp.com
Thu Feb 20 12:20:14 GMT 2003


Michael Steffens wrote:
> jra at dp.samba.org wrote:
> 
>> On Wed, Feb 19, 2003 at 10:20:35PM +0100, Stefan (metze) Metzmacher 
>> wrote:
>>
>>> At 21:07 19.02.2003 +0000, jra at dp.samba.org wrote:
>>>
>>>> On Wed, Feb 19, 2003 at 10:03:57PM +0100, Stefan (metze) Metzmacher 
>>>> wrote:
>>>>
>>>>> HI all,
>>>>>
>>>>> here's a small fix for returning the correct sidtype in 
>>>>> sid_to_uid() and
>>>>> sid_to_gid()
>>>>>
>>>>> this should be applied to all branches with the new uid <-> sid 
>>>>> caching 
>>>>
>>>>
>>>> code
>>>>
>>>> No attachment - please try again.
>>>>
>>>> Jeremy.
>>>
>>>
>>> mailman filtered it out...:-(
>>
>>
>>
>> Actually I made the cache cache the sidtype also.
>> Please check over the code I just checked in...
> 
> 
> Had also thought about caching the sitype, but then omitted it. Isn't
> it redundant? What else than SID_NAME_USER and SID_NAME_DOM_GRP can
> go there, residing in different caches?

Noticed why :)
The current caching code does also cache local lookups, meaning that
local groups (and machine SIDs when Samba is running as DC) can also
occur?

Hmm, I'm not sure whether the speed gain for local lookups outweighs
the costs of having them wipe winbind SID mapping cache entries.
The latter ones look more expensive to me.

Cheers!
Michael






More information about the samba-technical mailing list