summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2012-01-04 16:17:24 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2012-01-05 11:59:20 +0100
commit6857a588f36cf556177de3950a890a24443138b8 (patch)
treee945e9061d69fa7f4f31eb59347a1cce0685a2ad /source4/dsdb/samdb
parent3a18a42d13b87a5a6c41d8a70e961313fd6d0a86 (diff)
downloadsamba-6857a588f36cf556177de3950a890a24443138b8.tar.gz
samba-6857a588f36cf556177de3950a890a24443138b8.tar.bz2
samba-6857a588f36cf556177de3950a890a24443138b8.zip
s4:repl_meta_data LDB module - set "isRecycled" time correctly
"unix_to_nt_time()" which is based on "time_t" behaves differently for literals > 32 bit on 32 and 64 bit platforms. Reviewed-by: ekacnet Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Thu Jan 5 11:59:20 CET 2012 on sn-devel-104
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index daca5da5bb..cda9b99c7b 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -50,7 +50,12 @@
#include "lib/util/binsearch.h"
#include "lib/util/tsort.h"
-static const uint64_t DELETED_OBJECT_CONTAINER_CHANGE_TIME = 253402127999L;
+/*
+ * It's 29/12/9999 at 23:59:59 UTC as specified in MS-ADTS 7.1.1.4.2
+ * Deleted Objects Container
+ */
+static const NTTIME DELETED_OBJECT_CONTAINER_CHANGE_TIME = 2650466015990000000ULL;
+
struct replmd_private {
TALLOC_CTX *la_ctx;
struct la_entry *la_list;
@@ -934,10 +939,7 @@ static int replmd_add(struct ldb_module *module, struct ldb_request *req)
* Set the originating_change_time to 29/12/9999 at 23:59:59
* as specified in MS-ADTS 7.1.1.4.2 Deleted Objects Container
*/
- NTTIME deleted_obj_ts;
-
- unix_to_nt_time(&deleted_obj_ts, DELETED_OBJECT_CONTAINER_CHANGE_TIME);
- m->originating_change_time = deleted_obj_ts;
+ m->originating_change_time = DELETED_OBJECT_CONTAINER_CHANGE_TIME;
} else {
m->originating_change_time = now;
}
@@ -1165,10 +1167,7 @@ static int replmd_update_rpmd_element(struct ldb_context *ldb,
* Set the originating_change_time to 29/12/9999 at 23:59:59
* as specified in MS-ADTS 7.1.1.4.2 Deleted Objects Container
*/
- NTTIME deleted_obj_ts;
-
- unix_to_nt_time(&deleted_obj_ts, DELETED_OBJECT_CONTAINER_CHANGE_TIME);
- md1->originating_change_time = deleted_obj_ts;
+ md1->originating_change_time = DELETED_OBJECT_CONTAINER_CHANGE_TIME;
} else {
md1->originating_change_time = now;
}