[SSSD] [PATCH] Last USN patches

Simo Sorce ssorce at redhat.com
Mon Mar 14 18:30:45 UTC 2011


On Fri, 11 Mar 2011 13:56:18 +0100
Jan Zelený <jzeleny at redhat.com> wrote:

> I'm sending two patches related to the last USN detection (ticket
> #734). I did some testing and they seem to work just fine. The only
> thing I'm not sure about is if I got right what Simo exactly meant by
> the ticket, but I hope I got it right.
> 
> 
> Thanks
> Jan

Sorry Jan but it doesn't seem to do what I asked for.

As far as I can see you are overriding the last_usn when you connect,
which is the exact opposite of what should be done.

last_usn must never be set to whatever value is available from ldap.

You only need to check if the value from ldap is lower then the
currently internally value for last_usn if we are reconnecting to
the same server,and you need to reset last_usn to 0 if the highest
value reported from ldap is lower than the highest we internally stored.

If we are connecting to a different server we always unconditionally
reset last_usn to 0, as USNs are not global so checking values between
different servers have no meaning.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York


More information about the sssd-devel mailing list