diff options
author | Pavel Březina <pbrezina@redhat.com> | 2011-09-19 12:53:37 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-10-13 13:32:31 -0400 |
commit | 684d1b48b5582a1bf7812b8c3c663592dc6dfed9 (patch) | |
tree | 63122c680b079a9c31a046ebb38a3489f0b1c95a /src/providers/ldap/sdap_async_users.c | |
parent | 90a83f3c7b49e689d47553a5aa0eb15751846963 (diff) | |
download | sssd_unused-684d1b48b5582a1bf7812b8c3c663592dc6dfed9.tar.gz sssd_unused-684d1b48b5582a1bf7812b8c3c663592dc6dfed9.tar.xz sssd_unused-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_users.c')
-rw-r--r-- | src/providers/ldap/sdap_async_users.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/providers/ldap/sdap_async_users.c b/src/providers/ldap/sdap_async_users.c index adf3cf4e..949cc026 100644 --- a/src/providers/ldap/sdap_async_users.c +++ b/src/providers/ldap/sdap_async_users.c @@ -37,7 +37,8 @@ int sdap_save_user(TALLOC_CTX *memctx, struct sysdb_attrs *attrs, const char **ldap_attrs, bool is_initgr, - char **_usn_value) + char **_usn_value, + time_t now) { struct ldb_message_element *el; int ret; @@ -315,7 +316,7 @@ int sdap_save_user(TALLOC_CTX *memctx, DEBUG(6, ("Storing info for user %s\n", name)); ret = sysdb_store_user(ctx, name, pwd, uid, gid, gecos, homedir, shell, - user_attrs, missing, cache_timeout); + user_attrs, missing, cache_timeout, now); if (ret) goto fail; if (_usn_value) { @@ -350,6 +351,7 @@ int sdap_save_users(TALLOC_CTX *memctx, char *usn_value; int ret; int i; + time_t now; if (num_users == 0) { /* Nothing to do if there are no users */ @@ -366,12 +368,13 @@ int sdap_save_users(TALLOC_CTX *memctx, goto done; } + now = time(NULL); for (i = 0; i < num_users; i++) { usn_value = NULL; ret = sdap_save_user(tmpctx, sysdb, opts, dom, users[i], attrs, false, - &usn_value); + &usn_value, now); /* Do not fail completely on errors. * Just report the failure to save and go on */ |