The Samba-Bugzilla – Attachment 8784 Details for
Bug 9810
validate_ldb of String(Generalized-Time) does not accept millisecond format ".000Z"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch courtesy of http://www.snix.com/wiki/index.php/Samba_4
0001-ldb-accept-milliseconds-in-String-Generalized-Time.patch (text/plain), 1.48 KB, created by
Arvid Requate
on 2013-04-18 14:45:32 UTC
(
hide
)
Description:
Patch courtesy of http://www.snix.com/wiki/index.php/Samba_4
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2013-04-18 14:45:32 UTC
Size:
1.48 KB
patch
obsolete
>From e65d971e5d751769f99ae474b73ca07c41800bbe Mon Sep 17 00:00:00 2001 >From: Arvid Requate <requate@univention.de> >Date: Thu, 18 Apr 2013 16:26:08 +0200 >Subject: [PATCH] ldb: accept milliseconds in String(Generalized-Time) > >The Windows 2008 R2 Remote Desktop License Manager sends >the "msTSExpireDate" attribute in a millisecond format (".000Z") > >Patch courtesy of http://www.snix.com/wiki/index.php/Samba_4 >--- > lib/ldb/common/ldb_msg.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/lib/ldb/common/ldb_msg.c b/lib/ldb/common/ldb_msg.c >index 809e3af..4358619 100644 >--- a/lib/ldb/common/ldb_msg.c >+++ b/lib/ldb/common/ldb_msg.c >@@ -1092,7 +1092,7 @@ int ldb_val_to_time(const struct ldb_val *v, time_t *t) > { > struct tm tm; > >- if (v == NULL || !v->data || (v->length != 17 && v->length != 13)) { >+ if (v == NULL || !v->data || (v->length != 19 && v->length != 17 && v->length != 13)) { > return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX; > } > >@@ -1104,6 +1104,12 @@ int ldb_val_to_time(const struct ldb_val *v, time_t *t) > &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) { > return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX; > } >+ } else if (v->length == 19) { >+ if (sscanf((char *)v->data, "%04u%02u%02u%02u%02u%02u.000Z", >+ &tm.tm_year, &tm.tm_mon, &tm.tm_mday, >+ &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) { >+ return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX; >+ } > } else { > if (sscanf((char *)v->data, "%04u%02u%02u%02u%02u%02u.0Z", > &tm.tm_year, &tm.tm_mon, &tm.tm_mday, >-- >1.7.10.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 9810
: 8784 |
10662