diff options
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/extended_dn.c | 46 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/local_password.c | 8 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/password_hash.c | 2 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/samldb.c | 2 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/schema.c | 6 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/update_keytab.c | 10 |
6 files changed, 37 insertions, 37 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn.c b/source4/dsdb/samdb/ldb_modules/extended_dn.c index 6f32d22d26..d64673fdd5 100644 --- a/source4/dsdb/samdb/ldb_modules/extended_dn.c +++ b/source4/dsdb/samdb/ldb_modules/extended_dn.c @@ -41,16 +41,16 @@ #include <time.h> -static BOOL is_attr_in_list(const char * const * attrs, const char *attr) +static bool is_attr_in_list(const char * const * attrs, const char *attr) { int i; for (i = 0; attrs[i]; i++) { if (strcasecmp(attrs[i], attr) == 0) - return True; + return true; } - return False; + return false; } static char **copy_attrs(void *mem_ctx, const char * const * attrs) @@ -75,7 +75,7 @@ static char **copy_attrs(void *mem_ctx, const char * const * attrs) return new; } -static BOOL add_attrs(void *mem_ctx, char ***attrs, const char *attr) +static bool add_attrs(void *mem_ctx, char ***attrs, const char *attr) { char **new; int num; @@ -83,23 +83,23 @@ static BOOL add_attrs(void *mem_ctx, char ***attrs, const char *attr) for (num = 0; (*attrs)[num]; num++); new = talloc_realloc(mem_ctx, *attrs, char *, num + 2); - if (!new) return False; + if (!new) return false; *attrs = new; new[num] = talloc_strdup(new, attr); - if (!new[num]) return False; + if (!new[num]) return false; new[num + 1] = NULL; - return True; + return true; } -static BOOL inject_extended_dn(struct ldb_message *msg, +static bool inject_extended_dn(struct ldb_message *msg, struct ldb_context *ldb, int type, - BOOL remove_guid, - BOOL remove_sid) + bool remove_guid, + bool remove_sid) { const struct ldb_val *val; struct GUID guid; @@ -112,7 +112,7 @@ static BOOL inject_extended_dn(struct ldb_message *msg, guid = samdb_result_guid(msg, "objectGUID"); object_guid = GUID_string(msg, &guid); if (!object_guid) - return False; + return false; if (remove_guid) ldb_msg_remove_attr(msg, "objectGUID"); @@ -123,7 +123,7 @@ static BOOL inject_extended_dn(struct ldb_message *msg, if (sid) { object_sid = dom_sid_string(msg, sid); if (!object_sid) - return False; + return false; if (remove_sid) ldb_msg_remove_attr(msg, "objectSID"); @@ -144,24 +144,24 @@ static BOOL inject_extended_dn(struct ldb_message *msg, } break; default: - return False; + return false; } if (!new_dn) - return False; + return false; msg->dn = ldb_dn_new(msg, ldb, new_dn); if (! ldb_dn_validate(msg->dn)) - return False; + return false; val = ldb_msg_find_ldb_val(msg, "distinguishedName"); if (val) { ldb_msg_remove_attr(msg, "distinguishedName"); if (ldb_msg_add_steal_string(msg, "distinguishedName", new_dn)) - return False; + return false; } - return True; + return true; } /* search */ @@ -172,8 +172,8 @@ struct extended_context { int (*up_callback)(struct ldb_context *, void *, struct ldb_reply *); const char * const *attrs; - BOOL remove_guid; - BOOL remove_sid; + bool remove_guid; + bool remove_sid; int extended_type; }; @@ -229,8 +229,8 @@ static int extended_search(struct ldb_module *module, struct ldb_request *req) ac->up_context = req->context; ac->up_callback = req->callback; ac->attrs = req->op.search.attrs; - ac->remove_guid = False; - ac->remove_sid = False; + ac->remove_guid = false; + ac->remove_sid = false; ac->extended_type = extended_ctrl->type; down_req = talloc_zero(req, struct ldb_request); @@ -246,10 +246,10 @@ static int extended_search(struct ldb_module *module, struct ldb_request *req) /* check if attrs only is specified, in that case check wether we need to modify them */ if (req->op.search.attrs) { if (! is_attr_in_list(req->op.search.attrs, "objectGUID")) { - ac->remove_guid = True; + ac->remove_guid = true; } if (! is_attr_in_list(req->op.search.attrs, "objectSID")) { - ac->remove_sid = True; + ac->remove_sid = true; } if (ac->remove_guid || ac->remove_sid) { new_attrs = copy_attrs(down_req, req->op.search.attrs); diff --git a/source4/dsdb/samdb/ldb_modules/local_password.c b/source4/dsdb/samdb/ldb_modules/local_password.c index 573d2e27b9..350434df51 100644 --- a/source4/dsdb/samdb/ldb_modules/local_password.c +++ b/source4/dsdb/samdb/ldb_modules/local_password.c @@ -75,8 +75,8 @@ struct lpdb_context { struct ldb_message *local_message; - BOOL added_objectGUID; - BOOL added_objectClass; + bool added_objectGUID; + bool added_objectClass; struct ldb_reply *search_res; }; @@ -660,7 +660,7 @@ static int local_password_search(struct ldb_module *module, struct ldb_request * if (req->op.search.attrs && !ldb_attr_in_list(req->op.search.attrs, "*")) { if (!ldb_attr_in_list(req->op.search.attrs, "objectGUID")) { search_attrs = ldb_attr_list_copy_add(req, req->op.search.attrs, "objectGUID"); - ac->added_objectGUID = True; + ac->added_objectGUID = true; if (!search_attrs) { return LDB_ERR_OPERATIONS_ERROR; } @@ -669,7 +669,7 @@ static int local_password_search(struct ldb_module *module, struct ldb_request * } if (!ldb_attr_in_list(search_attrs, "objectClass")) { search_attrs = ldb_attr_list_copy_add(req, search_attrs, "objectClass"); - ac->added_objectClass = True; + ac->added_objectClass = true; if (!search_attrs) { return LDB_ERR_OPERATIONS_ERROR; } diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index 646aab9c94..090cce2719 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -92,7 +92,7 @@ struct ph_context { }; struct domain_data { - BOOL store_cleartext; + bool store_cleartext; uint_t pwdProperties; uint_t pwdHistoryLength; char *netbios_domain; diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index 5342c14967..8f80b5cd55 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -44,7 +44,7 @@ int samldb_notice_sid(struct ldb_module *module, TALLOC_CTX *mem_ctx, const struct dom_sid *sid); -static BOOL samldb_msg_add_sid(struct ldb_module *module, struct ldb_message *msg, const char *name, const struct dom_sid *sid) +static bool samldb_msg_add_sid(struct ldb_module *module, struct ldb_message *msg, const char *name, const struct dom_sid *sid) { struct ldb_val v; NTSTATUS status; diff --git a/source4/dsdb/samdb/ldb_modules/schema.c b/source4/dsdb/samdb/ldb_modules/schema.c index 21e93e1715..cf923d673b 100644 --- a/source4/dsdb/samdb/ldb_modules/schema.c +++ b/source4/dsdb/samdb/ldb_modules/schema.c @@ -319,7 +319,7 @@ static int schema_init_attrs(struct ldb_module *module, struct schema_private_da data->attrs[i]->max = ldb_msg_find_attr_as_int(res->msgs[i], "rangeUpper", INT_MAX); data->attrs[i]->systemflag = ldb_msg_find_attr_as_int(res->msgs[i], "systemFlag", 0); data->attrs[i]->searchflag = ldb_msg_find_attr_as_int(res->msgs[i], "searchFlag", 0); - data->attrs[i]->isdefunct = ldb_msg_find_attr_as_bool(res->msgs[i], "isDefunct", False); + data->attrs[i]->isdefunct = ldb_msg_find_attr_as_bool(res->msgs[i], "isDefunct", false); } done: @@ -397,9 +397,9 @@ static int schema_init_classes(struct ldb_module *module, struct schema_private_ */ /* the following attributes are all optional */ - data->class[i]->systemOnly = ldb_msg_find_attr_as_bool(res->msgs[i], "systemOnly", False); + data->class[i]->systemOnly = ldb_msg_find_attr_as_bool(res->msgs[i], "systemOnly", false); data->class[i]->systemflag = ldb_msg_find_attr_as_int(res->msgs[i], "systemFlag", 0); - data->class[i]->isdefunct = ldb_msg_find_attr_as_bool(res->msgs[i], "isDefunct", False); + data->class[i]->isdefunct = ldb_msg_find_attr_as_bool(res->msgs[i], "isDefunct", false); /* attributes are loaded first, so we can just go an query the attributes repo */ diff --git a/source4/dsdb/samdb/ldb_modules/update_keytab.c b/source4/dsdb/samdb/ldb_modules/update_keytab.c index 27b50a453a..f193731900 100644 --- a/source4/dsdb/samdb/ldb_modules/update_keytab.c +++ b/source4/dsdb/samdb/ldb_modules/update_keytab.c @@ -43,7 +43,7 @@ struct update_kt_private { struct dn_list *changed_dns; }; -static int add_modified(struct ldb_module *module, struct ldb_dn *dn, BOOL delete) { +static int add_modified(struct ldb_module *module, struct ldb_dn *dn, bool delete) { struct update_kt_private *data = talloc_get_type(module->private_data, struct update_kt_private); struct dn_list *item; char *filter; @@ -113,7 +113,7 @@ static int update_kt_add(struct ldb_module *module, struct ldb_request *req) if (ret != LDB_SUCCESS) { return ret; } - return add_modified(module, req->op.add.message->dn, False); + return add_modified(module, req->op.add.message->dn, false); } /* modify */ @@ -124,7 +124,7 @@ static int update_kt_modify(struct ldb_module *module, struct ldb_request *req) if (ret != LDB_SUCCESS) { return ret; } - return add_modified(module, req->op.mod.message->dn, False); + return add_modified(module, req->op.mod.message->dn, false); } /* delete */ @@ -132,7 +132,7 @@ static int update_kt_delete(struct ldb_module *module, struct ldb_request *req) { int ret; /* Before we delete it, record the details */ - ret = add_modified(module, req->op.del.dn, True); + ret = add_modified(module, req->op.del.dn, true); if (ret != LDB_SUCCESS) { return ret; } @@ -147,7 +147,7 @@ static int update_kt_rename(struct ldb_module *module, struct ldb_request *req) if (ret != LDB_SUCCESS) { return ret; } - return add_modified(module, req->op.rename.newdn, False); + return add_modified(module, req->op.rename.newdn, false); } /* end a transaction */ |