From 684d1b48b5582a1bf7812b8c3c663592dc6dfed9 Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Mon, 19 Sep 2011 12:53:37 +0200 Subject: SysDB commands that save lastUpdate allows this value to be passed in https://fedorahosted.org/sssd/ticket/836 --- src/providers/ldap/sdap_async_initgroups.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/providers/ldap/sdap_async_initgroups.c') diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c index 4cf5a53b..65ff86cd 100644 --- a/src/providers/ldap/sdap_async_initgroups.c +++ b/src/providers/ldap/sdap_async_initgroups.c @@ -44,6 +44,7 @@ static errno_t sdap_add_incomplete_groups(struct sysdb_ctx *sysdb, int ret; bool in_transaction = false; bool posix; + time_t now; /* There are no groups in LDAP but we should add user to groups ?? */ if (ldap_groups_count == 0) return EOK; @@ -90,6 +91,7 @@ static errno_t sdap_add_incomplete_groups(struct sysdb_ctx *sysdb, goto done; } + now = time(NULL); for (i=0; missing[i]; i++) { /* The group is not in sysdb, need to add a fake entry */ for (ai=0; ai < ldap_groups_count; ai++) { @@ -127,7 +129,7 @@ static errno_t sdap_add_incomplete_groups(struct sysdb_ctx *sysdb, DEBUG(8, ("Adding fake group %s to sysdb\n", name)); ret = sysdb_add_incomplete_group(sysdb, name, gid, original_dn, - posix); + posix, now); if (ret != EOK) { goto fail; } @@ -1832,7 +1834,7 @@ static void sdap_get_initgr_user(struct tevent_req *subreq) ret = sdap_save_user(state, state->sysdb, state->opts, state->dom, state->orig_user, state->ldap_attrs, - true, NULL); + true, NULL, 0); if (ret) { sysdb_transaction_cancel(state->sysdb); tevent_req_error(req, ret); -- cgit