summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2012-07-16 08:42:27 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-07-16 10:25:26 -0400
commit33988e421afa86892a732cc74c153fdc5be8703b (patch)
treed562b90f061044a381752542e8adba8253208787
parent8e520758e2325c10d153bd2e3f57330b37545817 (diff)
downloadsssd_unused-33988e421afa86892a732cc74c153fdc5be8703b.tar.gz
sssd_unused-33988e421afa86892a732cc74c153fdc5be8703b.tar.xz
sssd_unused-33988e421afa86892a732cc74c153fdc5be8703b.zip
Fixed wrong number in shadowLastChange
The attribute is supposed to contain number of days since the epoch, not the number of seconds.
-rw-r--r--src/providers/ldap/sdap_async.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c
index 4b286922..42c8dd68 100644
--- a/src/providers/ldap/sdap_async.c
+++ b/src/providers/ldap/sdap_async.c
@@ -744,7 +744,8 @@ sdap_modify_shadow_lastchange_send(TALLOC_CTX *mem_ctx,
ret = ENOMEM;
goto done;
}
- values[0] = talloc_asprintf(values, "%ld", (long)time(NULL));
+ /* The attribute contains number of days since the epoch */
+ values[0] = talloc_asprintf(values, "%ld", (long)time(NULL)/86400);
if (values[0] == NULL) {
ret = ENOMEM;
goto done;