mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
r25748: Don't segfault if we don't have a schema yet.
Andrew Bartlett
This commit is contained in:
parent
2ba99d58e9
commit
388e15a4c1
@ -122,6 +122,12 @@ static int kludge_acl_allowedAttributes(struct ldb_context *ldb, struct ldb_mess
|
||||
const struct dsdb_schema *schema = dsdb_get_schema(ldb);
|
||||
const struct dsdb_class *class;
|
||||
int i, j, ret;
|
||||
|
||||
/* If we don't have a schema yet, we can't do anything... */
|
||||
if (schema == NULL) {
|
||||
return LDB_SUCCESS;
|
||||
}
|
||||
|
||||
/* Must remove any existing attribute, or else confusion reins */
|
||||
ldb_msg_remove_attr(msg, attrName);
|
||||
ret = ldb_msg_add_empty(msg, attrName, 0, &allowedAttributes);
|
||||
@ -184,6 +190,12 @@ static int kludge_acl_childClasses(struct ldb_context *ldb, struct ldb_message *
|
||||
const struct dsdb_schema *schema = dsdb_get_schema(ldb);
|
||||
const struct dsdb_class *class;
|
||||
int i, j, ret;
|
||||
|
||||
/* If we don't have a schema yet, we can't do anything... */
|
||||
if (schema == NULL) {
|
||||
return LDB_SUCCESS;
|
||||
}
|
||||
|
||||
/* Must remove any existing attribute, or else confusion reins */
|
||||
ldb_msg_remove_attr(msg, attrName);
|
||||
ret = ldb_msg_add_empty(msg, attrName, 0, &allowedClasses);
|
||||
|
Loading…
Reference in New Issue
Block a user