summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8b47443)
The length of the cookie is proportional to the number of DCs ever in
the domain (as it stores the uptodateness vector which has stale
invocationID).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13686
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
if (LDB_CONTROL_CMP(control_strings, LDB_CONTROL_DIRSYNC_NAME) == 0) {
struct ldb_dirsync_control *control;
const char *p;
if (LDB_CONTROL_CMP(control_strings, LDB_CONTROL_DIRSYNC_NAME) == 0) {
struct ldb_dirsync_control *control;
const char *p;
int crit, max_attrs, ret;
uint32_t flags;
int crit, max_attrs, ret;
uint32_t flags;
+ cookie = talloc_zero_array(ctrl, char,
+ strlen(control_strings) + 1);
+ if (cookie == NULL) {
+ ldb_oom(ldb);
+ talloc_free(ctrl);
+ return NULL;
+ }
+
p = &(control_strings[sizeof(LDB_CONTROL_DIRSYNC_NAME)]);
p = &(control_strings[sizeof(LDB_CONTROL_DIRSYNC_NAME)]);
- ret = sscanf(p, "%d:%u:%d:%1023[^$]", &crit, &flags, &max_attrs, cookie);
+ ret = sscanf(p, "%d:%u:%d:%[^$]", &crit, &flags, &max_attrs, cookie);
if ((ret < 3) || (crit < 0) || (crit > 1) || (max_attrs < 0)) {
ldb_set_errstring(ldb,
if ((ret < 3) || (crit < 0) || (crit > 1) || (max_attrs < 0)) {
ldb_set_errstring(ldb,
control->cookie_len = 0;
}
ctrl->data = control;
control->cookie_len = 0;
}
ctrl->data = control;
return ctrl;
}
if (LDB_CONTROL_CMP(control_strings, LDB_CONTROL_DIRSYNC_EX_NAME) == 0) {
struct ldb_dirsync_control *control;
const char *p;
return ctrl;
}
if (LDB_CONTROL_CMP(control_strings, LDB_CONTROL_DIRSYNC_EX_NAME) == 0) {
struct ldb_dirsync_control *control;
const char *p;
int crit, max_attrs, ret;
uint32_t flags;
int crit, max_attrs, ret;
uint32_t flags;
+ cookie = talloc_zero_array(ctrl, char,
+ strlen(control_strings) + 1);
+ if (cookie == NULL) {
+ ldb_oom(ldb);
+ talloc_free(ctrl);
+ return NULL;
+ }
+
p = &(control_strings[sizeof(LDB_CONTROL_DIRSYNC_EX_NAME)]);
ret = sscanf(p, "%d:%u:%d:%1023[^$]", &crit, &flags, &max_attrs, cookie);
p = &(control_strings[sizeof(LDB_CONTROL_DIRSYNC_EX_NAME)]);
ret = sscanf(p, "%d:%u:%d:%1023[^$]", &crit, &flags, &max_attrs, cookie);
control->cookie_len = 0;
}
ctrl->data = control;
control->cookie_len = 0;
}
ctrl->data = control;