Re: [SSSD] [PATCH] Better cleanup task handling

2010-02-24 Thread Stephen Gallagher
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/23/2010 04:11 PM, Stephen Gallagher wrote: On 02/23/2010 04:08 PM, Jakub Hrozek wrote: On 02/23/2010 08:30 PM, Simo Sorce wrote: Aside from the talloc_asprintf_append() point in the other mail, patches looks good to me. Simo. Thanks

[SSSD] [PATCH] Better cleanup task handling

2010-02-23 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 These patches must be applied on top of the Do not check entries... one. [PATCH 1/2] Store lastLogin attribute when authenticating online This is needed for the second patch as we rely on lastLogin to decide whether to delete an entry or not. [PATCH

Re: [SSSD] [PATCH] Better cleanup task handling

2010-02-23 Thread Stephen Gallagher
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/23/2010 07:50 AM, Jakub Hrozek wrote: These patches must be applied on top of the Do not check entries... one. [PATCH 1/2] Store lastLogin attribute when authenticating online This is needed for the second patch as we rely on lastLogin to

Re: [SSSD] [PATCH] Better cleanup task handling

2010-02-23 Thread Simo Sorce
On Tue, 23 Feb 2010 13:50:42 +0100 Jakub Hrozek jhro...@redhat.com wrote: [PATCH 1/2] Store lastLogin attribute when authenticating online This is needed for the second patch as we rely on lastLogin to decide whether to delete an entry or not. This one seem to save the last login _only_ when

Re: [SSSD] [PATCH] Better cleanup task handling

2010-02-23 Thread Stephen Gallagher
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/23/2010 11:58 AM, Simo Sorce wrote: On Tue, 23 Feb 2010 13:50:42 +0100 Jakub Hrozek jhro...@redhat.com wrote: [PATCH 1/2] Store lastLogin attribute when authenticating online This is needed for the second patch as we rely on lastLogin to

Re: [SSSD] [PATCH] Better cleanup task handling

2010-02-23 Thread Simo Sorce
On Tue, 23 Feb 2010 13:50:42 +0100 Jakub Hrozek jhro...@redhat.com wrote: + + = dp_opt_get_int(opts-basic, + SDAP_LOGIN_CACHE_TIMEOUT); + +if (!offline_credentials_expiration ldap_cred_expiration) { +DEBUG(1, (Conflicting values for

Re: [SSSD] [PATCH] Better cleanup task handling

2010-02-23 Thread Simo Sorce
On Tue, 23 Feb 2010 13:50:42 +0100 Jakub Hrozek jhro...@redhat.com wrote: +varlistentry +termlogin_cache_timeout (integer)/term +listitem +para Just thinking out loud, but the name looks not very clear. I would

Re: [SSSD] [PATCH] Better cleanup task handling

2010-02-23 Thread Simo Sorce
On Tue, 23 Feb 2010 11:59:27 -0500 Stephen Gallagher sgall...@redhat.com wrote: [PATCH 1/2] Store lastLogin attribute when authenticating online This is needed for the second patch as we rely on lastLogin to decide whether to delete an entry or not. This one seem to save the last

Re: [SSSD] [PATCH] Better cleanup task handling

2010-02-23 Thread Simo Sorce
On Tue, 23 Feb 2010 13:50:42 +0100 Jakub Hrozek jhro...@redhat.com wrote: if (!req) { @@ -281,19 +286,41 @@ static struct tevent_req *cleanup_users_send(TALLOC_CTX *memctx, } state-ev = ev; -state-sysdb = sysdb; -state-domain = domain; +state-sysdb = ctx-be-sysdb;

Re: [SSSD] [PATCH] Better cleanup task handling

2010-02-23 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/23/2010 06:03 PM, Simo Sorce wrote: This snipped is very confusing. It looks like ldap_cred_expiration should really be called login_cache_timeout, or what I am not understanding here? Yes, this is confusing. As you mentioned in the other

Re: [SSSD] [PATCH] Better cleanup task handling

2010-02-23 Thread Simo Sorce
On Tue, 23 Feb 2010 13:50:42 +0100 Jakub Hrozek jhro...@redhat.com wrote: +ret = get_uid_table(state, state-uid_table); +if (ret != EOK) { +tevent_req_error(req, ret); +return; +} + On non-linux platforms this returns ENOSYS You can't make it a hard error IMO.

Re: [SSSD] [PATCH] Better cleanup task handling

2010-02-23 Thread Stephen Gallagher
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/23/2010 01:43 PM, Jakub Hrozek wrote: Attached is a revised patch. The changes: * reverted the error condition handling in cleanup_users_send() * handles ENOSYS returned from get_uid_table() * commented the checks on

Re: [SSSD] [PATCH] Better cleanup task handling

2010-02-23 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/23/2010 07:46 PM, Stephen Gallagher wrote: successful wasn't the only part of the ConfigAPI description that needed changing. It's still bad English. _('How long to keep cached entries with after last successful login'), Should read

Re: [SSSD] [PATCH] Better cleanup task handling

2010-02-23 Thread Simo Sorce
On Tue, 23 Feb 2010 19:52:50 +0100 Jakub Hrozek jhro...@redhat.com wrote: -subfilter = talloc_asprintf(state, ((!(%s=0))(%s=%ld)), +account_cache_expiration = dp_opt_get_int(state-ctx-opts-basic, + SDAP_ACCOUNT_CACHE_EXPIRATION); +DEBUG(9, (Cache expiration is set to %d days\n,

Re: [SSSD] [PATCH] Better cleanup task handling

2010-02-23 Thread Simo Sorce
On Tue, 23 Feb 2010 19:52:50 +0100 Jakub Hrozek jhro...@redhat.com wrote: On 02/23/2010 07:46 PM, Stephen Gallagher wrote: successful wasn't the only part of the ConfigAPI description that needed changing. It's still bad English. _('How long to keep cached entries with after last

Re: [SSSD] [PATCH] Better cleanup task handling

2010-02-23 Thread Stephen Gallagher
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/23/2010 04:08 PM, Jakub Hrozek wrote: On 02/23/2010 08:30 PM, Simo Sorce wrote: Aside from the talloc_asprintf_append() point in the other mail, patches looks good to me. Simo. Thanks for the review, new patches are attached. Looks