diff options
22 files changed, 230 insertions, 230 deletions
diff --git a/source4/cluster/ctdb/brlock_ctdb.c b/source4/cluster/ctdb/brlock_ctdb.c index fecc88da45..8b633358a3 100644 --- a/source4/cluster/ctdb/brlock_ctdb.c +++ b/source4/cluster/ctdb/brlock_ctdb.c @@ -148,7 +148,7 @@ static struct brl_handle *brl_ctdb_create_handle(TALLOC_CTX *mem_ctx, struct ntv /* see if two locking contexts are equal */ -static BOOL brl_ctdb_same_context(struct lock_context *ctx1, struct lock_context *ctx2) +static bool brl_ctdb_same_context(struct lock_context *ctx1, struct lock_context *ctx2) { return (cluster_id_equal(&ctx1->server, &ctx2->server) && ctx1->smbpid == ctx2->smbpid && @@ -158,7 +158,7 @@ static BOOL brl_ctdb_same_context(struct lock_context *ctx1, struct lock_context /* see if lck1 and lck2 overlap */ -static BOOL brl_ctdb_overlap(struct lock_struct *lck1, +static bool brl_ctdb_overlap(struct lock_struct *lck1, struct lock_struct *lck2) { /* this extra check is not redundent - it copes with locks @@ -166,35 +166,35 @@ static BOOL brl_ctdb_overlap(struct lock_struct *lck1, if (lck1->size != 0 && lck1->start == lck2->start && lck1->size == lck2->size) { - return True; + return true; } if (lck1->start >= (lck2->start+lck2->size) || lck2->start >= (lck1->start+lck1->size)) { - return False; + return false; } - return True; + return true; } /* See if lock2 can be added when lock1 is in place. */ -static BOOL brl_ctdb_conflict(struct lock_struct *lck1, +static bool brl_ctdb_conflict(struct lock_struct *lck1, struct lock_struct *lck2) { /* pending locks don't conflict with anything */ if (lck1->lock_type >= PENDING_READ_LOCK || lck2->lock_type >= PENDING_READ_LOCK) { - return False; + return false; } if (lck1->lock_type == READ_LOCK && lck2->lock_type == READ_LOCK) { - return False; + return false; } if (brl_ctdb_same_context(&lck1->context, &lck2->context) && lck2->lock_type == READ_LOCK && lck1->ntvfs == lck2->ntvfs) { - return False; + return false; } return brl_ctdb_overlap(lck1, lck2); @@ -205,16 +205,16 @@ static BOOL brl_ctdb_conflict(struct lock_struct *lck1, Check to see if this lock conflicts, but ignore our own locks on the same fnum only. */ -static BOOL brl_ctdb_conflict_other(struct lock_struct *lck1, struct lock_struct *lck2) +static bool brl_ctdb_conflict_other(struct lock_struct *lck1, struct lock_struct *lck2) { /* pending locks don't conflict with anything */ if (lck1->lock_type >= PENDING_READ_LOCK || lck2->lock_type >= PENDING_READ_LOCK) { - return False; + return false; } if (lck1->lock_type == READ_LOCK && lck2->lock_type == READ_LOCK) - return False; + return false; /* * note that incoming write calls conflict with existing READ @@ -224,7 +224,7 @@ static BOOL brl_ctdb_conflict_other(struct lock_struct *lck1, struct lock_struct if (brl_ctdb_same_context(&lck1->context, &lck2->context) && lck1->ntvfs == lck2->ntvfs && (lck2->lock_type == READ_LOCK || lck1->lock_type == WRITE_LOCK)) { - return False; + return false; } return brl_ctdb_overlap(lck1, lck2); diff --git a/source4/cluster/ctdb/client/ctdb_client.c b/source4/cluster/ctdb/client/ctdb_client.c index 7525b296d6..84c095ec8a 100644 --- a/source4/cluster/ctdb/client/ctdb_client.c +++ b/source4/cluster/ctdb/client/ctdb_client.c @@ -1558,7 +1558,7 @@ static void traverse_handler(struct ctdb_context *ctdb, uint64_t srvid, TDB_DATA if (data.dsize < sizeof(uint32_t) || d->length != data.dsize) { DEBUG(0,("Bad data size %u in traverse_handler\n", (unsigned)data.dsize)); - state->done = True; + state->done = true; return; } @@ -1569,12 +1569,12 @@ static void traverse_handler(struct ctdb_context *ctdb, uint64_t srvid, TDB_DATA if (key.dsize == 0 && data.dsize == 0) { /* end of traverse */ - state->done = True; + state->done = true; return; } if (state->fn(ctdb, key, data, state->private_data) != 0) { - state->done = True; + state->done = true; } state->count++; @@ -1594,7 +1594,7 @@ int ctdb_traverse(struct ctdb_db_context *ctdb_db, ctdb_traverse_func fn, void * uint64_t srvid = (getpid() | 0xFLL<<60); struct traverse_state state; - state.done = False; + state.done = false; state.count = 0; state.private_data = private_data; state.fn = fn; diff --git a/source4/cluster/ctdb/opendb_ctdb.c b/source4/cluster/ctdb/opendb_ctdb.c index ae174ea01d..7753992df8 100644 --- a/source4/cluster/ctdb/opendb_ctdb.c +++ b/source4/cluster/ctdb/opendb_ctdb.c @@ -55,7 +55,7 @@ struct odb_context { struct ctdb_context *ctdb; struct ctdb_db_context *ctdb_db; struct ntvfs_context *ntvfs_ctx; - BOOL oplocks; + bool oplocks; }; /* @@ -264,7 +264,7 @@ static NTSTATUS odb_oplock_break_send(struct odb_context *odb, struct opendb_ent */ static NTSTATUS odb_ctdb_open_file(struct odb_lock *lck, void *file_handle, uint32_t stream_id, uint32_t share_access, - uint32_t access_mask, BOOL delete_on_close, + uint32_t access_mask, bool delete_on_close, const char *path, uint32_t oplock_level, uint32_t *oplock_granted) { @@ -274,7 +274,7 @@ static NTSTATUS odb_ctdb_open_file(struct odb_lock *lck, void *file_handle, struct opendb_file file; NTSTATUS status; - if (odb->oplocks == False) { + if (odb->oplocks == false) { oplock_level = OPLOCK_NONE; } @@ -405,7 +405,7 @@ static NTSTATUS odb_ctdb_close_file(struct odb_lock *lck, void *file_handle) if (file_handle == file.entries[i].file_handle && cluster_id_equal(&odb->ntvfs_ctx->server_id, &file.entries[i].server)) { if (file.entries[i].delete_on_close) { - file.delete_on_close = True; + file.delete_on_close = true; } if (i < file.num_entries-1) { memmove(file.entries+i, file.entries+i+1, @@ -492,7 +492,7 @@ static NTSTATUS odb_ctdb_rename(struct odb_lock *lck, const char *path) /* update delete on close flag on an open file */ -static NTSTATUS odb_ctdb_set_delete_on_close(struct odb_lock *lck, BOOL del_on_close) +static NTSTATUS odb_ctdb_set_delete_on_close(struct odb_lock *lck, bool del_on_close) { NTSTATUS status; struct opendb_file file; @@ -510,7 +510,7 @@ static NTSTATUS odb_ctdb_set_delete_on_close(struct odb_lock *lck, BOOL del_on_c people still have the file open */ static NTSTATUS odb_ctdb_get_delete_on_close(struct odb_context *odb, - DATA_BLOB *key, BOOL *del_on_close, + DATA_BLOB *key, bool *del_on_close, int *open_count, char **path) { NTSTATUS status; @@ -523,7 +523,7 @@ static NTSTATUS odb_ctdb_get_delete_on_close(struct odb_context *odb, status = odb_pull_record(lck, &file); if (NT_STATUS_EQUAL(NT_STATUS_OBJECT_NAME_NOT_FOUND, status)) { talloc_free(lck); - (*del_on_close) = False; + (*del_on_close) = false; return NT_STATUS_OK; } if (!NT_STATUS_IS_OK(status)) { @@ -539,7 +539,7 @@ static NTSTATUS odb_ctdb_get_delete_on_close(struct odb_context *odb, *path = talloc_strdup(odb, file.path); NT_STATUS_HAVE_NO_MEMORY(*path); if (file.num_entries == 1 && file.entries[0].delete_on_close) { - (*del_on_close) = True; + (*del_on_close) = true; } } diff --git a/source4/dsdb/common/sidmap.c b/source4/dsdb/common/sidmap.c index 023c88ad7f..de1f3f3c7a 100644 --- a/source4/dsdb/common/sidmap.c +++ b/source4/dsdb/common/sidmap.c @@ -68,26 +68,26 @@ _PUBLIC_ struct sidmap_context *sidmap_open(TALLOC_CTX *mem_ctx) check the sAMAccountType field of a search result to see if the account is a user account */ -static BOOL is_user_account(struct ldb_message *res) +static bool is_user_account(struct ldb_message *res) { uint_t atype = samdb_result_uint(res, "sAMAccountType", 0); if (atype && (!(atype & ATYPE_ACCOUNT))) { - return False; + return false; } - return True; + return true; } /* check the sAMAccountType field of a search result to see if the account is a group account */ -static BOOL is_group_account(struct ldb_message *res) +static bool is_group_account(struct ldb_message *res) { uint_t atype = samdb_result_uint(res, "sAMAccountType", 0); if (atype && atype == ATYPE_NORMAL_ACCOUNT) { - return False; + return false; } - return True; + return true; } @@ -217,7 +217,7 @@ allocated_sid: /* see if a sid is a group - very inefficient! */ -_PUBLIC_ BOOL sidmap_sid_is_group(struct sidmap_context *sidmap, struct dom_sid *sid) +_PUBLIC_ bool sidmap_sid_is_group(struct sidmap_context *sidmap, struct dom_sid *sid) { const char *attrs[] = { "sAMAccountType", NULL }; int ret; @@ -225,7 +225,7 @@ _PUBLIC_ BOOL sidmap_sid_is_group(struct sidmap_context *sidmap, struct dom_sid struct ldb_message **res; NTSTATUS status; struct dom_sid *domain_sid; - BOOL is_group; + bool is_group; tmp_ctx = talloc_new(sidmap); @@ -240,19 +240,19 @@ _PUBLIC_ BOOL sidmap_sid_is_group(struct sidmap_context *sidmap, struct dom_sid status = sidmap_primary_domain_sid(sidmap, tmp_ctx, &domain_sid); if (!NT_STATUS_IS_OK(status)) { talloc_free(tmp_ctx); - return False; + return false; } if (dom_sid_in_domain(domain_sid, sid)) { uint32_t rid = sid->sub_auths[sid->num_auths-1]; if (rid >= SIDMAP_LOCAL_GROUP_BASE) { talloc_free(tmp_ctx); - return True; + return true; } } talloc_free(tmp_ctx); - return False; + return false; } /* 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; diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c index 41b53be977..e8c8d49f5e 100644 --- a/source4/dsdb/schema/schema_init.c +++ b/source4/dsdb/schema/schema_init.c @@ -358,12 +358,12 @@ WERROR dsdb_map_int2oid(const struct dsdb_schema *schema, uint32_t in, TALLOC_CT d_printf("%s: %s == NULL\n", __location__, attr); \ return WERR_INVALID_PARAM; \ } else { \ - (p)->elem = False; \ + (p)->elem = false; \ } \ } else if (strcasecmp("TRUE", str) == 0) { \ - (p)->elem = True; \ + (p)->elem = true; \ } else if (strcasecmp("FALSE", str) == 0) { \ - (p)->elem = False; \ + (p)->elem = false; \ } else { \ d_printf("%s: %s == %s\n", __location__, attr, str); \ return WERR_INVALID_PARAM; \ @@ -396,9 +396,9 @@ WERROR dsdb_attribute_from_ldb(const struct dsdb_schema *schema, { WERROR status; - GET_STRING_LDB(msg, "cn", mem_ctx, attr, cn, False); - GET_STRING_LDB(msg, "lDAPDisplayName", mem_ctx, attr, lDAPDisplayName, True); - GET_STRING_LDB(msg, "attributeID", mem_ctx, attr, attributeID_oid, True); + GET_STRING_LDB(msg, "cn", mem_ctx, attr, cn, false); + GET_STRING_LDB(msg, "lDAPDisplayName", mem_ctx, attr, lDAPDisplayName, true); + GET_STRING_LDB(msg, "attributeID", mem_ctx, attr, attributeID_oid, true); if (schema->num_prefixes == 0) { /* set an invalid value */ attr->attributeID_id = 0xFFFFFFFF; @@ -418,10 +418,10 @@ WERROR dsdb_attribute_from_ldb(const struct dsdb_schema *schema, GET_UINT32_LDB(msg, "searchFlags", attr, searchFlags); GET_UINT32_LDB(msg, "systemFlags", attr, systemFlags); - GET_BOOL_LDB(msg, "isMemberOfPartialAttributeSet", attr, isMemberOfPartialAttributeSet, False); + GET_BOOL_LDB(msg, "isMemberOfPartialAttributeSet", attr, isMemberOfPartialAttributeSet, false); GET_UINT32_LDB(msg, "linkID", attr, linkID); - GET_STRING_LDB(msg, "attributeSyntax", mem_ctx, attr, attributeSyntax_oid, True); + GET_STRING_LDB(msg, "attributeSyntax", mem_ctx, attr, attributeSyntax_oid, true); if (schema->num_prefixes == 0) { /* set an invalid value */ attr->attributeSyntax_id = 0xFFFFFFFF; @@ -437,21 +437,21 @@ WERROR dsdb_attribute_from_ldb(const struct dsdb_schema *schema, GET_UINT32_LDB(msg, "oMSyntax", attr, oMSyntax); GET_BLOB_LDB(msg, "oMObjectClass", mem_ctx, attr, oMObjectClass); - GET_BOOL_LDB(msg, "isSingleValued", attr, isSingleValued, True); + GET_BOOL_LDB(msg, "isSingleValued", attr, isSingleValued, true); GET_UINT32_LDB(msg, "rangeLower", attr, rangeLower); GET_UINT32_LDB(msg, "rangeUpper", attr, rangeUpper); - GET_BOOL_LDB(msg, "extendedCharsAllowed", attr, extendedCharsAllowed, False); + GET_BOOL_LDB(msg, "extendedCharsAllowed", attr, extendedCharsAllowed, false); GET_UINT32_LDB(msg, "schemaFlagsEx", attr, schemaFlagsEx); GET_BLOB_LDB(msg, "msDs-Schema-Extensions", mem_ctx, attr, msDs_Schema_Extensions); - GET_BOOL_LDB(msg, "showInAdvancedViewOnly", attr, showInAdvancedViewOnly, False); - GET_STRING_LDB(msg, "adminDisplayName", mem_ctx, attr, adminDisplayName, False); - GET_STRING_LDB(msg, "adminDescription", mem_ctx, attr, adminDescription, False); - GET_STRING_LDB(msg, "classDisplayName", mem_ctx, attr, classDisplayName, False); - GET_BOOL_LDB(msg, "isEphemeral", attr, isEphemeral, False); - GET_BOOL_LDB(msg, "isDefunct", attr, isDefunct, False); - GET_BOOL_LDB(msg, "systemOnly", attr, systemOnly, False); + GET_BOOL_LDB(msg, "showInAdvancedViewOnly", attr, showInAdvancedViewOnly, false); + GET_STRING_LDB(msg, "adminDisplayName", mem_ctx, attr, adminDisplayName, false); + GET_STRING_LDB(msg, "adminDescription", mem_ctx, attr, adminDescription, false); + GET_STRING_LDB(msg, "classDisplayName", mem_ctx, attr, classDisplayName, false); + GET_BOOL_LDB(msg, "isEphemeral", attr, isEphemeral, false); + GET_BOOL_LDB(msg, "isDefunct", attr, isDefunct, false); + GET_BOOL_LDB(msg, "systemOnly", attr, systemOnly, false); attr->syntax = dsdb_syntax_for_attribute(attr); if (!attr->syntax) { @@ -468,9 +468,9 @@ WERROR dsdb_class_from_ldb(const struct dsdb_schema *schema, { WERROR status; - GET_STRING_LDB(msg, "cn", mem_ctx, obj, cn, False); - GET_STRING_LDB(msg, "lDAPDisplayName", mem_ctx, obj, lDAPDisplayName, True); - GET_STRING_LDB(msg, "governsID", mem_ctx, obj, governsID_oid, True); + GET_STRING_LDB(msg, "cn", mem_ctx, obj, cn, false); + GET_STRING_LDB(msg, "lDAPDisplayName", mem_ctx, obj, lDAPDisplayName, true); + GET_STRING_LDB(msg, "governsID", mem_ctx, obj, governsID_oid, true); if (schema->num_prefixes == 0) { /* set an invalid value */ obj->governsID_id = 0xFFFFFFFF; @@ -486,36 +486,36 @@ WERROR dsdb_class_from_ldb(const struct dsdb_schema *schema, GET_GUID_LDB(msg, "schemaIDGUID", obj, schemaIDGUID); GET_UINT32_LDB(msg, "objectClassCategory", obj, objectClassCategory); - GET_STRING_LDB(msg, "rDNAttID", mem_ctx, obj, rDNAttID, False); - GET_STRING_LDB(msg, "defaultObjectCategory", mem_ctx, obj, defaultObjectCategory, True); + GET_STRING_LDB(msg, "rDNAttID", mem_ctx, obj, rDNAttID, false); + GET_STRING_LDB(msg, "defaultObjectCategory", mem_ctx, obj, defaultObjectCategory, true); - GET_STRING_LDB(msg, "subClassOf", mem_ctx, obj, subClassOf, True); + GET_STRING_LDB(msg, "subClassOf", mem_ctx, obj, subClassOf, true); obj->systemAuxiliaryClass = NULL; obj->auxiliaryClass = NULL; - GET_STRING_LIST_LDB(msg, "systemMustContain", mem_ctx, obj, systemMustContain, False); - GET_STRING_LIST_LDB(msg, "systemMayContain", mem_ctx, obj, systemMayContain, False); - GET_STRING_LIST_LDB(msg, "mustContain", mem_ctx, obj, mustContain, False); - GET_STRING_LIST_LDB(msg, "mayContain", mem_ctx, obj, mayContain, False); + GET_STRING_LIST_LDB(msg, "systemMustContain", mem_ctx, obj, systemMustContain, false); + GET_STRING_LIST_LDB(msg, "systemMayContain", mem_ctx, obj, systemMayContain, false); + GET_STRING_LIST_LDB(msg, "mustContain", mem_ctx, obj, mustContain, false); + GET_STRING_LIST_LDB(msg, "mayContain", mem_ctx, obj, mayContain, false); - GET_STRING_LIST_LDB(msg, "systemPossSuperiors", mem_ctx, obj, systemPossSuperiors, False); - GET_STRING_LIST_LDB(msg, "possSuperiors", mem_ctx, obj, possSuperiors, False); - GET_STRING_LIST_LDB(msg, "possibleInferiors", mem_ctx, obj, possibleInferiors, False); + GET_STRING_LIST_LDB(msg, "systemPossSuperiors", mem_ctx, obj, systemPossSuperiors, false); + GET_STRING_LIST_LDB(msg, "possSuperiors", mem_ctx, obj, possSuperiors, false); + GET_STRING_LIST_LDB(msg, "possibleInferiors", mem_ctx, obj, possibleInferiors, false); - GET_STRING_LDB(msg, "defaultSecurityDescriptor", mem_ctx, obj, defaultSecurityDescriptor, False); + GET_STRING_LDB(msg, "defaultSecurityDescriptor", mem_ctx, obj, defaultSecurityDescriptor, false); GET_UINT32_LDB(msg, "schemaFlagsEx", obj, schemaFlagsEx); GET_BLOB_LDB(msg, "msDs-Schema-Extensions", mem_ctx, obj, msDs_Schema_Extensions); - GET_BOOL_LDB(msg, "showInAdvancedViewOnly", obj, showInAdvancedViewOnly, False); - GET_STRING_LDB(msg, "adminDisplayName", mem_ctx, obj, adminDisplayName, False); - GET_STRING_LDB(msg, "adminDescription", mem_ctx, obj, adminDescription, False); - GET_STRING_LDB(msg, "classDisplayName", mem_ctx, obj, classDisplayName, False); - GET_BOOL_LDB(msg, "defaultHidingValue", obj, defaultHidingValue, False); - GET_BOOL_LDB(msg, "isDefunct", obj, isDefunct, False); - GET_BOOL_LDB(msg, "systemOnly", obj, systemOnly, False); + GET_BOOL_LDB(msg, "showInAdvancedViewOnly", obj, showInAdvancedViewOnly, false); + GET_STRING_LDB(msg, "adminDisplayName", mem_ctx, obj, adminDisplayName, false); + GET_STRING_LDB(msg, "adminDescription", mem_ctx, obj, adminDescription, false); + GET_STRING_LDB(msg, "classDisplayName", mem_ctx, obj, classDisplayName, false); + GET_BOOL_LDB(msg, "defaultHidingValue", obj, defaultHidingValue, false); + GET_BOOL_LDB(msg, "isDefunct", obj, isDefunct, false); + GET_BOOL_LDB(msg, "systemOnly", obj, systemOnly, false); return WERR_OK; } @@ -689,9 +689,9 @@ static struct drsuapi_DsReplicaAttribute *dsdb_find_object_attr_name(struct dsdb if (_a && _a->value_ctr.num_values >= 1 \ && _a->value_ctr.values[0].blob \ && _a->value_ctr.values[0].blob->length == 4) { \ - (p)->elem = (IVAL(_a->value_ctr.values[0].blob->data,0)?True:False);\ + (p)->elem = (IVAL(_a->value_ctr.values[0].blob->data,0)?true:false);\ } else { \ - (p)->elem = False; \ + (p)->elem = false; \ } \ } while (0) @@ -744,8 +744,8 @@ WERROR dsdb_attribute_from_drsuapi(struct dsdb_schema *schema, { WERROR status; - GET_STRING_DS(schema, r, "name", mem_ctx, attr, cn, True); - GET_STRING_DS(schema, r, "lDAPDisplayName", mem_ctx, attr, lDAPDisplayName, True); + GET_STRING_DS(schema, r, "name", mem_ctx, attr, cn, true); + GET_STRING_DS(schema, r, "lDAPDisplayName", mem_ctx, attr, lDAPDisplayName, true); GET_UINT32_DS(schema, r, "attributeID", attr, attributeID_id); status = dsdb_map_int2oid(schema, attr->attributeID_id, mem_ctx, &attr->attributeID_oid); if (!W_ERROR_IS_OK(status)) { @@ -761,7 +761,7 @@ WERROR dsdb_attribute_from_drsuapi(struct dsdb_schema *schema, GET_UINT32_DS(schema, r, "searchFlags", attr, searchFlags); GET_UINT32_DS(schema, r, "systemFlags", attr, systemFlags); - GET_BOOL_DS(schema, r, "isMemberOfPartialAttributeSet", attr, isMemberOfPartialAttributeSet, False); + GET_BOOL_DS(schema, r, "isMemberOfPartialAttributeSet", attr, isMemberOfPartialAttributeSet, false); GET_UINT32_DS(schema, r, "linkID", attr, linkID); GET_UINT32_DS(schema, r, "attributeSyntax", attr, attributeSyntax_id); @@ -775,21 +775,21 @@ WERROR dsdb_attribute_from_drsuapi(struct dsdb_schema *schema, GET_UINT32_DS(schema, r, "oMSyntax", attr, oMSyntax); GET_BLOB_DS(schema, r, "oMObjectClass", mem_ctx, attr, oMObjectClass); - GET_BOOL_DS(schema, r, "isSingleValued", attr, isSingleValued, True); + GET_BOOL_DS(schema, r, "isSingleValued", attr, isSingleValued, true); GET_UINT32_DS(schema, r, "rangeLower", attr, rangeLower); GET_UINT32_DS(schema, r, "rangeUpper", attr, rangeUpper); - GET_BOOL_DS(schema, r, "extendedCharsAllowed", attr, extendedCharsAllowed, False); + GET_BOOL_DS(schema, r, "extendedCharsAllowed", attr, extendedCharsAllowed, false); GET_UINT32_DS(schema, r, "schemaFlagsEx", attr, schemaFlagsEx); GET_BLOB_DS(schema, r, "msDs-Schema-Extensions", mem_ctx, attr, msDs_Schema_Extensions); - GET_BOOL_DS(schema, r, "showInAdvancedViewOnly", attr, showInAdvancedViewOnly, False); - GET_STRING_DS(schema, r, "adminDisplayName", mem_ctx, attr, adminDisplayName, False); - GET_STRING_DS(schema, r, "adminDescription", mem_ctx, attr, adminDescription, False); - GET_STRING_DS(schema, r, "classDisplayName", mem_ctx, attr, classDisplayName, False); - GET_BOOL_DS(schema, r, "isEphemeral", attr, isEphemeral, False); - GET_BOOL_DS(schema, r, "isDefunct", attr, isDefunct, False); - GET_BOOL_DS(schema, r, "systemOnly", attr, systemOnly, False); + GET_BOOL_DS(schema, r, "showInAdvancedViewOnly", attr, showInAdvancedViewOnly, false); + GET_STRING_DS(schema, r, "adminDisplayName", mem_ctx, attr, adminDisplayName, false); + GET_STRING_DS(schema, r, "adminDescription", mem_ctx, attr, adminDescription, false); + GET_STRING_DS(schema, r, "classDisplayName", mem_ctx, attr, classDisplayName, false); + GET_BOOL_DS(schema, r, "isEphemeral", attr, isEphemeral, false); + GET_BOOL_DS(schema, r, "isDefunct", attr, isDefunct, false); + GET_BOOL_DS(schema, r, "systemOnly", attr, systemOnly, false); attr->syntax = dsdb_syntax_for_attribute(attr); if (!attr->syntax) { @@ -806,8 +806,8 @@ WERROR dsdb_class_from_drsuapi(struct dsdb_schema *schema, { WERROR status; - GET_STRING_DS(schema, r, "name", mem_ctx, obj, cn, True); - GET_STRING_DS(schema, r, "lDAPDisplayName", mem_ctx, obj, lDAPDisplayName, True); + GET_STRING_DS(schema, r, "name", mem_ctx, obj, cn, true); + GET_STRING_DS(schema, r, "lDAPDisplayName", mem_ctx, obj, lDAPDisplayName, true); GET_UINT32_DS(schema, r, "governsID", obj, governsID_id); status = dsdb_map_int2oid(schema, obj->governsID_id, mem_ctx, &obj->governsID_oid); if (!W_ERROR_IS_OK(status)) { @@ -819,10 +819,10 @@ WERROR dsdb_class_from_drsuapi(struct dsdb_schema *schema, GET_GUID_DS(schema, r, "schemaIDGUID", mem_ctx, obj, schemaIDGUID); GET_UINT32_DS(schema, r, "objectClassCategory", obj, objectClassCategory); - GET_STRING_DS(schema, r, "rDNAttID", mem_ctx, obj, rDNAttID, False); - GET_DN_DS(schema, r, "defaultObjectCategory", mem_ctx, obj, defaultObjectCategory, True); + GET_STRING_DS(schema, r, "rDNAttID", mem_ctx, obj, rDNAttID, false); + GET_DN_DS(schema, r, "defaultObjectCategory", mem_ctx, obj, defaultObjectCategory, true); - GET_STRING_DS(schema, r, "subClassOf", mem_ctx, obj, subClassOf, True); + GET_STRING_DS(schema, r, "subClassOf", mem_ctx, obj, subClassOf, true); obj->systemAuxiliaryClass = NULL; obj->systemPossSuperiors = NULL; @@ -836,18 +836,18 @@ WERROR dsdb_class_from_drsuapi(struct dsdb_schema *schema, obj->possibleInferiors = NULL; - GET_STRING_DS(schema, r, "defaultSecurityDescriptor", mem_ctx, obj, defaultSecurityDescriptor, False); + GET_STRING_DS(schema, r, "defaultSecurityDescriptor", mem_ctx, obj, defaultSecurityDescriptor, false); GET_UINT32_DS(schema, r, "schemaFlagsEx", obj, schemaFlagsEx); GET_BLOB_DS(schema, r, "msDs-Schema-Extensions", mem_ctx, obj, msDs_Schema_Extensions); - GET_BOOL_DS(schema, r, "showInAdvancedViewOnly", obj, showInAdvancedViewOnly, False); - GET_STRING_DS(schema, r, "adminDisplayName", mem_ctx, obj, adminDisplayName, False); - GET_STRING_DS(schema, r, "adminDescription", mem_ctx, obj, adminDescription, False); - GET_STRING_DS(schema, r, "classDisplayName", mem_ctx, obj, classDisplayName, False); - GET_BOOL_DS(schema, r, "defaultHidingValue", obj, defaultHidingValue, False); - GET_BOOL_DS(schema, r, "isDefunct", obj, isDefunct, False); - GET_BOOL_DS(schema, r, "systemOnly", obj, systemOnly, False); + GET_BOOL_DS(schema, r, "showInAdvancedViewOnly", obj, showInAdvancedViewOnly, false); + GET_STRING_DS(schema, r, "adminDisplayName", mem_ctx, obj, adminDisplayName, false); + GET_STRING_DS(schema, r, "adminDescription", mem_ctx, obj, adminDescription, false); + GET_STRING_DS(schema, r, "classDisplayName", mem_ctx, obj, classDisplayName, false); + GET_BOOL_DS(schema, r, "defaultHidingValue", obj, defaultHidingValue, false); + GET_BOOL_DS(schema, r, "isDefunct", obj, isDefunct, false); + GET_BOOL_DS(schema, r, "systemOnly", obj, systemOnly, false); return WERR_OK; } diff --git a/source4/rpc_server/common/server_info.c b/source4/rpc_server/common/server_info.c index 677faccf36..c6f93f076a 100644 --- a/source4/rpc_server/common/server_info.c +++ b/source4/rpc_server/common/server_info.c @@ -123,7 +123,7 @@ _PUBLIC_ uint32_t dcesrv_common_get_server_type(TALLOC_CTX *mem_ctx, struct dces DEBUG(2,("Unable to open samdb in determining server announce flags\n")); } else { /* Determine if we are the pdc */ - BOOL is_pdc = samdb_is_pdc(samctx); + bool is_pdc = samdb_is_pdc(samctx); if (is_pdc) { default_server_announce |= SV_TYPE_DOMAIN_CTRL; } else { @@ -148,7 +148,7 @@ _PUBLIC_ uint32_t dcesrv_common_get_server_type(TALLOC_CTX *mem_ctx, struct dces #if 0 { /* TODO: announce us as print server when we are a print server */ - BOOL is_print_server = False; + bool is_print_server = false; if (is_print_server) { default_server_announce |= SV_TYPE_PRINTQ_SERVER; } @@ -210,8 +210,8 @@ _PUBLIC_ const char *dcesrv_common_get_userpath(TALLOC_CTX *mem_ctx, struct dces _PUBLIC_ bool dcesrv_common_validate_share_name(TALLOC_CTX *mem_ctx, const char *share_name) { if (strpbrk(share_name, INVALID_SHARE_NAME_CHARS)) { - return False; + return false; } - return True; + return true; } diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c index 02f38a15fd..4388c86f22 100644 --- a/source4/rpc_server/dcerpc_server.c +++ b/source4/rpc_server/dcerpc_server.c @@ -88,7 +88,7 @@ static struct dcesrv_connection_context *dcesrv_find_context(struct dcesrv_conne /* see if a uuid and if_version match to an interface */ -static BOOL interface_match(const struct dcesrv_interface *if1, +static bool interface_match(const struct dcesrv_interface *if1, const struct dcesrv_interface *if2) { return (if1->syntax_id.if_version == if2->syntax_id.if_version && @@ -113,7 +113,7 @@ static const struct dcesrv_interface *find_interface(const struct dcesrv_endpoin /* see if a uuid and if_version match to an interface */ -static BOOL interface_match_by_uuid(const struct dcesrv_interface *iface, +static bool interface_match_by_uuid(const struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version) { return (iface->syntax_id.if_version == if_version && @@ -160,7 +160,7 @@ _PUBLIC_ NTSTATUS dcesrv_interface_register(struct dcesrv_context *dce_ctx, struct dcesrv_endpoint *ep; struct dcesrv_if_list *ifl; struct dcerpc_binding *binding; - BOOL add_ep = False; + bool add_ep = false; NTSTATUS status; status = dcerpc_parse_binding(dce_ctx, ep_name, &binding); @@ -179,7 +179,7 @@ _PUBLIC_ NTSTATUS dcesrv_interface_register(struct dcesrv_context *dce_ctx, } ZERO_STRUCTP(ep); ep->ep_description = talloc_reference(ep, binding); - add_ep = True; + add_ep = true; /* add mgmt interface */ ifl = talloc(dce_ctx, struct dcesrv_if_list); @@ -338,7 +338,7 @@ NTSTATUS dcesrv_endpoint_connect(struct dcesrv_context *dce_ctx, p->event_ctx = event_ctx; p->msg_ctx = msg_ctx; p->server_id = server_id; - p->processing = False; + p->processing = false; p->state_flags = state_flags; ZERO_STRUCT(p->transport); @@ -983,15 +983,15 @@ _PUBLIC_ struct socket_address *dcesrv_connection_get_peer_addr(struct dcesrv_co /* work out if we have a full packet yet */ -static BOOL dce_full_packet(const DATA_BLOB *data) +static bool dce_full_packet(const DATA_BLOB *data) { if (data->length < DCERPC_FRAG_LEN_OFFSET+2) { - return False; + return false; } if (dcerpc_get_frag_length(data) > data->length) { - return False; + return false; } - return True; + return true; } /* diff --git a/source4/rpc_server/dcesrv_auth.c b/source4/rpc_server/dcesrv_auth.c index 0843a43761..911cfe4799 100644 --- a/source4/rpc_server/dcesrv_auth.c +++ b/source4/rpc_server/dcesrv_auth.c @@ -29,10 +29,10 @@ /* parse any auth information from a dcerpc bind request - return False if we can't handle the auth request for some + return false if we can't handle the auth request for some reason (in which case we send a bind_nak) */ -BOOL dcesrv_auth_bind(struct dcesrv_call_state *call) +bool dcesrv_auth_bind(struct dcesrv_call_state *call) { struct cli_credentials *server_credentials; struct ncacn_packet *pkt = &call->pkt; @@ -42,12 +42,12 @@ BOOL dcesrv_auth_bind(struct dcesrv_call_state *call) if (pkt->u.bind.auth_info.length == 0) { dce_conn->auth_state.auth_info = NULL; - return True; + return true; } dce_conn->auth_state.auth_info = talloc(dce_conn, struct dcerpc_auth); if (!dce_conn->auth_state.auth_info) { - return False; + return false; } status = ndr_pull_struct_blob(&pkt->u.bind.auth_info, @@ -55,20 +55,20 @@ BOOL dcesrv_auth_bind(struct dcesrv_call_state *call) dce_conn->auth_state.auth_info, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_auth); if (!NT_STATUS_IS_OK(status)) { - return False; + return false; } status = gensec_server_start(dce_conn, call->event_ctx, call->msg_ctx, &auth->gensec_security); if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("Failed to start GENSEC for DCERPC server: %s\n", nt_errstr(status))); - return False; + return false; } server_credentials = cli_credentials_init(call); if (!server_credentials) { DEBUG(1, ("Failed to init server credentials\n")); - return False; + return false; } cli_credentials_set_conf(server_credentials, global_loadparm); @@ -89,10 +89,10 @@ BOOL dcesrv_auth_bind(struct dcesrv_call_state *call) (int)auth->auth_info->auth_type, (int)auth->auth_info->auth_level, nt_errstr(status))); - return False; + return false; } - return True; + return true; } /* @@ -138,7 +138,7 @@ NTSTATUS dcesrv_auth_bind_ack(struct dcesrv_call_state *call, struct ncacn_packe /* process the final stage of a auth request */ -BOOL dcesrv_auth_auth3(struct dcesrv_call_state *call) +bool dcesrv_auth_auth3(struct dcesrv_call_state *call) { struct ncacn_packet *pkt = &call->pkt; struct dcesrv_connection *dce_conn = call->conn; @@ -148,7 +148,7 @@ BOOL dcesrv_auth_auth3(struct dcesrv_call_state *call) if (!dce_conn->auth_state.auth_info || !dce_conn->auth_state.gensec_security || pkt->u.auth3.auth_info.length == 0) { - return False; + return false; } status = ndr_pull_struct_blob(&pkt->u.auth3.auth_info, @@ -156,7 +156,7 @@ BOOL dcesrv_auth_auth3(struct dcesrv_call_state *call) dce_conn->auth_state.auth_info, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_auth); if (!NT_STATUS_IS_OK(status)) { - return False; + return false; } /* Pass the extra data we got from the client down to gensec for processing */ @@ -169,26 +169,26 @@ BOOL dcesrv_auth_auth3(struct dcesrv_call_state *call) &dce_conn->auth_state.session_info); if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("Failed to establish session_info: %s\n", nt_errstr(status))); - return False; + return false; } /* Now that we are authenticated, go back to the generic session key... */ dce_conn->auth_state.session_key = dcesrv_generic_session_key; - return True; + return true; } else { DEBUG(4, ("dcesrv_auth_auth3: failed to authenticate: %s\n", nt_errstr(status))); - return False; + return false; } - return True; + return true; } /* parse any auth information from a dcerpc alter request - return False if we can't handle the auth request for some + return false if we can't handle the auth request for some reason (in which case we send a bind_nak (is this true for here?)) */ -BOOL dcesrv_auth_alter(struct dcesrv_call_state *call) +bool dcesrv_auth_alter(struct dcesrv_call_state *call) { struct ncacn_packet *pkt = &call->pkt; struct dcesrv_connection *dce_conn = call->conn; @@ -196,17 +196,17 @@ BOOL dcesrv_auth_alter(struct dcesrv_call_state *call) /* on a pure interface change there is no auth blob */ if (pkt->u.alter.auth_info.length == 0) { - return True; + return true; } /* We can't work without an existing gensec state */ if (!dce_conn->auth_state.gensec_security) { - return False; + return false; } dce_conn->auth_state.auth_info = talloc(dce_conn, struct dcerpc_auth); if (!dce_conn->auth_state.auth_info) { - return False; + return false; } status = ndr_pull_struct_blob(&pkt->u.alter.auth_info, @@ -214,10 +214,10 @@ BOOL dcesrv_auth_alter(struct dcesrv_call_state *call) dce_conn->auth_state.auth_info, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_auth); if (!NT_STATUS_IS_OK(status)) { - return False; + return false; } - return True; + return true; } /* @@ -296,7 +296,7 @@ static NTSTATUS dcesrv_check_connect_verifier(DATA_BLOB *blob) /* check credentials on a request */ -BOOL dcesrv_auth_request(struct dcesrv_call_state *call, DATA_BLOB *full_packet) +bool dcesrv_auth_request(struct dcesrv_call_state *call, DATA_BLOB *full_packet) { struct ncacn_packet *pkt = &call->pkt; struct dcesrv_connection *dce_conn = call->conn; @@ -307,14 +307,14 @@ BOOL dcesrv_auth_request(struct dcesrv_call_state *call, DATA_BLOB *full_packet) if (!dce_conn->auth_state.auth_info || !dce_conn->auth_state.gensec_security) { - return True; + return true; } auth_blob.length = 8 + pkt->auth_length; /* check for a valid length */ if (pkt->u.request.stub_and_verifier.length < auth_blob.length) { - return False; + return false; } auth_blob.data = @@ -325,7 +325,7 @@ BOOL dcesrv_auth_request(struct dcesrv_call_state *call, DATA_BLOB *full_packet) /* pull the auth structure */ ndr = ndr_pull_init_blob(&auth_blob, call); if (!ndr) { - return False; + return false; } if (!(pkt->drep[0] & DCERPC_DREP_LE)) { @@ -335,7 +335,7 @@ BOOL dcesrv_auth_request(struct dcesrv_call_state *call, DATA_BLOB *full_packet) status = ndr_pull_dcerpc_auth(ndr, NDR_SCALARS|NDR_BUFFERS, &auth); if (!NT_STATUS_IS_OK(status)) { talloc_free(ndr); - return False; + return false; } /* check signature or unseal the packet */ @@ -375,7 +375,7 @@ BOOL dcesrv_auth_request(struct dcesrv_call_state *call, DATA_BLOB *full_packet) /* remove the indicated amount of padding */ if (pkt->u.request.stub_and_verifier.length < auth.auth_pad_length) { talloc_free(ndr); - return False; + return false; } pkt->u.request.stub_and_verifier.length -= auth.auth_pad_length; talloc_free(ndr); @@ -387,7 +387,7 @@ BOOL dcesrv_auth_request(struct dcesrv_call_state *call, DATA_BLOB *full_packet) /* push a signed or sealed dcerpc request packet into a blob */ -BOOL dcesrv_auth_response(struct dcesrv_call_state *call, +bool dcesrv_auth_response(struct dcesrv_call_state *call, DATA_BLOB *blob, struct ncacn_packet *pkt) { struct dcesrv_connection *dce_conn = call->conn; @@ -404,7 +404,7 @@ BOOL dcesrv_auth_response(struct dcesrv_call_state *call, ndr = ndr_push_init_ctx(call); if (!ndr) { - return False; + return false; } if (!(pkt->drep[0] & DCERPC_DREP_LE)) { @@ -413,7 +413,7 @@ BOOL dcesrv_auth_response(struct dcesrv_call_state *call, status = ndr_push_ncacn_packet(ndr, NDR_SCALARS|NDR_BUFFERS, pkt); if (!NT_STATUS_IS_OK(status)) { - return False; + return false; } /* pad to 16 byte multiple, match win2k3 */ @@ -426,7 +426,7 @@ BOOL dcesrv_auth_response(struct dcesrv_call_state *call, status = dcesrv_connect_verifier(call, &dce_conn->auth_state.auth_info->credentials); if (!NT_STATUS_IS_OK(status)) { - return False; + return false; } } else { @@ -444,7 +444,7 @@ BOOL dcesrv_auth_response(struct dcesrv_call_state *call, status = ndr_push_dcerpc_auth(ndr, NDR_SCALARS|NDR_BUFFERS, dce_conn->auth_state.auth_info); if (!NT_STATUS_IS_OK(status)) { - return False; + return false; } /* extract the whole packet as a blob */ @@ -519,8 +519,8 @@ BOOL dcesrv_auth_response(struct dcesrv_call_state *call, data_blob_free(&dce_conn->auth_state.auth_info->credentials); if (!NT_STATUS_IS_OK(status)) { - return False; + return false; } - return True; + return true; } diff --git a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c index 0c22e856f2..d8b361ca27 100644 --- a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c +++ b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c @@ -589,7 +589,7 @@ static WERROR dcesrv_drsuapi_DsGetDomainControllerInfo_1(struct drsuapi_bind_sta return WERR_GENERAL_FAILURE; } if (res_domain->count == 1) { - ctr1->array[i].is_pdc = True; + ctr1->array[i].is_pdc = true; } } } @@ -603,7 +603,7 @@ static WERROR dcesrv_drsuapi_DsGetDomainControllerInfo_1(struct drsuapi_bind_sta ctr1->array[i].server_dn = ldb_dn_get_linearized(res->msgs[i]->dn); - ctr1->array[i].is_enabled = True; + ctr1->array[i].is_enabled = true; } break; @@ -681,7 +681,7 @@ static WERROR dcesrv_drsuapi_DsGetDomainControllerInfo_1(struct drsuapi_bind_sta LDB_SCOPE_BASE, attrs_none, "fSMORoleOwner=%s", ldb_dn_get_linearized(ntds_dn)); if (ret == LDB_SUCCESS && res_domain->count == 1) { - ctr2->array[i].is_pdc = True; + ctr2->array[i].is_pdc = true; } if ((ret != LDB_SUCCESS) && (ret != LDB_ERR_NO_SUCH_OBJECT)) { DEBUG(5, ("warning: searching for domain DN %s failed: %s\n", @@ -700,7 +700,7 @@ static WERROR dcesrv_drsuapi_DsGetDomainControllerInfo_1(struct drsuapi_bind_sta ctr2->array[i].server_guid = samdb_result_guid(res->msgs[i], "objectGUID"); - ctr2->array[i].is_enabled = True; + ctr2->array[i].is_enabled = true; } break; diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c index a580487b6f..25d6f8c8f7 100644 --- a/source4/rpc_server/lsa/dcesrv_lsa.c +++ b/source4/rpc_server/lsa/dcesrv_lsa.c @@ -44,7 +44,7 @@ struct lsa_secret_state { uint32_t access_mask; struct ldb_dn *secret_dn; struct ldb_context *sam_ldb; - BOOL global; + bool global; }; /* @@ -1674,7 +1674,7 @@ static NTSTATUS dcesrv_lsa_CreateSecret(struct dcesrv_call_state *dce_call, TALL const char *name2; name = &r->in.name.string[2]; secret_state->sam_ldb = talloc_reference(secret_state, policy_state->sam_ldb); - secret_state->global = True; + secret_state->global = true; if (strlen(name) < 1) { return NT_STATUS_INVALID_PARAMETER; @@ -1704,7 +1704,7 @@ static NTSTATUS dcesrv_lsa_CreateSecret(struct dcesrv_call_state *dce_call, TALL samdb_msg_add_string(secret_state->sam_ldb, mem_ctx, msg, "cn", name2); } else { - secret_state->global = False; + secret_state->global = false; name = r->in.name.string; if (strlen(name) < 1) { @@ -1807,7 +1807,7 @@ static NTSTATUS dcesrv_lsa_OpenSecret(struct dcesrv_call_state *dce_call, TALLOC if (strncmp("G$", r->in.name.string, 2) == 0) { name = &r->in.name.string[2]; secret_state->sam_ldb = talloc_reference(secret_state, policy_state->sam_ldb); - secret_state->global = True; + secret_state->global = true; if (strlen(name) < 1) { return NT_STATUS_INVALID_PARAMETER; @@ -1831,7 +1831,7 @@ static NTSTATUS dcesrv_lsa_OpenSecret(struct dcesrv_call_state *dce_call, TALLOC } else { secret_state->sam_ldb = talloc_reference(secret_state, secrets_db_connect(mem_ctx)); - secret_state->global = False; + secret_state->global = false; name = r->in.name.string; if (strlen(name) < 1) { return NT_STATUS_INVALID_PARAMETER; diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index 2d551da4d1..45277dc3ed 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -313,7 +313,7 @@ static NTSTATUS dcesrv_netr_ServerPasswordSet(struct dcesrv_call_state *dce_call creds->sid, NULL, /* Don't have plaintext */ NULL, &r->in.new_password, - False, /* This is not considered a password change */ + false, /* This is not considered a password change */ NULL, NULL); return nt_status; } @@ -330,7 +330,7 @@ static NTSTATUS dcesrv_netr_ServerPasswordSet2(struct dcesrv_call_state *dce_cal NTSTATUS nt_status; char new_pass[512]; uint32_t new_pass_len; - BOOL ret; + bool ret; struct samr_CryptPassword password_buf; @@ -360,7 +360,7 @@ static NTSTATUS dcesrv_netr_ServerPasswordSet2(struct dcesrv_call_state *dce_cal creds->sid, new_pass, /* we have plaintext */ NULL, NULL, - False, /* This is not considered a password change */ + false, /* This is not considered a password change */ NULL, NULL); return nt_status; } @@ -410,7 +410,7 @@ static NTSTATUS dcesrv_netr_LogonSamLogon_base(struct dcesrv_call_state *dce_cal NT_STATUS_HAVE_NO_MEMORY(user_info); user_info->flags = 0; - user_info->mapped_state = False; + user_info->mapped_state = false; user_info->remote_host = NULL; switch (r->in.logon_level) { @@ -836,7 +836,7 @@ static NTSTATUS fill_domain_trust_info(TALLOC_CTX *mem_ctx, struct ldb_message *res, struct ldb_message *ref_res, struct netr_DomainTrustInfo *info, - BOOL is_local) + bool is_local) { ZERO_STRUCTP(info); @@ -926,15 +926,15 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal info1->num_trusts); NT_STATUS_HAVE_NO_MEMORY(info1->trusts); - status = fill_domain_trust_info(mem_ctx, res1[0], ref_res[0], &info1->domaininfo, True); + status = fill_domain_trust_info(mem_ctx, res1[0], ref_res[0], &info1->domaininfo, true); NT_STATUS_NOT_OK_RETURN(status); for (i=0;i<ret2;i++) { - status = fill_domain_trust_info(mem_ctx, res2[i], NULL, &info1->trusts[i], False); + status = fill_domain_trust_info(mem_ctx, res2[i], NULL, &info1->trusts[i], false); NT_STATUS_NOT_OK_RETURN(status); } - status = fill_domain_trust_info(mem_ctx, res1[0], ref_res[0], &info1->trusts[i], True); + status = fill_domain_trust_info(mem_ctx, res1[0], ref_res[0], &info1->trusts[i], true); NT_STATUS_NOT_OK_RETURN(status); r->out.info.info1 = info1; diff --git a/source4/rpc_server/remote/dcesrv_remote.c b/source4/rpc_server/remote/dcesrv_remote.c index 40eab55c92..f009323ae2 100644 --- a/source4/rpc_server/remote/dcesrv_remote.c +++ b/source4/rpc_server/remote/dcesrv_remote.c @@ -43,7 +43,7 @@ static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct const char *binding = lp_parm_string(global_loadparm, NULL, "dcerpc_remote", "binding"); const char *user, *pass, *domain; struct cli_credentials *credentials; - BOOL machine_account; + bool machine_account; machine_account = lp_parm_bool(global_loadparm, NULL, "dcerpc_remote", "use_machine_account", false); @@ -253,7 +253,7 @@ static NTSTATUS remote_op_init_server(struct dcesrv_context *dce_ctx, const stru return NT_STATUS_OK; } -static BOOL remote_fill_interface(struct dcesrv_interface *iface, const struct ndr_interface_table *if_tabl) +static bool remote_fill_interface(struct dcesrv_interface *iface, const struct ndr_interface_table *if_tabl) { iface->name = if_tabl->name; iface->syntax_id = if_tabl->syntax_id; @@ -268,10 +268,10 @@ static BOOL remote_fill_interface(struct dcesrv_interface *iface, const struct n iface->private = if_tabl; - return True; + return true; } -static BOOL remote_op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version) +static bool remote_op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version) { const struct ndr_interface_list *l; @@ -282,17 +282,17 @@ static BOOL remote_op_interface_by_uuid(struct dcesrv_interface *iface, const st } } - return False; + return false; } -static BOOL remote_op_interface_by_name(struct dcesrv_interface *iface, const char *name) +static bool remote_op_interface_by_name(struct dcesrv_interface *iface, const char *name) { const struct ndr_interface_table *tbl = ndr_table_by_name(name); if (tbl) return remote_fill_interface(iface, tbl); - return False; + return false; } NTSTATUS dcerpc_server_remote_init(void) diff --git a/source4/rpc_server/samr/samr_password.c b/source4/rpc_server/samr/samr_password.c index e3cb70ad17..28816c03f8 100644 --- a/source4/rpc_server/samr/samr_password.c +++ b/source4/rpc_server/samr/samr_password.c @@ -143,7 +143,7 @@ NTSTATUS dcesrv_samr_ChangePasswordUser(struct dcesrv_call_state *dce_call, TALL status = samdb_set_password(sam_ctx, mem_ctx, a_state->account_dn, a_state->domain_state->domain_dn, msg, NULL, &new_lmPwdHash, &new_ntPwdHash, - True, /* this is a user password change */ + true, /* this is a user password change */ NULL, NULL); if (!NT_STATUS_IS_OK(status)) { @@ -278,7 +278,7 @@ NTSTATUS dcesrv_samr_OemChangePasswordUser2(struct dcesrv_call_state *dce_call, user_dn, NULL, mod, new_pass, NULL, NULL, - True, /* this is a user password change */ + true, /* this is a user password change */ NULL, NULL); if (!NT_STATUS_IS_OK(status)) { @@ -431,7 +431,7 @@ NTSTATUS dcesrv_samr_ChangePasswordUser3(struct dcesrv_call_state *dce_call, user_dn, NULL, mod, new_pass, NULL, NULL, - True, /* this is a user password change */ + true, /* this is a user password change */ &reason, &dominfo); if (!NT_STATUS_IS_OK(status)) { @@ -539,7 +539,7 @@ NTSTATUS samr_set_password(struct dcesrv_call_state *dce_call, account_dn, domain_dn, msg, new_pass, NULL, NULL, - False, /* This is a password set, not change */ + false, /* This is a password set, not change */ NULL, NULL); } @@ -592,7 +592,7 @@ NTSTATUS samr_set_password_ex(struct dcesrv_call_state *dce_call, account_dn, domain_dn, msg, new_pass, NULL, NULL, - False, /* This is a password set, not change */ + false, /* This is a password set, not change */ NULL, NULL); } diff --git a/source4/rpc_server/service_rpc.c b/source4/rpc_server/service_rpc.c index 802c8b6df8..04dd5a8ee9 100644 --- a/source4/rpc_server/service_rpc.c +++ b/source4/rpc_server/service_rpc.c @@ -173,9 +173,9 @@ static void dcesrv_sock_recv(struct stream_connection *conn, uint16_t flags) tmp_blob.length = nread; - dce_conn->processing = True; + dce_conn->processing = true; status = dcesrv_input(dce_conn, &tmp_blob); - dce_conn->processing = False; + dce_conn->processing = false; talloc_free(tmp_blob.data); EVENT_FD_READABLE(conn->event.fde); diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c index 3d7a5319ca..09409b1514 100644 --- a/source4/rpc_server/spoolss/dcesrv_spoolss.c +++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c @@ -149,7 +149,7 @@ static WERROR dcesrv_spoolss_check_server_name(struct dcesrv_call_state *dce_cal TALLOC_CTX *mem_ctx, const char *server_name) { - BOOL ret; + bool ret; struct socket_address *myaddr; const char **aliases; int i; |