diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2012-07-16 08:42:27 -0400 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-09-07 14:37:21 +0200 |
commit | b09c19e3769f27f12dcfc41fb5713bc0d6f492d6 (patch) | |
tree | 304cbaeec72cac544501176eabe0add8b2dbdc70 /src/providers/ldap | |
parent | d49f68fb5313a3f4db111bbf698ac437823e782c (diff) | |
download | sssd-b09c19e3769f27f12dcfc41fb5713bc0d6f492d6.tar.gz sssd-b09c19e3769f27f12dcfc41fb5713bc0d6f492d6.tar.xz sssd-b09c19e3769f27f12dcfc41fb5713bc0d6f492d6.zip |
Fixed wrong number in shadowLastChange
The attribute is supposed to contain number of days since the epoch, not
the number of seconds.
Diffstat (limited to 'src/providers/ldap')
-rw-r--r-- | src/providers/ldap/sdap_async.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c index e90ad2403..f65b41a33 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; |