diff options
Diffstat (limited to 'source4/dsdb/samdb')
-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 | ||||
-rw-r--r-- | source4/dsdb/samdb/samdb.c | 22 |
7 files changed, 48 insertions, 48 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 */ diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c index 2f755d6c79..7de873d77d 100644 --- a/source4/dsdb/samdb/samdb.c +++ b/source4/dsdb/samdb/samdb.c @@ -1391,19 +1391,19 @@ struct ldb_dn *samdb_server_site_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx /* work out if we are the PDC for the domain of the current open ldb */ -BOOL samdb_is_pdc(struct ldb_context *ldb) +bool samdb_is_pdc(struct ldb_context *ldb) { const char *dom_attrs[] = { "fSMORoleOwner", NULL }; int ret; struct ldb_result *dom_res; TALLOC_CTX *tmp_ctx; - BOOL is_pdc; + bool is_pdc; struct ldb_dn *pdc; tmp_ctx = talloc_new(ldb); if (tmp_ctx == NULL) { DEBUG(1, ("talloc_new failed in samdb_is_pdc")); - return False; + return false; } ret = ldb_search(ldb, ldb_get_default_basedn(ldb), LDB_SCOPE_BASE, NULL, dom_attrs, &dom_res); @@ -1421,9 +1421,9 @@ BOOL samdb_is_pdc(struct ldb_context *ldb) pdc = ldb_msg_find_attr_as_dn(ldb, tmp_ctx, dom_res->msgs[0], "fSMORoleOwner"); if (ldb_dn_compare(samdb_ntds_settings_dn(ldb), pdc) == 0) { - is_pdc = True; + is_pdc = true; } else { - is_pdc = False; + is_pdc = false; } talloc_free(tmp_ctx); @@ -1433,7 +1433,7 @@ BOOL samdb_is_pdc(struct ldb_context *ldb) failed: DEBUG(1,("Failed to find if we are the PDC for this ldb\n")); talloc_free(tmp_ctx); - return False; + return false; } @@ -1474,7 +1474,7 @@ struct ldb_dn *samdb_search_for_parent_domain(struct ldb_context *ldb, TALLOC_CT /* check that a password is sufficiently complex */ -static BOOL samdb_password_complexity_ok(const char *pass) +static bool samdb_password_complexity_ok(const char *pass) { return check_password_quality(pass); } @@ -1500,7 +1500,7 @@ _PUBLIC_ NTSTATUS samdb_set_password(struct ldb_context *ctx, TALLOC_CTX *mem_ct const char *new_pass, struct samr_Password *lmNewHash, struct samr_Password *ntNewHash, - BOOL user_change, + bool user_change, enum samr_RejectReason *reject_reason, struct samr_DomInfo1 **_dominfo) { @@ -1521,7 +1521,7 @@ _PUBLIC_ NTSTATUS samdb_set_password(struct ldb_context *ctx, TALLOC_CTX *mem_ct int sambaLMPwdHistory_len, sambaNTPwdHistory_len; struct dom_sid *domain_sid; struct ldb_message **res; - BOOL restrictions; + bool restrictions; int count; time_t now = time(NULL); NTTIME now_nt; @@ -1738,7 +1738,7 @@ _PUBLIC_ NTSTATUS samdb_set_password_sid(struct ldb_context *ctx, TALLOC_CTX *me const char *new_pass, struct samr_Password *lmNewHash, struct samr_Password *ntNewHash, - BOOL user_change, + bool user_change, enum samr_RejectReason *reject_reason, struct samr_DomInfo1 **_dominfo) { @@ -1811,7 +1811,7 @@ NTSTATUS security_token_create(TALLOC_CTX *mem_ctx, struct dom_sid *group_sid, int n_groupSIDs, struct dom_sid **groupSIDs, - BOOL is_authenticated, + bool is_authenticated, struct security_token **token) { struct security_token *ptoken; |