summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2012-07-16 08:42:27 -0400
committerJakub Hrozek <jhrozek@redhat.com>2012-08-17 15:58:13 +0200
commit2706bce1f10b05374a50a32486bd76eae79b7c45 (patch)
treea5f94b09cf18899126e2c0cdabcd0eedef35bed3
parentbb3527e4a45a9c87fe5dbda0c86b8f51a652a996 (diff)
downloadsssd-2706bce1f10b05374a50a32486bd76eae79b7c45.tar.gz
sssd-2706bce1f10b05374a50a32486bd76eae79b7c45.tar.xz
sssd-2706bce1f10b05374a50a32486bd76eae79b7c45.zip
Fixed wrong number in shadowLastChangesssd-1.8.0-32.1.el6_3
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 acc600a47..516e21874 100644
--- a/src/providers/ldap/sdap_async.c
+++ b/src/providers/ldap/sdap_async.c
@@ -742,7 +742,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;