From 9d56f656d4f593289340a876445785cdfefd3d91 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 19 Dec 2009 12:23:42 +1100 Subject: s4-dsdb: added dsdb_get_extended_dn_uint64() --- source4/dsdb/common/util.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'source4') diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 774f9a757c..b0f9ef0f35 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -2735,9 +2735,9 @@ NTSTATUS dsdb_get_extended_dn_guid(struct ldb_dn *dn, struct GUID *guid) } /* - return a NTTIME from a extended DN structure + return a uint64_t from a extended DN structure */ -NTSTATUS dsdb_get_extended_dn_nttime(struct ldb_dn *dn, NTTIME *nttime, const char *component_name) +NTSTATUS dsdb_get_extended_dn_uint64(struct ldb_dn *dn, uint64_t *val, const char *component_name) { const struct ldb_val *v; char *s; @@ -2749,12 +2749,20 @@ NTSTATUS dsdb_get_extended_dn_nttime(struct ldb_dn *dn, NTTIME *nttime, const ch s = talloc_strndup(dn, (const char *)v->data, v->length); NT_STATUS_HAVE_NO_MEMORY(s); - *nttime = strtoull(s, NULL, 0); + *val = strtoull(s, NULL, 0); talloc_free(s); return NT_STATUS_OK; } +/* + return a NTTIME from a extended DN structure + */ +NTSTATUS dsdb_get_extended_dn_nttime(struct ldb_dn *dn, NTTIME *nttime, const char *component_name) +{ + return dsdb_get_extended_dn_uint64(dn, nttime, component_name); +} + /* return a uint32_t from a extended DN structure */ -- cgit