summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_async_initgroups.c
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2011-09-19 12:53:37 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-10-13 13:32:31 -0400
commit684d1b48b5582a1bf7812b8c3c663592dc6dfed9 (patch)
tree63122c680b079a9c31a046ebb38a3489f0b1c95a /src/providers/ldap/sdap_async_initgroups.c
parent90a83f3c7b49e689d47553a5aa0eb15751846963 (diff)
downloadsssd-684d1b48b5582a1bf7812b8c3c663592dc6dfed9.tar.gz
sssd-684d1b48b5582a1bf7812b8c3c663592dc6dfed9.tar.xz
sssd-684d1b48b5582a1bf7812b8c3c663592dc6dfed9.zip
SysDB commands that save lastUpdate allows this value to be passed in
https://fedorahosted.org/sssd/ticket/836
Diffstat (limited to 'src/providers/ldap/sdap_async_initgroups.c')
-rw-r--r--src/providers/ldap/sdap_async_initgroups.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c
index 4cf5a53bb..65ff86cd0 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);