1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-28 03:33:13 +03:00

r10914: moved the ldap time string functions into ldb so they can be used by

the time attribute handling functions
This commit is contained in:
Andrew Tridgell
2005-10-12 06:30:47 +00:00
committed by Gerald (Jerry) Carter
parent f6818daecc
commit 93c296d527
7 changed files with 52 additions and 59 deletions

View File

@@ -90,7 +90,7 @@ static NTSTATUS fill_dynamic_values(void *mem_ctx, struct ldb_message_element *a
{
int num_currentTime = 1;
DATA_BLOB *currentTime = talloc_array(mem_ctx, DATA_BLOB, num_currentTime);
char *str = ldap_timestring(mem_ctx, time(NULL));
char *str = ldb_timestring(mem_ctx, time(NULL));
NT_STATUS_HAVE_NO_MEMORY(str);
currentTime[0].data = (uint8_t *)str;
currentTime[0].length = strlen(str);
@@ -316,7 +316,7 @@ static NTSTATUS rootdse_Search(struct ldapsrv_partition *partition, struct ldaps
for (j=0; j < ent->num_attributes; j++) {
if (ent->attributes[j].num_values == 1 &&
ent->attributes[j].values[0].length >= 9 &&
strncmp(ent->attributes[j].values[0].data, "_DYNAMIC_", 9) == 0) {
strncmp((char *)ent->attributes[j].values[0].data, "_DYNAMIC_", 9) == 0) {
status = fill_dynamic_values(ent->attributes, &(ent->attributes[j]));
if (!NT_STATUS_IS_OK(status)) {
return status;