summaryrefslogtreecommitdiffstats
path: root/source/libads
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-10-18 17:40:25 -0700
committerJeremy Allison <jra@samba.org>2007-10-18 17:40:25 -0700
commitf35a266b3cbb3e5fa6a86be60f34fe340a3ca71f (patch)
tree1bc44df77ea5bb85a1e8bff698a583f3a3f43fc5 /source/libads
parentea3173a9457f9095a70d401abfd1af8c913211a0 (diff)
downloadsamba-f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f.tar.gz
samba-f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f.tar.xz
samba-f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f.zip
RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
Diffstat (limited to 'source/libads')
-rw-r--r--source/libads/ads_struct.c2
-rw-r--r--source/libads/authdata.c38
-rw-r--r--source/libads/cldap.c2
-rw-r--r--source/libads/dns.c18
-rw-r--r--source/libads/kerberos.c24
-rw-r--r--source/libads/kerberos_keytab.c2
-rw-r--r--source/libads/kerberos_verify.c14
-rw-r--r--source/libads/krb5_setpw.c6
-rw-r--r--source/libads/ldap.c42
-rw-r--r--source/libads/ldap_printer.c12
-rw-r--r--source/libads/ldap_utils.c4
-rw-r--r--source/libads/sasl.c4
12 files changed, 84 insertions, 84 deletions
diff --git a/source/libads/ads_struct.c b/source/libads/ads_struct.c
index aac57d41fe2..041878916ec 100644
--- a/source/libads/ads_struct.c
+++ b/source/libads/ads_struct.c
@@ -145,7 +145,7 @@ ADS_STRUCT *ads_init(const char *realm,
void ads_destroy(ADS_STRUCT **ads)
{
if (ads && *ads) {
- BOOL is_mine;
+ bool is_mine;
is_mine = (*ads)->is_mine;
#if HAVE_LDAP
diff --git a/source/libads/authdata.c b/source/libads/authdata.c
index bbcd2db56ae..db58cf04006 100644
--- a/source/libads/authdata.c
+++ b/source/libads/authdata.c
@@ -26,7 +26,7 @@
#ifdef HAVE_KRB5
-static BOOL pac_io_logon_name(const char *desc, PAC_LOGON_NAME *logon_name,
+static bool pac_io_logon_name(const char *desc, PAC_LOGON_NAME *logon_name,
prs_struct *ps, int depth)
{
if (NULL == logon_name)
@@ -60,7 +60,7 @@ static BOOL pac_io_logon_name(const char *desc, PAC_LOGON_NAME *logon_name,
}
#if 0 /* Unused (handled now in net_io_user_info3()) - Guenther */
-static BOOL pac_io_krb_sids(const char *desc, KRB_SID_AND_ATTRS *sid_and_attr,
+static bool pac_io_krb_sids(const char *desc, KRB_SID_AND_ATTRS *sid_and_attr,
prs_struct *ps, int depth)
{
if (NULL == sid_and_attr)
@@ -84,7 +84,7 @@ static BOOL pac_io_krb_sids(const char *desc, KRB_SID_AND_ATTRS *sid_and_attr,
}
-static BOOL pac_io_krb_attrs(const char *desc, KRB_SID_AND_ATTRS *sid_and_attr,
+static bool pac_io_krb_attrs(const char *desc, KRB_SID_AND_ATTRS *sid_and_attr,
prs_struct *ps, int depth)
{
if (NULL == sid_and_attr)
@@ -101,7 +101,7 @@ static BOOL pac_io_krb_attrs(const char *desc, KRB_SID_AND_ATTRS *sid_and_attr,
return True;
}
-static BOOL pac_io_krb_sid_and_attr_array(const char *desc,
+static bool pac_io_krb_sid_and_attr_array(const char *desc,
KRB_SID_AND_ATTR_ARRAY *array,
uint32 num,
prs_struct *ps, int depth)
@@ -150,7 +150,7 @@ static BOOL pac_io_krb_sid_and_attr_array(const char *desc,
}
#endif
-static BOOL pac_io_group_membership(const char *desc,
+static bool pac_io_group_membership(const char *desc,
GROUP_MEMBERSHIP *membership,
prs_struct *ps, int depth)
{
@@ -169,7 +169,7 @@ static BOOL pac_io_group_membership(const char *desc,
}
-static BOOL pac_io_group_membership_array(const char *desc,
+static bool pac_io_group_membership_array(const char *desc,
GROUP_MEMBERSHIP_ARRAY *array,
uint32 num,
prs_struct *ps, int depth)
@@ -211,7 +211,7 @@ static BOOL pac_io_group_membership_array(const char *desc,
}
#if 0 /* Unused, replaced using an expanded net_io_user_info3() now - Guenther */
-static BOOL pac_io_pac_logon_info(const char *desc, PAC_LOGON_INFO *info,
+static bool pac_io_pac_logon_info(const char *desc, PAC_LOGON_INFO *info,
prs_struct *ps, int depth)
{
uint32 garbage, i;
@@ -395,11 +395,11 @@ static BOOL pac_io_pac_logon_info(const char *desc, PAC_LOGON_INFO *info,
}
#endif
-static BOOL pac_io_pac_logon_info(const char *desc, PAC_LOGON_INFO *info,
+static bool pac_io_pac_logon_info(const char *desc, PAC_LOGON_INFO *info,
prs_struct *ps, int depth)
{
uint32 garbage;
- BOOL kerb_validation_info = True;
+ bool kerb_validation_info = True;
if (NULL == info)
return False;
@@ -446,7 +446,7 @@ static BOOL pac_io_pac_logon_info(const char *desc, PAC_LOGON_INFO *info,
-static BOOL pac_io_pac_signature_data(const char *desc,
+static bool pac_io_pac_signature_data(const char *desc,
PAC_SIGNATURE_DATA *data, uint32 length,
prs_struct *ps, int depth)
{
@@ -487,7 +487,7 @@ static BOOL pac_io_pac_signature_data(const char *desc,
return True;
}
-static BOOL pac_io_pac_info_hdr_ctr(const char *desc, PAC_BUFFER *hdr,
+static bool pac_io_pac_info_hdr_ctr(const char *desc, PAC_BUFFER *hdr,
prs_struct *ps, int depth)
{
if (NULL == hdr)
@@ -581,7 +581,7 @@ static BOOL pac_io_pac_info_hdr_ctr(const char *desc, PAC_BUFFER *hdr,
return True;
}
-static BOOL pac_io_pac_info_hdr(const char *desc, PAC_BUFFER *hdr,
+static bool pac_io_pac_info_hdr(const char *desc, PAC_BUFFER *hdr,
prs_struct *ps, int depth)
{
if (NULL == hdr)
@@ -604,7 +604,7 @@ static BOOL pac_io_pac_info_hdr(const char *desc, PAC_BUFFER *hdr,
return True;
}
-static BOOL pac_io_pac_data(const char *desc, PAC_DATA *data,
+static bool pac_io_pac_data(const char *desc, PAC_DATA *data,
prs_struct *ps, int depth)
{
int i;
@@ -965,8 +965,8 @@ NTSTATUS kerberos_return_pac(TALLOC_CTX *mem_ctx,
time_t *expire_time,
time_t *renew_till_time,
const char *cache_name,
- BOOL request_pac,
- BOOL add_netbios_addr,
+ bool request_pac,
+ bool add_netbios_addr,
time_t renewable_time,
PAC_DATA **pac_ret)
{
@@ -1104,8 +1104,8 @@ static NTSTATUS kerberos_return_pac_logon_info(TALLOC_CTX *mem_ctx,
time_t *expire_time,
time_t *renew_till_time,
const char *cache_name,
- BOOL request_pac,
- BOOL add_netbios_addr,
+ bool request_pac,
+ bool add_netbios_addr,
time_t renewable_time,
PAC_LOGON_INFO **logon_info)
{
@@ -1154,8 +1154,8 @@ NTSTATUS kerberos_return_info3_from_pac(TALLOC_CTX *mem_ctx,
time_t *expire_time,
time_t *renew_till_time,
const char *cache_name,
- BOOL request_pac,
- BOOL add_netbios_addr,
+ bool request_pac,
+ bool add_netbios_addr,
time_t renewable_time,
NET_USER_INFO_3 **info3)
{
diff --git a/source/libads/cldap.c b/source/libads/cldap.c
index de0e2e71e4b..39e736f28ae 100644
--- a/source/libads/cldap.c
+++ b/source/libads/cldap.c
@@ -289,7 +289,7 @@ static int recv_cldap_netlogon(int sock, struct cldap_netlogon_reply *reply)
do a cldap netlogon query. Always 389/udp
*******************************************************************/
-BOOL ads_cldap_netlogon(const char *server, const char *realm, struct cldap_netlogon_reply *reply)
+bool ads_cldap_netlogon(const char *server, const char *realm, struct cldap_netlogon_reply *reply)
{
int sock;
int ret;
diff --git a/source/libads/dns.c b/source/libads/dns.c
index 02baec78fb7..7959e910a8d 100644
--- a/source/libads/dns.c
+++ b/source/libads/dns.c
@@ -65,7 +65,7 @@
/*********************************************************************
*********************************************************************/
-static BOOL ads_dns_parse_query( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
+static bool ads_dns_parse_query( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
uint8 **ptr, struct dns_query *q )
{
uint8 *p = *ptr;
@@ -103,7 +103,7 @@ static BOOL ads_dns_parse_query( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
/*********************************************************************
*********************************************************************/
-static BOOL ads_dns_parse_rr( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
+static bool ads_dns_parse_rr( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
uint8 **ptr, struct dns_rr *rr )
{
uint8 *p = *ptr;
@@ -157,7 +157,7 @@ static BOOL ads_dns_parse_rr( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
/*********************************************************************
*********************************************************************/
-static BOOL ads_dns_parse_rr_srv( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
+static bool ads_dns_parse_rr_srv( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
uint8 **ptr, struct dns_rr_srv *srv )
{
struct dns_rr rr;
@@ -202,7 +202,7 @@ static BOOL ads_dns_parse_rr_srv( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
/*********************************************************************
*********************************************************************/
-static BOOL ads_dns_parse_rr_ns( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
+static bool ads_dns_parse_rr_ns( TALLOC_CTX *ctx, uint8 *start, uint8 *end,
uint8 **ptr, struct dns_rr_ns *nsrec )
{
struct dns_rr rr;
@@ -638,10 +638,10 @@ static char *sitename_key(const char *realm)
We store indefinately as every new CLDAP query will re-write this.
****************************************************************************/
-BOOL sitename_store(const char *realm, const char *sitename)
+bool sitename_store(const char *realm, const char *sitename)
{
time_t expire;
- BOOL ret = False;
+ bool ret = False;
char *key;
if (!gencache_init()) {
@@ -681,7 +681,7 @@ char *sitename_fetch(const char *realm)
{
char *sitename = NULL;
time_t timeout;
- BOOL ret = False;
+ bool ret = False;
const char *query_realm;
char *key;
@@ -713,9 +713,9 @@ char *sitename_fetch(const char *realm)
Did the sitename change ?
****************************************************************************/
-BOOL stored_sitename_changed(const char *realm, const char *sitename)
+bool stored_sitename_changed(const char *realm, const char *sitename)
{
- BOOL ret = False;
+ bool ret = False;
char *new_sitename;
diff --git a/source/libads/kerberos.c b/source/libads/kerberos.c
index 62a4f84e108..281ca2fd683 100644
--- a/source/libads/kerberos.c
+++ b/source/libads/kerberos.c
@@ -54,11 +54,11 @@ kerb_prompter(krb5_context ctx, void *data,
return 0;
}
-static BOOL smb_krb5_err_io_nstatus(TALLOC_CTX *mem_ctx,
+static bool smb_krb5_err_io_nstatus(TALLOC_CTX *mem_ctx,
DATA_BLOB *edata_blob,
KRB5_EDATA_NTSTATUS *edata)
{
- BOOL ret = False;
+ bool ret = False;
prs_struct ps;
if (!mem_ctx || !edata_blob || !edata)
@@ -88,7 +88,7 @@ static BOOL smb_krb5_err_io_nstatus(TALLOC_CTX *mem_ctx,
return ret;
}
- static BOOL smb_krb5_get_ntstatus_from_krb5_error(krb5_error *error,
+ static bool smb_krb5_get_ntstatus_from_krb5_error(krb5_error *error,
NTSTATUS *nt_status)
{
DATA_BLOB edata;
@@ -137,11 +137,11 @@ static BOOL smb_krb5_err_io_nstatus(TALLOC_CTX *mem_ctx,
return True;
}
- static BOOL smb_krb5_get_ntstatus_from_krb5_error_init_creds_opt(krb5_context ctx,
+ static bool smb_krb5_get_ntstatus_from_krb5_error_init_creds_opt(krb5_context ctx,
krb5_get_init_creds_opt *opt,
NTSTATUS *nt_status)
{
- BOOL ret = False;
+ bool ret = False;
krb5_error *error = NULL;
#ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_GET_ERROR
@@ -186,8 +186,8 @@ int kerberos_kinit_password_ext(const char *principal,
time_t *expire_time,
time_t *renew_till_time,
const char *cache_name,
- BOOL request_pac,
- BOOL add_netbios_addr,
+ bool request_pac,
+ bool add_netbios_addr,
time_t renewable_time,
NTSTATUS *ntstatus)
{
@@ -443,10 +443,10 @@ static char* des_salt_key( void )
/************************************************************************
************************************************************************/
-BOOL kerberos_secrets_store_des_salt( const char* salt )
+bool kerberos_secrets_store_des_salt( const char* salt )
{
char* key;
- BOOL ret;
+ bool ret;
if ( (key = des_salt_key()) == NULL ) {
DEBUG(0,("kerberos_secrets_store_des_salt: failed to generate key!\n"));
@@ -535,12 +535,12 @@ krb5_principal kerberos_fetch_salt_princ_for_host_princ(krb5_context context,
Setting principal to NULL deletes this entry.
************************************************************************/
-BOOL kerberos_secrets_store_salting_principal(const char *service,
+bool kerberos_secrets_store_salting_principal(const char *service,
int enctype,
const char *principal)
{
char *key = NULL;
- BOOL ret = False;
+ bool ret = False;
krb5_context context = NULL;
krb5_principal princ = NULL;
char *princ_s = NULL;
@@ -700,7 +700,7 @@ static char *get_kdc_ip_string(char *mem_ctx, const char *realm, const char *sit
run as root or will fail (which is a good thing :-).
************************************************************************/
-BOOL create_local_private_krb5_conf_for_domain(const char *realm, const char *domain,
+bool create_local_private_krb5_conf_for_domain(const char *realm, const char *domain,
const char *sitename, struct in_addr ip)
{
char *dname = talloc_asprintf(NULL, "%s/smb_krb5", lp_lockdir());
diff --git a/source/libads/kerberos_keytab.c b/source/libads/kerberos_keytab.c
index 342e79ddd8f..d0161ada011 100644
--- a/source/libads/kerberos_keytab.c
+++ b/source/libads/kerberos_keytab.c
@@ -57,7 +57,7 @@ static int smb_krb5_kt_add_entry( krb5_context context, krb5_keytab keytab,
if (ret != KRB5_KT_END && ret != ENOENT ) {
DEBUG(3,("smb_krb5_kt_add_entry: Will try to delete old keytab entries\n"));
while(!krb5_kt_next_entry(context, keytab, &kt_entry, &cursor)) {
- BOOL compare_name_ok = False;
+ bool compare_name_ok = False;
ret = smb_krb5_unparse_name(context, kt_entry.principal, &ktprinc);
if (ret) {
diff --git a/source/libads/kerberos_verify.c b/source/libads/kerberos_verify.c
index 0edb5327d33..7040093e901 100644
--- a/source/libads/kerberos_verify.c
+++ b/source/libads/kerberos_verify.c
@@ -37,7 +37,7 @@ const krb5_data *krb5_princ_component(krb5_context, krb5_principal, int );
ads_keytab_add_entry function for details.
***********************************************************************************/
-static BOOL ads_keytab_verify_ticket(krb5_context context,
+static bool ads_keytab_verify_ticket(krb5_context context,
krb5_auth_context auth_context,
const DATA_BLOB *ticket,
krb5_ticket **pp_tkt,
@@ -45,7 +45,7 @@ static BOOL ads_keytab_verify_ticket(krb5_context context,
krb5_error_code *perr)
{
krb5_error_code ret = 0;
- BOOL auth_ok = False;
+ bool auth_ok = False;
krb5_keytab keytab = NULL;
krb5_kt_cursor kt_cursor;
krb5_keytab_entry kt_entry;
@@ -210,7 +210,7 @@ static krb5_error_code ads_secrets_verify_ticket(krb5_context context,
krb5_error_code *perr)
{
krb5_error_code ret = 0;
- BOOL auth_ok = False;
+ bool auth_ok = False;
char *password_s = NULL;
krb5_data password;
krb5_enctype enctypes[] = {
@@ -312,7 +312,7 @@ NTSTATUS ads_verify_ticket(TALLOC_CTX *mem_ctx,
PAC_DATA **pac_data,
DATA_BLOB *ap_rep,
DATA_BLOB *session_key,
- BOOL use_replay_cache)
+ bool use_replay_cache)
{
NTSTATUS sret = NT_STATUS_LOGON_FAILURE;
NTSTATUS pac_ret;
@@ -329,9 +329,9 @@ NTSTATUS ads_verify_ticket(TALLOC_CTX *mem_ctx,
krb5_principal host_princ = NULL;
krb5_const_principal client_principal = NULL;
char *host_princ_s = NULL;
- BOOL auth_ok = False;
- BOOL got_replay_mutex = False;
- BOOL got_auth_data = False;
+ bool auth_ok = False;
+ bool got_replay_mutex = False;
+ bool got_auth_data = False;
ZERO_STRUCT(packet);
ZERO_STRUCT(auth_data);
diff --git a/source/libads/krb5_setpw.c b/source/libads/krb5_setpw.c
index 24220685f34..73dffe7c1bd 100644
--- a/source/libads/krb5_setpw.c
+++ b/source/libads/krb5_setpw.c
@@ -136,7 +136,7 @@ static krb5_error_code build_kpasswd_request(uint16 pversion,
krb5_data *ap_req,
const char *princ,
const char *passwd,
- BOOL use_tcp,
+ bool use_tcp,
krb5_data *packet)
{
krb5_error_code ret;
@@ -267,7 +267,7 @@ static krb5_error_code setpw_result_code_string(krb5_context context,
}
}
static krb5_error_code parse_setpw_reply(krb5_context context,
- BOOL use_tcp,
+ bool use_tcp,
krb5_auth_context auth_context,
krb5_data *packet)
{
@@ -404,7 +404,7 @@ static ADS_STATUS do_krb5_kpasswd_request(krb5_context context,
struct sockaddr remote_addr, local_addr;
struct in_addr *addr = interpret_addr2(kdc_host);
krb5_address local_kaddr, remote_kaddr;
- BOOL use_tcp = False;
+ bool use_tcp = False;
ret = krb5_mk_req_extended(context, &auth_context, AP_OPTS_USE_SUBKEY,
diff --git a/source/libads/ldap.c b/source/libads/ldap.c
index b1a86ad3d30..f85d3cd7b0c 100644
--- a/source/libads/ldap.c
+++ b/source/libads/ldap.c
@@ -118,7 +118,7 @@ static int ldap_search_with_timeout(LDAP *ld,
Do client and server sitename match ?
**********************************************/
-BOOL ads_sitename_match(ADS_STRUCT *ads)
+bool ads_sitename_match(ADS_STRUCT *ads)
{
if (ads->config.server_site_name == NULL &&
ads->config.client_site_name == NULL ) {
@@ -142,7 +142,7 @@ BOOL ads_sitename_match(ADS_STRUCT *ads)
Is this the closest DC ?
**********************************************/
-BOOL ads_closest_dc(ADS_STRUCT *ads)
+bool ads_closest_dc(ADS_STRUCT *ads)
{
if (ads->config.flags & ADS_CLOSEST) {
DEBUG(10,("ads_closest_dc: ADS_CLOSEST flag set\n"));
@@ -166,7 +166,7 @@ BOOL ads_closest_dc(ADS_STRUCT *ads)
try a connection to a given ldap server, returning True and setting the servers IP
in the ads struct if successful
*/
-BOOL ads_try_connect(ADS_STRUCT *ads, const char *server )
+bool ads_try_connect(ADS_STRUCT *ads, const char *server )
{
char *srv;
struct cldap_netlogon_reply cldap_reply;
@@ -246,8 +246,8 @@ static NTSTATUS ads_find_dc(ADS_STRUCT *ads)
int count, i=0;
struct ip_service *ip_list;
pstring realm;
- BOOL got_realm = False;
- BOOL use_own_domain = False;
+ bool got_realm = False;
+ bool use_own_domain = False;
char *sitename;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
@@ -864,7 +864,7 @@ static ADS_STATUS ads_do_paged_search(ADS_STRUCT *ads, const char *bind_path,
**/
ADS_STATUS ads_do_search_all_fn(ADS_STRUCT *ads, const char *bind_path,
int scope, const char *expr, const char **attrs,
- BOOL(*fn)(ADS_STRUCT *, char *, void **, void *),
+ bool (*fn)(ADS_STRUCT *, char *, void **, void *),
void *data_area)
{
struct berval *cookie = NULL;
@@ -1738,7 +1738,7 @@ done:
**/
ADS_STATUS ads_move_machine_acct(ADS_STRUCT *ads, const char *machine_name,
- const char *org_unit, BOOL *moved)
+ const char *org_unit, bool *moved)
{
ADS_STATUS rc;
int ldap_status;
@@ -1747,7 +1747,7 @@ ADS_STATUS ads_move_machine_acct(ADS_STRUCT *ads, const char *machine_name,
char *computer_dn = NULL;
char *parent_dn;
char *computer_rdn = NULL;
- BOOL need_move = False;
+ bool need_move = False;
if (asprintf(&filter, "(samAccountName=%s$)", machine_name) == -1) {
rc = ADS_ERROR(LDAP_NO_MEMORY);
@@ -1886,11 +1886,11 @@ static void dump_string(const char *field, char **values)
used for debugging
*/
-static BOOL ads_dump_field(ADS_STRUCT *ads, char *field, void **values, void *data_area)
+static bool ads_dump_field(ADS_STRUCT *ads, char *field, void **values, void *data_area)
{
const struct {
const char *name;
- BOOL string;
+ bool string;
void (*handler)(ADS_STRUCT *, const char *, struct berval **);
} handlers[] = {
{"objectGUID", False, dump_guid},
@@ -1952,7 +1952,7 @@ static BOOL ads_dump_field(ADS_STRUCT *ads, char *field, void **values, void *da
* @param data_area user-defined area to pass to function
**/
void ads_process_results(ADS_STRUCT *ads, LDAPMessage *res,
- BOOL(*fn)(ADS_STRUCT *, char *, void **, void *),
+ bool (*fn)(ADS_STRUCT *, char *, void **, void *),
void *data_area)
{
LDAPMessage *msg;
@@ -1974,7 +1974,7 @@ static BOOL ads_dump_field(ADS_STRUCT *ads, char *field, void **values, void *da
struct berval **ber_vals;
char **str_vals, **utf8_vals;
char *field;
- BOOL string;
+ bool string;
pull_utf8_talloc(ctx, &field, utf8_field);
string = fn(ads, field, NULL, data_area);
@@ -2126,7 +2126,7 @@ int ads_count_replies(ADS_STRUCT *ads, void *res)
char **current_strings,
const char **next_attribute,
size_t *num_strings,
- BOOL *more_strings)
+ bool *more_strings)
{
char *attr;
char *expected_range_attrib, *range_attr;
@@ -2243,7 +2243,7 @@ int ads_count_replies(ADS_STRUCT *ads, void *res)
* @param v Pointer to int to store result
* @return boolean inidicating success
*/
- BOOL ads_pull_uint32(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
+ bool ads_pull_uint32(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
uint32 *v)
{
char **values;
@@ -2268,7 +2268,7 @@ int ads_count_replies(ADS_STRUCT *ads, void *res)
* @param guid 37-byte area to receive text guid
* @return boolean indicating success
**/
- BOOL ads_pull_guid(ADS_STRUCT *ads, LDAPMessage *msg, struct GUID *guid)
+ bool ads_pull_guid(ADS_STRUCT *ads, LDAPMessage *msg, struct GUID *guid)
{
char **values;
UUID_FLAT flat_guid;
@@ -2297,11 +2297,11 @@ int ads_count_replies(ADS_STRUCT *ads, void *res)
* @param sid Pointer to sid to store result
* @return boolean inidicating success
*/
- BOOL ads_pull_sid(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
+ bool ads_pull_sid(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
DOM_SID *sid)
{
struct berval **values;
- BOOL ret = False;
+ bool ret = False;
values = ldap_get_values_len(ads->ldap.ld, msg, field);
@@ -2328,7 +2328,7 @@ int ads_count_replies(ADS_STRUCT *ads, void *res)
LDAPMessage *msg, const char *field, DOM_SID **sids)
{
struct berval **values;
- BOOL ret;
+ bool ret;
int count, i;
values = ldap_get_values_len(ads->ldap.ld, msg, field);
@@ -2372,11 +2372,11 @@ int ads_count_replies(ADS_STRUCT *ads, void *res)
* @param sd Pointer to *SEC_DESC to store result (talloc()ed)
* @return boolean inidicating success
*/
- BOOL ads_pull_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
+ bool ads_pull_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
LDAPMessage *msg, const char *field, SEC_DESC **sd)
{
struct berval **values;
- BOOL ret = False;
+ bool ret = False;
values = ldap_get_values_len(ads->ldap.ld, msg, field);
@@ -2788,7 +2788,7 @@ ADS_STATUS ads_upn_suffixes(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char ***suffix
* @param sid pointer to a DOM_SID
* @return boolean inidicating success
**/
-BOOL ads_get_sid_from_extended_dn(TALLOC_CTX *mem_ctx,
+bool ads_get_sid_from_extended_dn(TALLOC_CTX *mem_ctx,
const char *extended_dn,
enum ads_extended_dn_flags flags,
DOM_SID *sid)
diff --git a/source/libads/ldap_printer.c b/source/libads/ldap_printer.c
index 0c6a280c36c..05fbc071d85 100644
--- a/source/libads/ldap_printer.c
+++ b/source/libads/ldap_printer.c
@@ -99,7 +99,7 @@ ADS_STATUS ads_add_printer_entry(ADS_STRUCT *ads, char *prt_dn,
/*
map a REG_SZ to an ldap mod
*/
-static BOOL map_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
+static bool map_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
const REGISTRY_VALUE *value)
{
char *str_value = NULL;
@@ -120,7 +120,7 @@ static BOOL map_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
/*
map a REG_DWORD to an ldap mod
*/
-static BOOL map_dword(TALLOC_CTX *ctx, ADS_MODLIST *mods,
+static bool map_dword(TALLOC_CTX *ctx, ADS_MODLIST *mods,
const REGISTRY_VALUE *value)
{
char *str_value = NULL;
@@ -139,7 +139,7 @@ static BOOL map_dword(TALLOC_CTX *ctx, ADS_MODLIST *mods,
/*
map a boolean REG_BINARY to an ldap mod
*/
-static BOOL map_bool(TALLOC_CTX *ctx, ADS_MODLIST *mods,
+static bool map_bool(TALLOC_CTX *ctx, ADS_MODLIST *mods,
const REGISTRY_VALUE *value)
{
char *str_value;
@@ -159,7 +159,7 @@ static BOOL map_bool(TALLOC_CTX *ctx, ADS_MODLIST *mods,
/*
map a REG_MULTI_SZ to an ldap mod
*/
-static BOOL map_multi_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
+static bool map_multi_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
const REGISTRY_VALUE *value)
{
char **str_values = NULL;
@@ -198,7 +198,7 @@ static BOOL map_multi_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
struct valmap_to_ads {
const char *valname;
- BOOL (*fn)(TALLOC_CTX *, ADS_MODLIST *, const REGISTRY_VALUE *);
+ bool (*fn)(TALLOC_CTX *, ADS_MODLIST *, const REGISTRY_VALUE *);
};
/*
@@ -347,7 +347,7 @@ WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli,
return result;
}
-BOOL get_local_printer_publishing_data(TALLOC_CTX *mem_ctx,
+bool get_local_printer_publishing_data(TALLOC_CTX *mem_ctx,
ADS_MODLIST *mods,
NT_PRINTER_DATA *data)
{
diff --git a/source/libads/ldap_utils.c b/source/libads/ldap_utils.c
index 18f7da81d71..871449a81af 100644
--- a/source/libads/ldap_utils.c
+++ b/source/libads/ldap_utils.c
@@ -236,7 +236,7 @@ ADS_STATUS ads_ranged_search(ADS_STRUCT *ads,
uint32 first_usn;
int num_retries = 0;
const char **attrs;
- BOOL more_values = False;
+ bool more_values = False;
*num_strings = 0;
*strings = NULL;
@@ -289,7 +289,7 @@ ADS_STATUS ads_ranged_search_internal(ADS_STRUCT *ads,
size_t *num_strings,
uint32 *first_usn,
int *num_retries,
- BOOL *more_values)
+ bool *more_values)
{
LDAPMessage *res = NULL;
ADS_STATUS status;
diff --git a/source/libads/sasl.c b/source/libads/sasl.c
index d5eeb8e2b36..3b3838e390f 100644
--- a/source/libads/sasl.c
+++ b/source/libads/sasl.c
@@ -369,7 +369,7 @@ static const struct ads_saslwrap_ops ads_sasl_gssapi_ops = {
static ADS_STATUS ads_sasl_spnego_gsskrb5_bind(ADS_STRUCT *ads, const gss_name_t serv_name)
{
ADS_STATUS status;
- BOOL ok;
+ bool ok;
uint32 minor_status;
int gss_rc, rc;
gss_OID_desc krb5_mech_type =
@@ -746,7 +746,7 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads)
char *given_principal = NULL;
char *OIDs[ASN1_MAX_OIDS];
#ifdef HAVE_KRB5
- BOOL got_kerberos_mechanism = False;
+ bool got_kerberos_mechanism = False;
#endif
rc = ldap_sasl_bind_s(ads->ldap.ld, NULL, "GSS-SPNEGO", NULL, NULL, NULL, &scred);