summaryrefslogtreecommitdiff
path: root/source3/libsmb
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
commit30191d1a5704ad2b158386b511558972d539ce47 (patch)
tree4f46e5c4f28f672ab661aa18f45745860970a88c /source3/libsmb
parent789856f63ff73fec66298e95c91c60db7bdaf14e (diff)
downloadsamba-30191d1a5704ad2b158386b511558972d539ce47.tar.gz
samba-30191d1a5704ad2b158386b511558972d539ce47.tar.bz2
samba-30191d1a5704ad2b158386b511558972d539ce47.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. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/asn1.c46
-rw-r--r--source3/libsmb/cliconnect.c30
-rw-r--r--source3/libsmb/clidfs.c22
-rw-r--r--source3/libsmb/clidgram.c6
-rw-r--r--source3/libsmb/clientgen.c18
-rw-r--r--source3/libsmb/clierror.c6
-rw-r--r--source3/libsmb/clifile.c86
-rw-r--r--source3/libsmb/clifsinfo.c20
-rw-r--r--source3/libsmb/clikrb5.c28
-rw-r--r--source3/libsmb/clilist.c4
-rw-r--r--source3/libsmb/climessage.c6
-rw-r--r--source3/libsmb/clioplock.c6
-rw-r--r--source3/libsmb/cliprint.c2
-rw-r--r--source3/libsmb/cliquota.c30
-rw-r--r--source3/libsmb/clirap.c30
-rw-r--r--source3/libsmb/clirap2.c16
-rw-r--r--source3/libsmb/clireadwrite.c14
-rw-r--r--source3/libsmb/clisecdesc.c6
-rw-r--r--source3/libsmb/clispnego.c18
-rw-r--r--source3/libsmb/clitrans.c12
-rw-r--r--source3/libsmb/credentials.c8
-rw-r--r--source3/libsmb/dsgetdcname.c12
-rw-r--r--source3/libsmb/libsmbclient.c82
-rw-r--r--source3/libsmb/namecache.c20
-rw-r--r--source3/libsmb/namequery.c52
-rw-r--r--source3/libsmb/namequery_dc.c12
-rw-r--r--source3/libsmb/nmblib.c24
-rw-r--r--source3/libsmb/ntlm_check.c8
-rw-r--r--source3/libsmb/ntlmssp.c6
-rw-r--r--source3/libsmb/ntlmssp_parse.c4
-rw-r--r--source3/libsmb/ntlmssp_sign.c2
-rw-r--r--source3/libsmb/passchange.c2
-rw-r--r--source3/libsmb/samlogon_cache.c14
-rw-r--r--source3/libsmb/smb_share_modes.c2
-rw-r--r--source3/libsmb/smb_signing.c64
-rw-r--r--source3/libsmb/smbencrypt.c20
-rw-r--r--source3/libsmb/spnego.c12
-rw-r--r--source3/libsmb/trustdom_cache.c12
-rw-r--r--source3/libsmb/trusts_util.c4
39 files changed, 383 insertions, 383 deletions
diff --git a/source3/libsmb/asn1.c b/source3/libsmb/asn1.c
index 4d13207151..0cbfa70e7b 100644
--- a/source3/libsmb/asn1.c
+++ b/source3/libsmb/asn1.c
@@ -34,7 +34,7 @@ void asn1_free(ASN1_DATA *data)
}
/* write to the ASN1 buffer, advancing the buffer pointer */
-BOOL asn1_write(ASN1_DATA *data, const void *p, int len)
+bool asn1_write(ASN1_DATA *data, const void *p, int len)
{
if (data->has_error) return False;
if (data->length < data->ofs+len) {
@@ -52,13 +52,13 @@ BOOL asn1_write(ASN1_DATA *data, const void *p, int len)
}
/* useful fn for writing a uint8 */
-BOOL asn1_write_uint8(ASN1_DATA *data, uint8 v)
+bool asn1_write_uint8(ASN1_DATA *data, uint8 v)
{
return asn1_write(data, &v, 1);
}
/* push a tag onto the asn1 data buffer. Used for nested structures */
-BOOL asn1_push_tag(ASN1_DATA *data, uint8 tag)
+bool asn1_push_tag(ASN1_DATA *data, uint8 tag)
{
struct nesting *nesting;
@@ -76,7 +76,7 @@ BOOL asn1_push_tag(ASN1_DATA *data, uint8 tag)
}
/* pop a tag */
-BOOL asn1_pop_tag(ASN1_DATA *data)
+bool asn1_pop_tag(ASN1_DATA *data)
{
struct nesting *nesting;
size_t len;
@@ -127,7 +127,7 @@ BOOL asn1_pop_tag(ASN1_DATA *data)
/* write an integer */
-BOOL asn1_write_Integer(ASN1_DATA *data, int i)
+bool asn1_write_Integer(ASN1_DATA *data, int i)
{
if (!asn1_push_tag(data, ASN1_INTEGER)) return False;
do {
@@ -138,7 +138,7 @@ BOOL asn1_write_Integer(ASN1_DATA *data, int i)
}
/* write an object ID to a ASN1 buffer */
-BOOL asn1_write_OID(ASN1_DATA *data, const char *OID)
+bool asn1_write_OID(ASN1_DATA *data, const char *OID)
{
unsigned v, v2;
const char *p = (const char *)OID;
@@ -167,7 +167,7 @@ BOOL asn1_write_OID(ASN1_DATA *data, const char *OID)
}
/* write an octet string */
-BOOL asn1_write_OctetString(ASN1_DATA *data, const void *p, size_t length)
+bool asn1_write_OctetString(ASN1_DATA *data, const void *p, size_t length)
{
asn1_push_tag(data, ASN1_OCTET_STRING);
asn1_write(data, p, length);
@@ -176,7 +176,7 @@ BOOL asn1_write_OctetString(ASN1_DATA *data, const void *p, size_t length)
}
/* write a general string */
-BOOL asn1_write_GeneralString(ASN1_DATA *data, const char *s)
+bool asn1_write_GeneralString(ASN1_DATA *data, const char *s)
{
asn1_push_tag(data, ASN1_GENERAL_STRING);
asn1_write(data, s, strlen(s));
@@ -185,7 +185,7 @@ BOOL asn1_write_GeneralString(ASN1_DATA *data, const char *s)
}
/* write a BOOLEAN */
-BOOL asn1_write_BOOLEAN(ASN1_DATA *data, BOOL v)
+bool asn1_write_BOOLEAN(ASN1_DATA *data, bool v)
{
asn1_write_uint8(data, ASN1_BOOLEAN);
asn1_write_uint8(data, v);
@@ -194,7 +194,7 @@ BOOL asn1_write_BOOLEAN(ASN1_DATA *data, BOOL v)
/* write a BOOLEAN - hmm, I suspect this one is the correct one, and the
above boolean is bogus. Need to check */
-BOOL asn1_write_BOOLEAN2(ASN1_DATA *data, BOOL v)
+bool asn1_write_BOOLEAN2(ASN1_DATA *data, bool v)
{
asn1_push_tag(data, ASN1_BOOLEAN);
asn1_write_uint8(data, v);
@@ -203,7 +203,7 @@ BOOL asn1_write_BOOLEAN2(ASN1_DATA *data, BOOL v)
}
/* check a BOOLEAN */
-BOOL asn1_check_BOOLEAN(ASN1_DATA *data, BOOL v)
+bool asn1_check_BOOLEAN(ASN1_DATA *data, bool v)
{
uint8 b = 0;
@@ -222,7 +222,7 @@ BOOL asn1_check_BOOLEAN(ASN1_DATA *data, BOOL v)
/* load a ASN1_DATA structure with a lump of data, ready to be parsed */
-BOOL asn1_load(ASN1_DATA *data, DATA_BLOB blob)
+bool asn1_load(ASN1_DATA *data, DATA_BLOB blob)
{
ZERO_STRUCTP(data);
data->data = (unsigned char *)memdup(blob.data, blob.length);
@@ -235,7 +235,7 @@ BOOL asn1_load(ASN1_DATA *data, DATA_BLOB blob)
}
/* read from a ASN1 buffer, advancing the buffer pointer */
-BOOL asn1_read(ASN1_DATA *data, void *p, int len)
+bool asn1_read(ASN1_DATA *data, void *p, int len)
{
if (data->has_error)
return False;
@@ -255,13 +255,13 @@ BOOL asn1_read(ASN1_DATA *data, void *p, int len)
}
/* read a uint8 from a ASN1 buffer */
-BOOL asn1_read_uint8(ASN1_DATA *data, uint8 *v)
+bool asn1_read_uint8(ASN1_DATA *data, uint8 *v)
{
return asn1_read(data, v, 1);
}
/* start reading a nested asn1 structure */
-BOOL asn1_start_tag(ASN1_DATA *data, uint8 tag)
+bool asn1_start_tag(ASN1_DATA *data, uint8 tag)
{
uint8 b;
struct nesting *nesting;
@@ -310,7 +310,7 @@ BOOL asn1_start_tag(ASN1_DATA *data, uint8 tag)
/* stop reading a tag */
-BOOL asn1_end_tag(ASN1_DATA *data)
+bool asn1_end_tag(ASN1_DATA *data)
{
struct nesting *nesting;
@@ -346,7 +346,7 @@ int asn1_tag_remaining(ASN1_DATA *data)
}
/* read an object ID from a ASN1 buffer */
-BOOL asn1_read_OID(ASN1_DATA *data, char **OID)
+bool asn1_read_OID(ASN1_DATA *data, char **OID)
{
uint8 b;
pstring oid_str;
@@ -385,7 +385,7 @@ BOOL asn1_read_OID(ASN1_DATA *data, char **OID)
}
/* check that the next object ID is correct */
-BOOL asn1_check_OID(ASN1_DATA *data, const char *OID)
+bool asn1_check_OID(ASN1_DATA *data, const char *OID)
{
char *id;
@@ -402,7 +402,7 @@ BOOL asn1_check_OID(ASN1_DATA *data, const char *OID)
}
/* read a GeneralString from a ASN1 buffer */
-BOOL asn1_read_GeneralString(ASN1_DATA *data, char **s)
+bool asn1_read_GeneralString(ASN1_DATA *data, char **s)
{
int len;
char *str;
@@ -433,7 +433,7 @@ BOOL asn1_read_GeneralString(ASN1_DATA *data, char **s)
}
/* read a octet string blob */
-BOOL asn1_read_OctetString(ASN1_DATA *data, DATA_BLOB *blob)
+bool asn1_read_OctetString(ASN1_DATA *data, DATA_BLOB *blob)
{
int len;
ZERO_STRUCTP(blob);
@@ -450,7 +450,7 @@ BOOL asn1_read_OctetString(ASN1_DATA *data, DATA_BLOB *blob)
}
/* read an interger */
-BOOL asn1_read_Integer(ASN1_DATA *data, int *i)
+bool asn1_read_Integer(ASN1_DATA *data, int *i)
{
uint8 b;
*i = 0;
@@ -465,7 +465,7 @@ BOOL asn1_read_Integer(ASN1_DATA *data, int *i)
}
/* check a enumarted value is correct */
-BOOL asn1_check_enumerated(ASN1_DATA *data, int v)
+bool asn1_check_enumerated(ASN1_DATA *data, int v)
{
uint8 b;
if (!asn1_start_tag(data, ASN1_ENUMERATED)) return False;
@@ -479,7 +479,7 @@ BOOL asn1_check_enumerated(ASN1_DATA *data, int v)
}
/* write an enumarted value to the stream */
-BOOL asn1_write_enumerated(ASN1_DATA *data, uint8 v)
+bool asn1_write_enumerated(ASN1_DATA *data, uint8 v)
{
if (!asn1_push_tag(data, ASN1_ENUMERATED)) return False;
asn1_write_uint8(data, v);
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 16c3bed438..82cd6d6d13 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -447,7 +447,7 @@ end:
Send a extended security session setup blob
****************************************************************************/
-static BOOL cli_session_setup_blob_send(struct cli_state *cli, DATA_BLOB blob)
+static bool cli_session_setup_blob_send(struct cli_state *cli, DATA_BLOB blob)
{
uint32 capabilities = cli_session_setup_capabilities(cli);
char *p;
@@ -529,7 +529,7 @@ static DATA_BLOB cli_session_setup_blob_receive(struct cli_state *cli)
#define BASE_SESSSETUP_BLOB_PACKET_SIZE (35 + 24 + 22)
-static BOOL cli_session_setup_blob(struct cli_state *cli, DATA_BLOB blob, DATA_BLOB session_key_krb5)
+static bool cli_session_setup_blob(struct cli_state *cli, DATA_BLOB blob, DATA_BLOB session_key_krb5)
{
int32 remaining = blob.length;
int32 cur = 0;
@@ -744,7 +744,7 @@ static NTSTATUS cli_session_setup_ntlmssp(struct cli_state *cli, const char *use
DATA_BLOB key = data_blob(ntlmssp_state->session_key.data,
ntlmssp_state->session_key.length);
DATA_BLOB null_blob = data_blob_null;
- BOOL res;
+ bool res;
fstrcpy(cli->server_domain, ntlmssp_state->server_domain);
cli_set_session_key(cli, ntlmssp_state->session_key);
@@ -786,7 +786,7 @@ ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, const char *user,
char *principal;
char *OIDs[ASN1_MAX_OIDS];
int i;
- BOOL got_kerberos_mechanism = False;
+ bool got_kerberos_mechanism = False;
DATA_BLOB blob;
DEBUG(3,("Doing spnego session setup (blob length=%lu)\n", (unsigned long)cli->secblob.length));
@@ -985,7 +985,7 @@ NTSTATUS cli_session_setup(struct cli_state *cli,
Send a uloggoff.
*****************************************************************************/
-BOOL cli_ulogoff(struct cli_state *cli)
+bool cli_ulogoff(struct cli_state *cli)
{
memset(cli->outbuf,'\0',smb_size);
set_message(cli->outbuf,2,0,True);
@@ -1010,7 +1010,7 @@ BOOL cli_ulogoff(struct cli_state *cli)
Send a tconX.
****************************************************************************/
-BOOL cli_send_tconX(struct cli_state *cli,
+bool cli_send_tconX(struct cli_state *cli,
const char *share, const char *dev, const char *pass, int passlen)
{
fstring fullshare, pword;
@@ -1113,7 +1113,7 @@ BOOL cli_send_tconX(struct cli_state *cli,
Send a tree disconnect.
****************************************************************************/
-BOOL cli_tdis(struct cli_state *cli)
+bool cli_tdis(struct cli_state *cli)
{
memset(cli->outbuf,'\0',smb_size);
set_message(cli->outbuf,0,0,True);
@@ -1171,7 +1171,7 @@ void cli_negprot_send(struct cli_state *cli)
Send a negprot command.
****************************************************************************/
-BOOL cli_negprot(struct cli_state *cli)
+bool cli_negprot(struct cli_state *cli)
{
char *p;
int numprots;
@@ -1313,7 +1313,7 @@ BOOL cli_negprot(struct cli_state *cli)
Send a session request. See rfc1002.txt 4.3 and 4.3.2.
****************************************************************************/
-BOOL cli_session_request(struct cli_state *cli,
+bool cli_session_request(struct cli_state *cli,
struct nmb_name *calling, struct nmb_name *called)
{
char *p;
@@ -1381,7 +1381,7 @@ BOOL cli_session_request(struct cli_state *cli,
/* Try again */
{
static int depth;
- BOOL ret;
+ bool ret;
if (depth > 4) {
DEBUG(0,("Retarget recursion - failing\n"));
return False;
@@ -1462,7 +1462,7 @@ NTSTATUS cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip
@param dest_host The netbios name of the remote host
@param dest_ip (optional) The the destination IP, NULL for name based lookup
@param port (optional) The destination port (0 for default)
- @param retry BOOL. Did this connection fail with a retryable error ?
+ @param retry bool. Did this connection fail with a retryable error ?
*/
NTSTATUS cli_start_connection(struct cli_state **output_cli,
@@ -1470,7 +1470,7 @@ NTSTATUS cli_start_connection(struct cli_state **output_cli,
const char *dest_host,
struct in_addr *dest_ip, int port,
int signing_state, int flags,
- BOOL *retry)
+ bool *retry)
{
NTSTATUS nt_status;
struct nmb_name calling;
@@ -1566,7 +1566,7 @@ again:
@param user Username, unix string
@param domain User's domain
@param password User's password, unencrypted unix string.
- @param retry BOOL. Did this connection fail with a retryable error ?
+ @param retry bool. Did this connection fail with a retryable error ?
*/
NTSTATUS cli_full_connection(struct cli_state **output_cli,
@@ -1577,7 +1577,7 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli,
const char *user, const char *domain,
const char *password, int flags,
int signing_state,
- BOOL *retry)
+ bool *retry)
{
NTSTATUS nt_status;
struct cli_state *cli = NULL;
@@ -1638,7 +1638,7 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli,
Attempt a NetBIOS session request, falling back to *SMBSERVER if needed.
****************************************************************************/
-BOOL attempt_netbios_session_request(struct cli_state **ppcli, const char *srchost, const char *desthost,
+bool attempt_netbios_session_request(struct cli_state **ppcli, const char *srchost, const char *desthost,
struct in_addr *pdest_ip)
{
struct nmb_name calling, called;
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index db4a9dfbd5..f7bf8506fe 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -42,14 +42,14 @@ struct client_connection {
static pstring username;
static pstring password;
-static BOOL use_kerberos;
-static BOOL got_pass;
+static bool use_kerberos;
+static bool got_pass;
static int signing_state;
int max_protocol = PROTOCOL_NT1;
static int port;
static int name_type = 0x20;
-static BOOL have_ip;
+static bool have_ip;
static struct in_addr dest_ip;
static struct client_connection *connections;
@@ -59,7 +59,7 @@ static struct client_connection *connections;
********************************************************************/
static struct cli_state *do_connect( const char *server, const char *share,
- BOOL show_sessetup )
+ bool show_sessetup )
{
struct cli_state *c = NULL;
struct nmb_name called, calling;
@@ -238,7 +238,7 @@ const char *cli_cm_get_mntpoint( struct cli_state *c )
static struct cli_state *cli_cm_connect( const char *server,
const char *share,
- BOOL show_hdr)
+ bool show_hdr)
{
struct client_connection *node;
@@ -282,7 +282,7 @@ static struct cli_state *cli_cm_find( const char *server, const char *share )
struct cli_state *cli_cm_open(const char *server,
const char *share,
- BOOL show_hdr)
+ bool show_hdr)
{
struct cli_state *c;
@@ -476,7 +476,7 @@ static void cli_dfs_make_full_path( struct cli_state *cli,
check for dfs referral
********************************************************************/
-static BOOL cli_dfs_check_error( struct cli_state *cli, NTSTATUS status )
+static bool cli_dfs_check_error( struct cli_state *cli, NTSTATUS status )
{
uint32 flgs2 = SVAL(cli->inbuf,smb_flg2);
@@ -495,7 +495,7 @@ static BOOL cli_dfs_check_error( struct cli_state *cli, NTSTATUS status )
get the dfs referral link
********************************************************************/
-BOOL cli_dfs_get_referral( struct cli_state *cli,
+bool cli_dfs_get_referral( struct cli_state *cli,
const char *path,
CLIENT_DFS_REFERRAL**refs,
size_t *num_refs,
@@ -582,7 +582,7 @@ BOOL cli_dfs_get_referral( struct cli_state *cli,
/********************************************************************
********************************************************************/
-BOOL cli_resolve_path( const char *mountpt,
+bool cli_resolve_path( const char *mountpt,
struct cli_state *rootcli,
const char *path,
struct cli_state **targetcli,
@@ -745,14 +745,14 @@ BOOL cli_resolve_path( const char *mountpt,
/********************************************************************
********************************************************************/
-BOOL cli_check_msdfs_proxy( struct cli_state *cli, const char *sharename,
+bool cli_check_msdfs_proxy( struct cli_state *cli, const char *sharename,
fstring newserver, fstring newshare )
{
CLIENT_DFS_REFERRAL *refs = NULL;
size_t num_refs;
uint16 consumed;
pstring fullpath;
- BOOL res;
+ bool res;
uint16 cnum;
pstring newextrapath;
diff --git a/source3/libsmb/clidgram.c b/source3/libsmb/clidgram.c
index f170834fa9..4fc9243b5b 100644
--- a/source3/libsmb/clidgram.c
+++ b/source3/libsmb/clidgram.c
@@ -25,8 +25,8 @@
* cli_send_mailslot, send a mailslot for client code ...
*/
-BOOL cli_send_mailslot(struct messaging_context *msg_ctx,
- BOOL unique, const char *mailslot,
+bool cli_send_mailslot(struct messaging_context *msg_ctx,
+ bool unique, const char *mailslot,
uint16 priority,
char *buf, int len,
const char *srcname, int src_type,
@@ -110,7 +110,7 @@ BOOL cli_send_mailslot(struct messaging_context *msg_ctx,
/*
* cli_get_response: Get a response ...
*/
-BOOL cli_get_response(const char *mailslot, char *buf, int bufsiz)
+bool cli_get_response(const char *mailslot, char *buf, int bufsiz)
{
struct packet_struct *p;
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 1e3af9a3d7..ca05b2e38a 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -79,7 +79,7 @@ static ssize_t client_receive_smb(int fd,char *buffer, unsigned int timeout, siz
Recv an smb.
****************************************************************************/
-BOOL cli_receive_smb(struct cli_state *cli)
+bool cli_receive_smb(struct cli_state *cli)
{
ssize_t len;
@@ -166,7 +166,7 @@ ssize_t cli_receive_smb_data(struct cli_state *cli, char *buffer, size_t len)
Read a smb readX header.
****************************************************************************/
-BOOL cli_receive_smb_readX_header(struct cli_state *cli)
+bool cli_receive_smb_readX_header(struct cli_state *cli)
{
ssize_t len, offset;
@@ -267,7 +267,7 @@ static ssize_t write_socket(int fd, const char *buf, size_t len)
Send an smb to a fd.
****************************************************************************/
-BOOL cli_send_smb(struct cli_state *cli)
+bool cli_send_smb(struct cli_state *cli)
{
size_t len;
size_t nwritten=0;
@@ -469,9 +469,9 @@ struct cli_state *cli_initialise(void)
Returns False if the cli_close call failed.
****************************************************************************/
-BOOL cli_rpc_pipe_close(struct rpc_pipe_client *cli)
+bool cli_rpc_pipe_close(struct rpc_pipe_client *cli)
{
- BOOL ret;
+ bool ret;
if (!cli) {
return False;
@@ -584,9 +584,9 @@ uint16 cli_setpid(struct cli_state *cli, uint16 pid)
Set the case sensitivity flag on the packets. Returns old state.
****************************************************************************/
-BOOL cli_set_case_sensitive(struct cli_state *cli, BOOL case_sensitive)
+bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive)
{
- BOOL ret = cli->case_sensitive;
+ bool ret = cli->case_sensitive;
cli->case_sensitive = case_sensitive;
return ret;
}
@@ -595,7 +595,7 @@ BOOL cli_set_case_sensitive(struct cli_state *cli, BOOL case_sensitive)
Send a keepalive packet to the server
****************************************************************************/
-BOOL cli_send_keepalive(struct cli_state *cli)
+bool cli_send_keepalive(struct cli_state *cli)
{
if (cli->fd == -1) {
DEBUG(3, ("cli_send_keepalive: fd == -1\n"));
@@ -614,7 +614,7 @@ BOOL cli_send_keepalive(struct cli_state *cli)
Send/receive a SMBecho command: ping the server
****************************************************************************/
-BOOL cli_echo(struct cli_state *cli, uint16 num_echos,
+bool cli_echo(struct cli_state *cli, uint16 num_echos,
unsigned char *data, size_t length)
{
char *p;
diff --git a/source3/libsmb/clierror.c b/source3/libsmb/clierror.c
index be018074eb..4ab1c237dc 100644
--- a/source3/libsmb/clierror.c
+++ b/source3/libsmb/clierror.c
@@ -396,7 +396,7 @@ int cli_errno(struct cli_state *cli)
/* Return true if the last packet was in error */
-BOOL cli_is_error(struct cli_state *cli)
+bool cli_is_error(struct cli_state *cli)
{
uint32 flgs2 = SVAL(cli->inbuf,smb_flg2), rcls = 0;
@@ -419,7 +419,7 @@ BOOL cli_is_error(struct cli_state *cli)
/* Return true if the last error was an NT error */
-BOOL cli_is_nt_error(struct cli_state *cli)
+bool cli_is_nt_error(struct cli_state *cli)
{
uint32 flgs2 = SVAL(cli->inbuf,smb_flg2);
@@ -433,7 +433,7 @@ BOOL cli_is_nt_error(struct cli_state *cli)
/* Return true if the last error was a DOS error */
-BOOL cli_is_dos_error(struct cli_state *cli)
+bool cli_is_dos_error(struct cli_state *cli)
{
uint32 flgs2 = SVAL(cli->inbuf,smb_flg2);
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index c7b39f0b8d..27ad8364ee 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -25,7 +25,7 @@
Creates new name (sym)linked to oldname.
****************************************************************************/
-static BOOL cli_link_internal(struct cli_state *cli, const char *oldname, const char *newname, BOOL hard_link)
+static bool cli_link_internal(struct cli_state *cli, const char *oldname, const char *newname, bool hard_link)
{
unsigned int data_len = 0;
unsigned int param_len = 0;
@@ -168,7 +168,7 @@ static mode_t unix_filetype_from_wire(uint32 wire_type)
Do a POSIX getfacl (UNIX extensions).
****************************************************************************/
-BOOL cli_unix_getfacl(struct cli_state *cli, const char *name, size_t *prb_size, char **retbuf)
+bool cli_unix_getfacl(struct cli_state *cli, const char *name, size_t *prb_size, char **retbuf)
{
unsigned int param_len = 0;
unsigned int data_len = 0;
@@ -217,7 +217,7 @@ BOOL cli_unix_getfacl(struct cli_state *cli, const char *name, size_t *prb_size,
Stat a file (UNIX extensions).
****************************************************************************/
-BOOL cli_unix_stat(struct cli_state *cli, const char *name, SMB_STRUCT_STAT *sbuf)
+bool cli_unix_stat(struct cli_state *cli, const char *name, SMB_STRUCT_STAT *sbuf)
{
unsigned int param_len = 0;
unsigned int data_len = 0;
@@ -293,7 +293,7 @@ BOOL cli_unix_stat(struct cli_state *cli, const char *name, SMB_STRUCT_STAT *sbu
Symlink a file (UNIX extensions).
****************************************************************************/
-BOOL cli_unix_symlink(struct cli_state *cli, const char *oldname, const char *newname)
+bool cli_unix_symlink(struct cli_state *cli, const char *oldname, const char *newname)
{
return cli_link_internal(cli, oldname, newname, False);
}
@@ -302,7 +302,7 @@ BOOL cli_unix_symlink(struct cli_state *cli, const char *oldname, const char *ne
Hard a file (UNIX extensions).
****************************************************************************/
-BOOL cli_unix_hardlink(struct cli_state *cli, const char *oldname, const char *newname)
+bool cli_unix_hardlink(struct cli_state *cli, const char *oldname, const char *newname)
{
return cli_link_internal(cli, oldname, newname, True);
}
@@ -311,7 +311,7 @@ BOOL cli_unix_hardlink(struct cli_state *cli, const char *oldname, const char *n
Chmod or chown a file internal (UNIX extensions).
****************************************************************************/
-static BOOL cli_unix_chmod_chown_internal(struct cli_state *cli, const char *fname, uint32 mode, uint32 uid, uint32 gid)
+static bool cli_unix_chmod_chown_internal(struct cli_state *cli, const char *fname, uint32 mode, uint32 uid, uint32 gid)
{
unsigned int data_len = 0;
unsigned int param_len = 0;
@@ -363,7 +363,7 @@ static BOOL cli_unix_chmod_chown_internal(struct cli_state *cli, const char *fna
chmod a file (UNIX extensions).
****************************************************************************/
-BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode)
+bool cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode)
{
return cli_unix_chmod_chown_internal(cli, fname,
unix_perms_to_wire(mode), SMB_UID_NO_CHANGE, SMB_GID_NO_CHANGE);
@@ -373,7 +373,7 @@ BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode)
chown a file (UNIX extensions).
****************************************************************************/
-BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid)
+bool cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid)
{
return cli_unix_chmod_chown_internal(cli, fname, SMB_MODE_NO_CHANGE, (uint32)uid, (uint32)gid);
}
@@ -382,7 +382,7 @@ BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t g
Rename a file.
****************************************************************************/
-BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst)
+bool cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst)
{
char *p;
@@ -419,7 +419,7 @@ BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_
NT Rename a file.
****************************************************************************/
-BOOL cli_ntrename(struct cli_state *cli, const char *fname_src, const char *fname_dst)
+bool cli_ntrename(struct cli_state *cli, const char *fname_src, const char *fname_dst)
{
char *p;
@@ -457,7 +457,7 @@ BOOL cli_ntrename(struct cli_state *cli, const char *fname_src, const char *fnam
NT hardlink a file.
****************************************************************************/
-BOOL cli_nt_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst)
+bool cli_nt_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst)
{
char *p;
@@ -495,7 +495,7 @@ BOOL cli_nt_hardlink(struct cli_state *cli, const char *fname_src, const char *f
Delete a file.
****************************************************************************/
-BOOL cli_unlink_full(struct cli_state *cli, const char *fname, uint16 attrs)
+bool cli_unlink_full(struct cli_state *cli, const char *fname, uint16 attrs)
{
char *p;
@@ -531,7 +531,7 @@ BOOL cli_unlink_full(struct cli_state *cli, const char *fname, uint16 attrs)
Delete a file.
****************************************************************************/
-BOOL cli_unlink(struct cli_state *cli, const char *fname)
+bool cli_unlink(struct cli_state *cli, const char *fname)
{
return cli_unlink_full(cli, fname, aSYSTEM | aHIDDEN);
}
@@ -540,7 +540,7 @@ BOOL cli_unlink(struct cli_state *cli, const char *fname)
Create a directory.
****************************************************************************/
-BOOL cli_mkdir(struct cli_state *cli, const char *dname)
+bool cli_mkdir(struct cli_state *cli, const char *dname)
{
char *p;
@@ -575,7 +575,7 @@ BOOL cli_mkdir(struct cli_state *cli, const char *dname)
Remove a directory.
****************************************************************************/
-BOOL cli_rmdir(struct cli_state *cli, const char *dname)
+bool cli_rmdir(struct cli_state *cli, const char *dname)
{
char *p;
@@ -610,7 +610,7 @@ BOOL cli_rmdir(struct cli_state *cli, const char *dname)
Set or clear the delete on close flag.
****************************************************************************/
-int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag)
+int cli_nt_delete_on_close(struct cli_state *cli, int fnum, bool flag)
{
unsigned int data_len = 1;
unsigned int param_len = 6;
@@ -800,7 +800,7 @@ int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode
Close a file.
****************************************************************************/
-BOOL cli_close(struct cli_state *cli, int fnum)
+bool cli_close(struct cli_state *cli, int fnum)
{
memset(cli->outbuf,'\0',smb_size);
memset(cli->inbuf,'\0',smb_size);
@@ -880,7 +880,7 @@ NTSTATUS cli_locktype(struct cli_state *cli, int fnum,
note that timeout is in units of 2 milliseconds
****************************************************************************/
-BOOL cli_lock(struct cli_state *cli, int fnum,
+bool cli_lock(struct cli_state *cli, int fnum,
uint32 offset, uint32 len, int timeout, enum brl_type lock_type)
{
char *p;
@@ -935,7 +935,7 @@ BOOL cli_lock(struct cli_state *cli, int fnum,
Unlock a file.
****************************************************************************/
-BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len)
+bool cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len)
{
char *p;
@@ -977,7 +977,7 @@ BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len)
Lock a file with 64 bit offsets.
****************************************************************************/
-BOOL cli_lock64(struct cli_state *cli, int fnum,
+bool cli_lock64(struct cli_state *cli, int fnum,
SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type)
{
char *p;
@@ -1038,7 +1038,7 @@ BOOL cli_lock64(struct cli_state *cli, int fnum,
Unlock a file with 64 bit offsets.
****************************************************************************/
-BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len)
+bool cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len)
{
char *p;
@@ -1084,8 +1084,8 @@ BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_
Get/unlock a POSIX lock on a file - internal function.
****************************************************************************/
-static BOOL cli_posix_lock_internal(struct cli_state *cli, int fnum,
- SMB_BIG_UINT offset, SMB_BIG_UINT len, BOOL wait_lock, enum brl_type lock_type)
+static bool cli_posix_lock_internal(struct cli_state *cli, int fnum,
+ SMB_BIG_UINT offset, SMB_BIG_UINT len, bool wait_lock, enum brl_type lock_type)
{
unsigned int param_len = 4;
unsigned int data_len = POSIX_LOCK_DATA_SIZE;
@@ -1155,9 +1155,9 @@ static BOOL cli_posix_lock_internal(struct cli_state *cli, int fnum,
POSIX Lock a file.
****************************************************************************/
-BOOL cli_posix_lock(struct cli_state *cli, int fnum,
+bool cli_posix_lock(struct cli_state *cli, int fnum,
SMB_BIG_UINT offset, SMB_BIG_UINT len,
- BOOL wait_lock, enum brl_type lock_type)
+ bool wait_lock, enum brl_type lock_type)
{
if (lock_type != READ_LOCK && lock_type != WRITE_LOCK) {
return False;
@@ -1169,7 +1169,7 @@ BOOL cli_posix_lock(struct cli_state *cli, int fnum,
POSIX Unlock a file.
****************************************************************************/
-BOOL cli_posix_unlock(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len)
+bool cli_posix_unlock(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len)
{
return cli_posix_lock_internal(cli, fnum, offset, len, False, UNLOCK_LOCK);
}
@@ -1178,7 +1178,7 @@ BOOL cli_posix_unlock(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_
POSIX Get any lock covering a file.
****************************************************************************/
-BOOL cli_posix_getlock(struct cli_state *cli, int fnum, SMB_BIG_UINT *poffset, SMB_BIG_UINT *plen)
+bool cli_posix_getlock(struct cli_state *cli, int fnum, SMB_BIG_UINT *poffset, SMB_BIG_UINT *plen)
{
return True;
}
@@ -1187,7 +1187,7 @@ BOOL cli_posix_getlock(struct cli_state *cli, int fnum, SMB_BIG_UINT *poffset, S
Do a SMBgetattrE call.
****************************************************************************/
-BOOL cli_getattrE(struct cli_state *cli, int fd,
+bool cli_getattrE(struct cli_state *cli, int fd,
uint16 *attr, SMB_OFF_T *size,
time_t *change_time,
time_t *access_time,
@@ -1240,7 +1240,7 @@ BOOL cli_getattrE(struct cli_state *cli, int fd,
Do a SMBgetatr call
****************************************************************************/
-BOOL cli_getatr(struct cli_state *cli, const char *fname,
+bool cli_getatr(struct cli_state *cli, const char *fname,
uint16 *attr, SMB_OFF_T *size, time_t *write_time)
{
char *p;
@@ -1289,7 +1289,7 @@ BOOL cli_getatr(struct cli_state *cli, const char *fname,
Do a SMBsetattrE call.
****************************************************************************/
-BOOL cli_setattrE(struct cli_state *cli, int fd,
+bool cli_setattrE(struct cli_state *cli, int fd,
time_t change_time,
time_t access_time,
time_t write_time)
@@ -1332,7 +1332,7 @@ BOOL cli_setattrE(struct cli_state *cli, int fd,
Do a SMBsetatr call.
****************************************************************************/
-BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t)
+bool cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t)
{
char *p;
@@ -1370,7 +1370,7 @@ BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t)
/****************************************************************************
Check for existance of a dir.
****************************************************************************/
-BOOL cli_chkpath(struct cli_state *cli, const char *path)
+bool cli_chkpath(struct cli_state *cli, const char *path)
{
pstring path2;
char *p;
@@ -1405,7 +1405,7 @@ BOOL cli_chkpath(struct cli_state *cli, const char *path)
Query disk space.
****************************************************************************/
-BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail)
+bool cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail)
{
memset(cli->outbuf,'\0',smb_size);
set_message(cli->outbuf,0,0,True);
@@ -1513,7 +1513,7 @@ NTSTATUS cli_raw_ioctl(struct cli_state *cli, int fnum, uint32 code, DATA_BLOB *
Set an extended attribute utility fn.
*********************************************************/
-static BOOL cli_set_ea(struct cli_state *cli, uint16 setup, char *param, unsigned int param_len,
+static bool cli_set_ea(struct cli_state *cli, uint16 setup, char *param, unsigned int param_len,
const char *ea_name, const char *ea_val, size_t ea_len)
{
unsigned int data_len = 0;
@@ -1573,7 +1573,7 @@ static BOOL cli_set_ea(struct cli_state *cli, uint16 setup, char *param, unsigne
Set an extended attribute on a pathname.
*********************************************************/
-BOOL cli_set_ea_path(struct cli_state *cli, const char *path, const char *ea_name, const char *ea_val, size_t ea_len)
+bool cli_set_ea_path(struct cli_state *cli, const char *path, const char *ea_name, const char *ea_val, size_t ea_len)
{
uint16 setup = TRANSACT2_SETPATHINFO;
unsigned int param_len = 0;
@@ -1595,7 +1595,7 @@ BOOL cli_set_ea_path(struct cli_state *cli, const char *path, const char *ea_nam
Set an extended attribute on an fnum.
*********************************************************/
-BOOL cli_set_ea_fnum(struct cli_state *cli, int fnum, const char *ea_name, const char *ea_val, size_t ea_len)
+bool cli_set_ea_fnum(struct cli_state *cli, int fnum, const char *ea_name, const char *ea_val, size_t ea_len)
{
char param[6];
uint16 setup = TRANSACT2_SETFILEINFO;
@@ -1611,7 +1611,7 @@ BOOL cli_set_ea_fnum(struct cli_state *cli, int fnum, const char *ea_name, const
Get an extended attribute list tility fn.
*********************************************************/
-static BOOL cli_get_ea_list(struct cli_state *cli,
+static bool cli_get_ea_list(struct cli_state *cli,
uint16 setup, char *param, unsigned int param_len,
TALLOC_CTX *ctx,
size_t *pnum_eas,
@@ -1623,7 +1623,7 @@ static BOOL cli_get_ea_list(struct cli_state *cli,
char *p;
size_t ea_size;
size_t num_eas;
- BOOL ret = False;
+ bool ret = False;
struct ea_struct *ea_list;
*pnum_eas = 0;
@@ -1736,7 +1736,7 @@ static BOOL cli_get_ea_list(struct cli_state *cli,
Get an extended attribute list from a pathname.
*********************************************************/
-BOOL cli_get_ea_list_path(struct cli_state *cli, const char *path,
+bool cli_get_ea_list_path(struct cli_state *cli, const char *path,
TALLOC_CTX *ctx,
size_t *pnum_eas,
struct ea_struct **pea_list)
@@ -1760,7 +1760,7 @@ BOOL cli_get_ea_list_path(struct cli_state *cli, const char *path,
Get an extended attribute list from an fnum.
*********************************************************/
-BOOL cli_get_ea_list_fnum(struct cli_state *cli, int fnum,
+bool cli_get_ea_list_fnum(struct cli_state *cli, int fnum,
TALLOC_CTX *ctx,
size_t *pnum_eas,
struct ea_struct **pea_list)
@@ -1832,7 +1832,7 @@ static uint32 open_flags_to_wire(int flags)
Open a file - POSIX semantics. Returns fnum. Doesn't request oplock.
****************************************************************************/
-static int cli_posix_open_internal(struct cli_state *cli, const char *fname, int flags, mode_t mode, BOOL is_dir)
+static int cli_posix_open_internal(struct cli_state *cli, const char *fname, int flags, mode_t mode, bool is_dir)
{
unsigned int data_len = 0;
unsigned int param_len = 0;
@@ -1911,7 +1911,7 @@ int cli_posix_mkdir(struct cli_state *cli, const char *fname, mode_t mode)
unlink or rmdir - POSIX semantics.
****************************************************************************/
-static BOOL cli_posix_unlink_internal(struct cli_state *cli, const char *fname, BOOL is_dir)
+static bool cli_posix_unlink_internal(struct cli_state *cli, const char *fname, bool is_dir)
{
unsigned int data_len = 0;
unsigned int param_len = 0;
@@ -1958,7 +1958,7 @@ static BOOL cli_posix_unlink_internal(struct cli_state *cli, const char *fname,
unlink - POSIX semantics.
****************************************************************************/
-BOOL cli_posix_unlink(struct cli_state *cli, const char *fname)
+bool cli_posix_unlink(struct cli_state *cli, const char *fname)
{
return cli_posix_unlink_internal(cli, fname, False);
}
diff --git a/source3/libsmb/clifsinfo.c b/source3/libsmb/clifsinfo.c
index d2f759b192..a45623b9e4 100644
--- a/source3/libsmb/clifsinfo.c
+++ b/source3/libsmb/clifsinfo.c
@@ -23,10 +23,10 @@
Get UNIX extensions version info.
****************************************************************************/
-BOOL cli_unix_extensions_version(struct cli_state *cli, uint16 *pmajor, uint16 *pminor,
+bool cli_unix_extensions_version(struct cli_state *cli, uint16 *pmajor, uint16 *pminor,
uint32 *pcaplow, uint32 *pcaphigh)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char param[2];
char *rparam=NULL, *rdata=NULL;
@@ -82,10 +82,10 @@ cleanup:
Set UNIX extensions capabilities.
****************************************************************************/
-BOOL cli_set_unix_extensions_capabilities(struct cli_state *cli, uint16 major, uint16 minor,
+bool cli_set_unix_extensions_capabilities(struct cli_state *cli, uint16 major, uint16 minor,
uint32 caplow, uint32 caphigh)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char param[4];
char data[12];
@@ -131,9 +131,9 @@ cleanup:
return ret;
}
-BOOL cli_get_fs_attr_info(struct cli_state *cli, uint32 *fs_attr)
+bool cli_get_fs_attr_info(struct cli_state *cli, uint32 *fs_attr)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char param[2];
char *rparam=NULL, *rdata=NULL;
@@ -185,9 +185,9 @@ cleanup:
return ret;
}
-BOOL cli_get_fs_volume_info_old(struct cli_state *cli, fstring volume_name, uint32 *pserial_number)
+bool cli_get_fs_volume_info_old(struct cli_state *cli, fstring volume_name, uint32 *pserial_number)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char param[2];
char *rparam=NULL, *rdata=NULL;
@@ -241,9 +241,9 @@ cleanup:
return ret;
}
-BOOL cli_get_fs_volume_info(struct cli_state *cli, fstring volume_name, uint32 *pserial_number, time_t *pdate)
+bool cli_get_fs_volume_info(struct cli_state *cli, fstring volume_name, uint32 *pserial_number, time_t *pdate)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char param[2];
char *rparam=NULL, *rdata=NULL;
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index c036d7a930..4291834797 100644
--- a/source3/libsmb/clikrb5.c
+++ b/source3/libsmb/clikrb5.c
@@ -271,7 +271,7 @@ static krb5_error_code smb_krb5_parse_name_norealm_conv(krb5_context context,
}
#endif
-BOOL unwrap_edata_ntstatus(TALLOC_CTX *mem_ctx,
+bool unwrap_edata_ntstatus(TALLOC_CTX *mem_ctx,
DATA_BLOB *edata,
DATA_BLOB *edata_out)
{
@@ -310,7 +310,7 @@ BOOL unwrap_edata_ntstatus(TALLOC_CTX *mem_ctx,
}
-BOOL unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, DATA_BLOB *unwrapped_pac_data)
+bool unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, DATA_BLOB *unwrapped_pac_data)
{
DATA_BLOB pac_contents;
ASN1_DATA data;
@@ -347,10 +347,10 @@ BOOL unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, DATA_BLOB *unwrapped_
return True;
}
- BOOL get_auth_data_from_tkt(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, krb5_ticket *tkt)
+ bool get_auth_data_from_tkt(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, krb5_ticket *tkt)
{
DATA_BLOB auth_data_wrapped;
- BOOL got_auth_data_pac = False;
+ bool got_auth_data_pac = False;
int i;
#if defined(HAVE_KRB5_TKT_ENC_PART2)
@@ -540,7 +540,7 @@ BOOL unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, DATA_BLOB *unwrapped_
#endif
}
- BOOL kerberos_compatible_enctypes(krb5_context context,
+ bool kerberos_compatible_enctypes(krb5_context context,
krb5_enctype enctype1,
krb5_enctype enctype2)
{
@@ -554,7 +554,7 @@ BOOL unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, DATA_BLOB *unwrapped_
#endif
}
-static BOOL ads_cleanup_expired_creds(krb5_context context,
+static bool ads_cleanup_expired_creds(krb5_context context,
krb5_ccache ccache,
krb5_creds *credsp)
{
@@ -607,7 +607,7 @@ static krb5_error_code ads_krb5_mk_req(krb5_context context,
krb5_creds * credsp;
krb5_creds creds;
krb5_data in_data;
- BOOL creds_ready = False;
+ bool creds_ready = False;
int i = 0, maxtries = 3;
retval = smb_krb5_parse_name(context, principal, &server);
@@ -759,11 +759,11 @@ failed:
return retval;
}
- BOOL get_krb5_smb_session_key(krb5_context context, krb5_auth_context auth_context, DATA_BLOB *session_key, BOOL remote)
+ bool get_krb5_smb_session_key(krb5_context context, krb5_auth_context auth_context, DATA_BLOB *session_key, bool remote)
{
krb5_keyblock *skey;
krb5_error_code err;
- BOOL ret = False;
+ bool ret = False;
if (remote)
err = krb5_auth_con_getremotesubkey(context, auth_context, &skey);
@@ -1095,7 +1095,7 @@ out:
return smb_krb5_parse_name(context, name, principal);
}
- BOOL smb_krb5_principal_compare_any_realm(krb5_context context,
+ bool smb_krb5_principal_compare_any_realm(krb5_context context,
krb5_const_principal princ1,
krb5_const_principal princ2)
{
@@ -1383,7 +1383,7 @@ done:
krb5_data *packet)
{
krb5_error_code ret;
- BOOL got_error_code = False;
+ bool got_error_code = False;
DEBUG(10,("handle_krberror_packet: got error packet\n"));
@@ -1548,7 +1548,7 @@ done:
* allows to process non-default keytab names.
* @param context krb5_context
* @param keytab_name_req string
- * @param write_access BOOL if writable keytab is required
+ * @param write_access bool if writable keytab is required
* @param krb5_keytab pointer to krb5_keytab (close with krb5_kt_close())
* @return krb5_error_code
**********************************************************************/
@@ -1560,13 +1560,13 @@ done:
krb5_error_code smb_krb5_open_keytab(krb5_context context,
const char *keytab_name_req,
- BOOL write_access,
+ bool write_access,
krb5_keytab *keytab)
{
krb5_error_code ret = 0;
TALLOC_CTX *mem_ctx;
char keytab_string[MAX_KEYTAB_NAME_LEN];
- BOOL found_valid_name = False;
+ bool found_valid_name = False;
const char *pragma = "FILE";
const char *tmp = NULL;
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index 5da63096b1..fd0c380409 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -168,7 +168,7 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
char *dirlist = NULL;
int dirlist_len = 0;
int total_received = -1;
- BOOL First = True;
+ bool First = True;
int ff_searchcount=0;
int ff_eos=0;
int ff_dir_handle=0;
@@ -401,7 +401,7 @@ int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,
{
char *p;
int received = 0;
- BOOL first = True;
+ bool first = True;
char status[21];
int num_asked = (cli->max_xmit - 100)/DIR_STRUCT_SIZE;
int num_received = 0;
diff --git a/source3/libsmb/climessage.c b/source3/libsmb/climessage.c
index 46d7c1c3be..2a195753ae 100644
--- a/source3/libsmb/climessage.c
+++ b/source3/libsmb/climessage.c
@@ -45,7 +45,7 @@ int cli_message_start_build(struct cli_state *cli, char *host, char *username)
return(PTR_DIFF(p, cli->outbuf));
}
-BOOL cli_message_start(struct cli_state *cli, char *host, char *username,
+bool cli_message_start(struct cli_state *cli, char *host, char *username,
int *grp)
{
cli_message_start_build(cli, host, username);
@@ -101,7 +101,7 @@ int cli_message_text_build(struct cli_state *cli, char *msg, int len, int grp)
return(PTR_DIFF(p, cli->outbuf));
}
-BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp)
+bool cli_message_text(struct cli_state *cli, char *msg, int len, int grp)
{
cli_message_text_build(cli, msg, len, grp);
@@ -137,7 +137,7 @@ int cli_message_end_build(struct cli_state *cli, int grp)
return(PTR_DIFF(p, cli->outbuf));
}
-BOOL cli_message_end(struct cli_state *cli, int grp)
+bool cli_message_end(struct cli_state *cli, int grp)
{
cli_message_end_build(cli, grp);
diff --git a/source3/libsmb/clioplock.c b/source3/libsmb/clioplock.c
index 387c40b401..effd4a5565 100644
--- a/source3/libsmb/clioplock.c
+++ b/source3/libsmb/clioplock.c
@@ -22,11 +22,11 @@
/****************************************************************************
send an ack for an oplock break request
****************************************************************************/
-BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level)
+bool cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level)
{
char *oldbuf = cli->outbuf;
pstring buf;
- BOOL ret;
+ bool ret;
cli->outbuf = buf;
@@ -59,7 +59,7 @@ BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level)
set the oplock handler for a connection
****************************************************************************/
void cli_oplock_handler(struct cli_state *cli,
- BOOL (*handler)(struct cli_state *, int, unsigned char))
+ bool (*handler)(struct cli_state *, int, unsigned char))
{
cli->oplock_handler = handler;
}
diff --git a/source3/libsmb/cliprint.c b/source3/libsmb/cliprint.c
index 9e55e5cef3..cab890b08b 100644
--- a/source3/libsmb/cliprint.c
+++ b/source3/libsmb/cliprint.c
@@ -235,7 +235,7 @@ int cli_spl_open(struct cli_state *cli, const char *fname, int flags, int share_
Close a file.
****************************************************************************/
-BOOL cli_spl_close(struct cli_state *cli, int fnum)
+bool cli_spl_close(struct cli_state *cli, int fnum)
{
memset(cli->outbuf,'\0',smb_size);
memset(cli->inbuf,'\0',smb_size);
diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c
index 47d8cfe5fe..1932c044e2 100644
--- a/source3/libsmb/cliquota.c
+++ b/source3/libsmb/cliquota.c
@@ -19,7 +19,7 @@
#include "includes.h"
-BOOL cli_get_quota_handle(struct cli_state *cli, int *quota_fnum)
+bool cli_get_quota_handle(struct cli_state *cli, int *quota_fnum)
{
*quota_fnum = cli_nt_create_full(cli, FAKE_FILE_NAME_QUOTA_WIN32,
0x00000016, DESIRED_ACCESS_PIPE,
@@ -46,7 +46,7 @@ void free_ntquota_list(SMB_NTQUOTA_LIST **qt_list)
return;
}
-static BOOL parse_user_quota_record(const char *rdata, unsigned int rdata_count, unsigned int *offset, SMB_NTQUOTA_STRUCT *pqt)
+static bool parse_user_quota_record(const char *rdata, unsigned int rdata_count, unsigned int *offset, SMB_NTQUOTA_STRUCT *pqt)
{
int sid_len;
SMB_NTQUOTA_STRUCT qt;
@@ -126,9 +126,9 @@ static BOOL parse_user_quota_record(const char *rdata, unsigned int rdata_count,
return True;
}
-BOOL cli_get_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
+bool cli_get_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char params[16];
unsigned int data_len;
@@ -194,9 +194,9 @@ BOOL cli_get_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUC
return ret;
}
-BOOL cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
+bool cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char params[2];
char data[112];
@@ -253,9 +253,9 @@ BOOL cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUC
return ret;
}
-BOOL cli_list_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_LIST **pqt_list)
+bool cli_list_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_LIST **pqt_list)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char params[16];
char *rparam=NULL, *rdata=NULL;
@@ -412,9 +412,9 @@ BOOL cli_list_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_LIST
return ret;
}
-BOOL cli_get_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
+bool cli_get_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char param[2];
char *rparam=NULL, *rdata=NULL;
@@ -499,9 +499,9 @@ cleanup:
return ret;
}
-BOOL cli_set_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
+bool cli_set_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUCT *pqt)
{
- BOOL ret = False;
+ bool ret = False;
uint16 setup;
char param[4];
char data[48];
@@ -562,7 +562,7 @@ cleanup:
return ret;
}
-static char *quota_str_static(SMB_BIG_UINT val, BOOL special, BOOL _numeric)
+static char *quota_str_static(SMB_BIG_UINT val, bool special, bool _numeric)
{
static fstring buffer;
@@ -580,7 +580,7 @@ static char *quota_str_static(SMB_BIG_UINT val, BOOL special, BOOL _numeric)
return buffer;
}
-void dump_ntquota(SMB_NTQUOTA_STRUCT *qt, BOOL _verbose, BOOL _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, BOOL _numeric))
+void dump_ntquota(SMB_NTQUOTA_STRUCT *qt, bool _verbose, bool _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, bool _numeric))
{
if (!qt) {
smb_panic("dump_ntquota() called with NULL pointer");
@@ -630,7 +630,7 @@ void dump_ntquota(SMB_NTQUOTA_STRUCT *qt, BOOL _verbose, BOOL _numeric, void (*_
}
}
-void dump_ntquota_list(SMB_NTQUOTA_LIST **qtl, BOOL _verbose, BOOL _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, BOOL _numeric))
+void dump_ntquota_list(SMB_NTQUOTA_LIST **qtl, bool _verbose, bool _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, bool _numeric))
{
SMB_NTQUOTA_LIST *cur;
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index 801b6f61ec..9d106d0394 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -24,7 +24,7 @@
Call a remote api on an arbitrary pipe. takes param, data and setup buffers.
****************************************************************************/
-BOOL cli_api_pipe(struct cli_state *cli, const char *pipe_name,
+bool cli_api_pipe(struct cli_state *cli, const char *pipe_name,
uint16 *setup, uint32 setup_count, uint32 max_setup_count,
char *params, uint32 param_count, uint32 max_param_count,
char *data, uint32 data_count, uint32 max_data_count,
@@ -47,7 +47,7 @@ BOOL cli_api_pipe(struct cli_state *cli, const char *pipe_name,
Call a remote api
****************************************************************************/
-BOOL cli_api(struct cli_state *cli,
+bool cli_api(struct cli_state *cli,
char *param, int prcnt, int mprcnt,
char *data, int drcnt, int mdrcnt,
char **rparam, unsigned int *rprcnt,
@@ -70,7 +70,7 @@ BOOL cli_api(struct cli_state *cli,
Perform a NetWkstaUserLogon.
****************************************************************************/
-BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation)
+bool cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation)
{
char *rparam = NULL;
char *rdata = NULL;
@@ -205,7 +205,7 @@ int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, co
the comment and a state pointer.
****************************************************************************/
-BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
+bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
void (*fn)(const char *, uint32, const char *, void *),
void *state)
{
@@ -291,7 +291,7 @@ BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
Send a SamOEMChangePassword command.
****************************************************************************/
-BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password,
+bool cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password,
const char *old_password)
{
pstring param;
@@ -380,7 +380,7 @@ BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char
Send a qpathinfo call.
****************************************************************************/
-BOOL cli_qpathinfo(struct cli_state *cli, const char *fname,
+bool cli_qpathinfo(struct cli_state *cli, const char *fname,
time_t *change_time,
time_t *access_time,
time_t *write_time,
@@ -393,7 +393,7 @@ BOOL cli_qpathinfo(struct cli_state *cli, const char *fname,
pstring param;
char *rparam=NULL, *rdata=NULL;
int count=8;
- BOOL ret;
+ bool ret;
time_t (*date_fn)(struct cli_state *, void *);
char *p;
@@ -463,7 +463,7 @@ BOOL cli_qpathinfo(struct cli_state *cli, const char *fname,
Send a setpathinfo call.
****************************************************************************/
-BOOL cli_setpathinfo(struct cli_state *cli, const char *fname,
+bool cli_setpathinfo(struct cli_state *cli, const char *fname,
time_t create_time,
time_t access_time,
time_t write_time,
@@ -478,7 +478,7 @@ BOOL cli_setpathinfo(struct cli_state *cli, const char *fname,
pstring data;
char *rparam=NULL, *rdata=NULL;
int count=8;
- BOOL ret;
+ bool ret;
char *p;
memset(param, 0, sizeof(param));
@@ -561,7 +561,7 @@ BOOL cli_setpathinfo(struct cli_state *cli, const char *fname,
Send a qpathinfo call with the SMB_QUERY_FILE_ALL_INFO info level.
****************************************************************************/
-BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname,
+bool cli_qpathinfo2(struct cli_state *cli, const char *fname,
struct timespec *create_time,
struct timespec *access_time,
struct timespec *write_time,
@@ -635,7 +635,7 @@ BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname,
Send a qfileinfo QUERY_FILE_NAME_INFO call.
****************************************************************************/
-BOOL cli_qfilename(struct cli_state *cli, int fnum,
+bool cli_qfilename(struct cli_state *cli, int fnum,
pstring name)
{
unsigned int data_len = 0;
@@ -678,7 +678,7 @@ BOOL cli_qfilename(struct cli_state *cli, int fnum,
Send a qfileinfo call.
****************************************************************************/
-BOOL cli_qfileinfo(struct cli_state *cli, int fnum,
+bool cli_qfileinfo(struct cli_state *cli, int fnum,
uint16 *mode, SMB_OFF_T *size,
struct timespec *create_time,
struct timespec *access_time,
@@ -753,7 +753,7 @@ BOOL cli_qfileinfo(struct cli_state *cli, int fnum,
Send a qpathinfo BASIC_INFO call.
****************************************************************************/
-BOOL cli_qpathinfo_basic( struct cli_state *cli, const char *name,
+bool cli_qpathinfo_basic( struct cli_state *cli, const char *name,
SMB_STRUCT_STAT *sbuf, uint32 *attributes )
{
unsigned int param_len = 0;
@@ -817,7 +817,7 @@ BOOL cli_qpathinfo_basic( struct cli_state *cli, const char *name,
Send a qfileinfo call.
****************************************************************************/
-BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char **poutdata, uint32 *poutlen)
+bool cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char **poutdata, uint32 *poutlen)
{
unsigned int data_len = 0;
unsigned int param_len = 0;
@@ -882,7 +882,7 @@ NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstrin
char *rparam=NULL, *rdata=NULL;
int count=8;
char *p;
- BOOL ret;
+ bool ret;
unsigned int len;
p = param;
diff --git a/source3/libsmb/clirap2.c b/source3/libsmb/clirap2.c
index b8fe31a562..6be7fb6a56 100644
--- a/source3/libsmb/clirap2.c
+++ b/source3/libsmb/clirap2.c
@@ -1231,7 +1231,7 @@ int cli_NetShareDelete(struct cli_state *cli, const char * share_name )
* False - failure
*
************************************************************************/
-BOOL cli_get_pdc_name(struct cli_state *cli, char *workgroup, char *pdc_name)
+bool cli_get_pdc_name(struct cli_state *cli, char *workgroup, char *pdc_name)
{
char *rparam = NULL;
char *rdata = NULL;
@@ -1311,7 +1311,7 @@ BOOL cli_get_pdc_name(struct cli_state *cli, char *workgroup, char *pdc_name)
* Origins: samba 2.0.6 source/libsmb/clientgen.c cli_NetServerEnum()
*
************************************************************************/
-BOOL cli_get_server_domain(struct cli_state *cli)
+bool cli_get_server_domain(struct cli_state *cli)
{
char *rparam = NULL;
char *rdata = NULL;
@@ -1376,7 +1376,7 @@ BOOL cli_get_server_domain(struct cli_state *cli)
* Origins: samba 2.0.6 source/libsmb/clientgen.c cli_NetServerEnum()
*
************************************************************************/
-BOOL cli_get_server_type(struct cli_state *cli, uint32 *pstype)
+bool cli_get_server_type(struct cli_state *cli, uint32 *pstype)
{
char *rparam = NULL;
char *rdata = NULL;
@@ -1416,7 +1416,7 @@ BOOL cli_get_server_type(struct cli_state *cli, uint32 *pstype)
return(res == 0 || res == ERRmoredata);
}
-BOOL cli_get_server_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
+bool cli_get_server_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
char **servername)
{
char *rparam = NULL;
@@ -1428,7 +1428,7 @@ BOOL cli_get_server_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
+sizeof(RAP_SERVER_INFO_L1) /* return string */
+WORDSIZE /* info level */
+WORDSIZE]; /* buffer size */
- BOOL res = False;
+ bool res = False;
fstring tmp;
/* send a SMBtrans command with api NetServerGetInfo */
@@ -1499,7 +1499,7 @@ BOOL cli_get_server_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
* False - failure
*
************************************************************************/
-BOOL cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 stype)
+bool cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 stype)
{
char *rparam = NULL;
char *rdata = NULL;
@@ -1512,7 +1512,7 @@ BOOL cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 sty
+WORDSIZE /* buffer size */
+DWORDSIZE /* server type */
+RAP_MACHNAME_LEN]; /* workgroup */
- BOOL found_server = False;
+ bool found_server = False;
int res = -1;
/* send a SMBtrans command with api NetServerEnum */
@@ -1566,7 +1566,7 @@ BOOL cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 sty
/****************************************************************************
perform a NetWkstaUserLogoff
****************************************************************************/
-BOOL cli_NetWkstaUserLogoff(struct cli_state *cli,char *user, char *workstation)
+bool cli_NetWkstaUserLogoff(struct cli_state *cli,char *user, char *workstation)
{
char *rparam = NULL;
char *rdata = NULL;
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index ed80dfaf1a..0d037e946e 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -23,10 +23,10 @@
Issue a single SMBread and don't wait for a reply.
****************************************************************************/
-static BOOL cli_issue_read(struct cli_state *cli, int fnum, off_t offset,
+static bool cli_issue_read(struct cli_state *cli, int fnum, off_t offset,
size_t size, int i)
{
- BOOL bigoffset = False;
+ bool bigoffset = False;
memset(cli->outbuf,'\0',smb_size);
memset(cli->inbuf,'\0',smb_size);
@@ -66,7 +66,7 @@ ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_
size_t readsize;
ssize_t total = 0;
/* We can only do direct reads if not signing. */
- BOOL direct_reads = !client_is_signing_on(cli);
+ bool direct_reads = !client_is_signing_on(cli);
if (size == 0)
return 0;
@@ -108,7 +108,7 @@ ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_
errors. */
if (cli_is_error(cli)) {
- BOOL recoverable_error = False;
+ bool recoverable_error = False;
NTSTATUS status = NT_STATUS_OK;
uint8 eclass = 0;
uint32 ecode = 0;
@@ -191,7 +191,7 @@ ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_
Issue a single SMBreadraw and don't wait for a reply.
****************************************************************************/
-static BOOL cli_issue_readraw(struct cli_state *cli, int fnum, off_t offset,
+static bool cli_issue_readraw(struct cli_state *cli, int fnum, off_t offset,
size_t size, int i)
{
@@ -284,12 +284,12 @@ ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, si
issue a single SMBwrite and don't wait for a reply
****************************************************************************/
-static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset,
+static bool cli_issue_write(struct cli_state *cli, int fnum, off_t offset,
uint16 mode, const char *buf,
size_t size, int i)
{
char *p;
- BOOL large_writex = False;
+ bool large_writex = False;
if (size > cli->bufsize) {
cli->outbuf = (char *)SMB_REALLOC(cli->outbuf, size + 1024);
diff --git a/source3/libsmb/clisecdesc.c b/source3/libsmb/clisecdesc.c
index 27629ea96d..46a6609415 100644
--- a/source3/libsmb/clisecdesc.c
+++ b/source3/libsmb/clisecdesc.c
@@ -29,7 +29,7 @@ SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum,
char *rparam=NULL, *rdata=NULL;
unsigned int rparam_count=0, rdata_count=0;
prs_struct pd;
- BOOL pd_initialized = False;
+ bool pd_initialized = False;
SEC_DESC *psd = NULL;
SIVAL(param, 0, fnum);
@@ -81,7 +81,7 @@ SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum,
/****************************************************************************
set the security descriptor for a open file
****************************************************************************/
-BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd)
+bool cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd)
{
char param[8];
char *rparam=NULL, *rdata=NULL;
@@ -89,7 +89,7 @@ BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd)
uint32 sec_info = 0;
TALLOC_CTX *mem_ctx;
prs_struct pd;
- BOOL ret = False;
+ bool ret = False;
if ((mem_ctx = talloc_init("cli_set_secdesc")) == NULL) {
DEBUG(0,("talloc_init failed.\n"));
diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c
index 9432ce81d3..f95b11e4cd 100644
--- a/source3/libsmb/clispnego.c
+++ b/source3/libsmb/clispnego.c
@@ -122,12 +122,12 @@ DATA_BLOB gen_negTokenInit(const char *OID, DATA_BLOB blob)
parse a negTokenInit packet giving a GUID, a list of supported
OIDs (the mechanisms) and a principal name string
*/
-BOOL spnego_parse_negTokenInit(DATA_BLOB blob,
+bool spnego_parse_negTokenInit(DATA_BLOB blob,
char *OIDs[ASN1_MAX_OIDS],
char **principal)
{
int i;
- BOOL ret;
+ bool ret;
ASN1_DATA data;
asn1_load(&data, blob);
@@ -224,7 +224,7 @@ DATA_BLOB gen_negTokenTarg(const char *OIDs[], DATA_BLOB blob)
/*
parse a negTokenTarg packet giving a list of OIDs and a security blob
*/
-BOOL parse_negTokenTarg(DATA_BLOB blob, char *OIDs[ASN1_MAX_OIDS], DATA_BLOB *secblob)
+bool parse_negTokenTarg(DATA_BLOB blob, char *OIDs[ASN1_MAX_OIDS], DATA_BLOB *secblob)
{
int i;
ASN1_DATA data;
@@ -301,9 +301,9 @@ DATA_BLOB spnego_gen_krb5_wrap(const DATA_BLOB ticket, const uint8 tok_id[2])
/*
parse a krb5 GSS-API wrapper packet giving a ticket
*/
-BOOL spnego_parse_krb5_wrap(DATA_BLOB blob, DATA_BLOB *ticket, uint8 tok_id[2])
+bool spnego_parse_krb5_wrap(DATA_BLOB blob, DATA_BLOB *ticket, uint8 tok_id[2])
{
- BOOL ret;
+ bool ret;
ASN1_DATA data;
int data_remaining;
@@ -373,10 +373,10 @@ int spnego_gen_negTokenTarg(const char *principal, int time_offset,
/*
parse a spnego NTLMSSP challenge packet giving two security blobs
*/
-BOOL spnego_parse_challenge(const DATA_BLOB blob,
+bool spnego_parse_challenge(const DATA_BLOB blob,
DATA_BLOB *chal1, DATA_BLOB *chal2)
{
- BOOL ret;
+ bool ret;
ASN1_DATA data;
ZERO_STRUCTP(chal1);
@@ -448,7 +448,7 @@ DATA_BLOB spnego_gen_auth(DATA_BLOB blob)
/*
parse a SPNEGO auth packet. This contains the encrypted passwords
*/
-BOOL spnego_parse_auth(DATA_BLOB blob, DATA_BLOB *auth)
+bool spnego_parse_auth(DATA_BLOB blob, DATA_BLOB *auth)
{
ASN1_DATA data;
@@ -519,7 +519,7 @@ DATA_BLOB spnego_gen_auth_response(DATA_BLOB *reply, NTSTATUS nt_status,
/*
parse a SPNEGO auth packet. This contains the encrypted passwords
*/
-BOOL spnego_parse_auth_response(DATA_BLOB blob, NTSTATUS nt_status,
+bool spnego_parse_auth_response(DATA_BLOB blob, NTSTATUS nt_status,
const char *mechOID,
DATA_BLOB *auth)
{
diff --git a/source3/libsmb/clitrans.c b/source3/libsmb/clitrans.c
index e859dce956..5db624150d 100644
--- a/source3/libsmb/clitrans.c
+++ b/source3/libsmb/clitrans.c
@@ -24,7 +24,7 @@
Send a SMB trans or trans2 request.
****************************************************************************/
-BOOL cli_send_trans(struct cli_state *cli, int trans,
+bool cli_send_trans(struct cli_state *cli, int trans,
const char *pipe_name,
int fid, int flags,
uint16 *setup, unsigned int lsetup, unsigned int msetup,
@@ -162,7 +162,7 @@ BOOL cli_send_trans(struct cli_state *cli, int trans,
Receive a SMB trans or trans2 response allocating the necessary memory.
****************************************************************************/
-BOOL cli_receive_trans(struct cli_state *cli,int trans,
+bool cli_receive_trans(struct cli_state *cli,int trans,
char **param, unsigned int *param_len,
char **data, unsigned int *data_len)
{
@@ -170,7 +170,7 @@ BOOL cli_receive_trans(struct cli_state *cli,int trans,
unsigned int total_param=0;
unsigned int this_data,this_param;
NTSTATUS status;
- BOOL ret = False;
+ bool ret = False;
*data_len = *param_len = 0;
@@ -341,7 +341,7 @@ BOOL cli_receive_trans(struct cli_state *cli,int trans,
Send a SMB nttrans request.
****************************************************************************/
-BOOL cli_send_nt_trans(struct cli_state *cli,
+bool cli_send_nt_trans(struct cli_state *cli,
int function,
int flags,
uint16 *setup, unsigned int lsetup, unsigned int msetup,
@@ -469,7 +469,7 @@ BOOL cli_send_nt_trans(struct cli_state *cli,
Receive a SMB nttrans response allocating the necessary memory.
****************************************************************************/
-BOOL cli_receive_nt_trans(struct cli_state *cli,
+bool cli_receive_nt_trans(struct cli_state *cli,
char **param, unsigned int *param_len,
char **data, unsigned int *data_len)
{
@@ -478,7 +478,7 @@ BOOL cli_receive_nt_trans(struct cli_state *cli,
unsigned int this_data,this_param;
uint8 eclass;
uint32 ecode;
- BOOL ret = False;
+ bool ret = False;
*data_len = *param_len = 0;
diff --git a/source3/libsmb/credentials.c b/source3/libsmb/credentials.c
index 80b18c6b99..973bb6ad28 100644
--- a/source3/libsmb/credentials.c
+++ b/source3/libsmb/credentials.c
@@ -211,7 +211,7 @@ void creds_server_init(uint32 neg_flags,
Check a credential sent by the client.
****************************************************************************/
-BOOL creds_server_check(const struct dcinfo *dc, const DOM_CHAL *rcv_cli_chal_in)
+bool creds_server_check(const struct dcinfo *dc, const DOM_CHAL *rcv_cli_chal_in)
{
if (memcmp(dc->clnt_chal.data, rcv_cli_chal_in->data, 8)) {
DEBUG(5,("creds_server_check: challenge : %s\n", credstr(rcv_cli_chal_in->data)));
@@ -243,9 +243,9 @@ static void creds_reseed(struct dcinfo *dc)
Step the server credential chain one forward.
****************************************************************************/
-BOOL creds_server_step(struct dcinfo *dc, const DOM_CRED *received_cred, DOM_CRED *cred_out)
+bool creds_server_step(struct dcinfo *dc, const DOM_CRED *received_cred, DOM_CRED *cred_out)
{
- BOOL ret;
+ bool ret;
struct dcinfo tmp_dc = *dc;
/* Do all operations on a temporary copy of the dc,
@@ -315,7 +315,7 @@ void creds_client_init(uint32 neg_flags,
Check a credential returned by the server.
****************************************************************************/
-BOOL creds_client_check(const struct dcinfo *dc, const DOM_CHAL *rcv_srv_chal_in)
+bool creds_client_check(const struct dcinfo *dc, const DOM_CHAL *rcv_srv_chal_in)
{
if (memcmp(dc->srv_chal.data, rcv_srv_chal_in->data, 8)) {
DEBUG(5,("creds_client_check: challenge : %s\n", credstr(rcv_srv_chal_in->data)));
diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c
index 89bb65006d..bffbd0f8dc 100644
--- a/source3/libsmb/dsgetdcname.c
+++ b/source3/libsmb/dsgetdcname.c
@@ -302,7 +302,7 @@ static NTSTATUS DsGetDcName_cache_store(TALLOC_CTX *mem_ctx,
{
time_t expire_time;
char *key;
- BOOL ret = False;
+ bool ret = False;
DATA_BLOB blob;
unsigned char *buf = NULL;
int len = 0;
@@ -374,7 +374,7 @@ static NTSTATUS DsGetDcName_cache_refresh(TALLOC_CTX *mem_ctx,
#define RETURN_ON_FALSE(x) if (!x) return False;
-static BOOL check_cldap_reply_required_flags(uint32_t ret_flags,
+static bool check_cldap_reply_required_flags(uint32_t ret_flags,
uint32_t req_flags)
{
if (req_flags & DS_PDC_REQUIRED)
@@ -411,7 +411,7 @@ static NTSTATUS DsGetDcName_cache_fetch(TALLOC_CTX *mem_ctx,
uint32_t flags,
const char *site_name,
struct DS_DOMAIN_CONTROLLER_INFO **info,
- BOOL *expired)
+ bool *expired)
{
char *key;
DATA_BLOB blob;
@@ -463,7 +463,7 @@ static NTSTATUS DsGetDcName_cached(TALLOC_CTX *mem_ctx,
struct DS_DOMAIN_CONTROLLER_INFO **info)
{
NTSTATUS status;
- BOOL expired = False;
+ bool expired = False;
status = DsGetDcName_cache_fetch(mem_ctx, domain_name, domain_guid,
flags, site_name, info, &expired);
@@ -492,7 +492,7 @@ static NTSTATUS DsGetDcName_cached(TALLOC_CTX *mem_ctx,
/****************************************************************
****************************************************************/
-static BOOL check_allowed_required_flags(uint32_t flags)
+static bool check_allowed_required_flags(uint32_t flags)
{
uint32_t return_type = flags & (DS_RETURN_FLAT_NAME|DS_RETURN_DNS_NAME);
uint32_t offered_type = flags & (DS_IS_FLAT_NAME|DS_IS_DNS_NAME);
@@ -740,7 +740,7 @@ static NTSTATUS process_dc_dns(TALLOC_CTX *mem_ctx,
struct DS_DOMAIN_CONTROLLER_INFO **info)
{
int i = 0;
- BOOL valid_dc = False;
+ bool valid_dc = False;
struct cldap_netlogon_reply r;
const char *dc_hostname, *dc_domain_name;
const char *dc_address;
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index 49384e2728..3b5818a015 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -111,7 +111,7 @@ smbc_lseek_ctx(SMBCCTX *context,
off_t offset,
int whence);
-extern BOOL in_client;
+extern bool in_client;
/*
* Is the logging working / configfile read ?
@@ -635,7 +635,7 @@ find_server(SMBCCTX *context,
static SMBCSRV *
smbc_server(SMBCCTX *context,
- BOOL connect_if_not_found,
+ bool connect_if_not_found,
const char *server,
const char *share,
fstring workgroup,
@@ -1481,7 +1481,7 @@ smbc_close_ctx(SMBCCTX *context,
* Get info from an SMB server on a file. Use a qpathinfo call first
* and if that fails, use getatr, as Win95 sometimes refuses qpathinfo
*/
-static BOOL
+static bool
smbc_getatr(SMBCCTX * context,
SMBCSRV *srv,
char *path,
@@ -1580,7 +1580,7 @@ smbc_getatr(SMBCCTX * context,
*
* "mode" (attributes) parameter may be set to -1 if it is not to be set.
*/
-static BOOL
+static bool
smbc_setatr(SMBCCTX * context, SMBCSRV *srv, char *path,
time_t create_time,
time_t access_time,
@@ -3741,8 +3741,8 @@ static int
ace_compare(SEC_ACE *ace1,
SEC_ACE *ace2)
{
- BOOL b1;
- BOOL b2;
+ bool b1;
+ bool b2;
/* If the ACEs are equal, we have nothing more to do. */
if (sec_ace_equal(ace1, ace2)) {
@@ -3851,7 +3851,7 @@ static void
convert_sid_to_string(struct cli_state *ipc_cli,
POLICY_HND *pol,
fstring str,
- BOOL numeric,
+ bool numeric,
DOM_SID *sid)
{
char **domains = NULL;
@@ -3885,16 +3885,16 @@ convert_sid_to_string(struct cli_state *ipc_cli,
}
/* convert a string to a SID, either numeric or username/group */
-static BOOL
+static bool
convert_string_to_sid(struct cli_state *ipc_cli,
POLICY_HND *pol,
- BOOL numeric,
+ bool numeric,
DOM_SID *sid,
const char *str)
{
enum lsa_SidType *types = NULL;
DOM_SID *sids = NULL;
- BOOL result = True;
+ bool result = True;
struct rpc_pipe_client *pipe_hnd = find_lsa_pipe_hnd(ipc_cli);
if (!pipe_hnd) {
@@ -3925,11 +3925,11 @@ convert_string_to_sid(struct cli_state *ipc_cli,
/* parse an ACE in the same format as print_ace() */
-static BOOL
+static bool
parse_ace(struct cli_state *ipc_cli,
POLICY_HND *pol,
SEC_ACE *ace,
- BOOL numeric,
+ bool numeric,
char *str)
{
char *p;
@@ -4024,7 +4024,7 @@ parse_ace(struct cli_state *ipc_cli,
p = tok;
while(*p) {
- BOOL found = False;
+ bool found = False;
for (v = special_values; v->perm; v++) {
if (v->perm[0] == *p) {
@@ -4048,7 +4048,7 @@ parse_ace(struct cli_state *ipc_cli,
}
/* add an ACE to a list of ACEs in a SEC_ACL */
-static BOOL
+static bool
add_ace(SEC_ACL **the_acl,
SEC_ACE *ace,
TALLOC_CTX *ctx)
@@ -4079,7 +4079,7 @@ static SEC_DESC *
sec_desc_parse(TALLOC_CTX *ctx,
struct cli_state *ipc_cli,
POLICY_HND *pol,
- BOOL numeric,
+ bool numeric,
char *str)
{
const char *p = str;
@@ -4359,25 +4359,25 @@ cacl_get(SMBCCTX *context,
uint32 i;
int n = 0;
int n_used;
- BOOL all;
- BOOL all_nt;
- BOOL all_nt_acls;
- BOOL all_dos;
- BOOL some_nt;
- BOOL some_dos;
- BOOL exclude_nt_revision = False;
- BOOL exclude_nt_owner = False;
- BOOL exclude_nt_group = False;
- BOOL exclude_nt_acl = False;
- BOOL exclude_dos_mode = False;
- BOOL exclude_dos_size = False;
- BOOL exclude_dos_create_time = False;
- BOOL exclude_dos_access_time = False;
- BOOL exclude_dos_write_time = False;
- BOOL exclude_dos_change_time = False;
- BOOL exclude_dos_inode = False;
- BOOL numeric = True;
- BOOL determine_size = (bufsize == 0);
+ bool all;
+ bool all_nt;
+ bool all_nt_acls;
+ bool all_dos;
+ bool some_nt;
+ bool some_dos;
+ bool exclude_nt_revision = False;
+ bool exclude_nt_owner = False;
+ bool exclude_nt_group = False;
+ bool exclude_nt_acl = False;
+ bool exclude_dos_mode = False;
+ bool exclude_dos_size = False;
+ bool exclude_dos_create_time = False;
+ bool exclude_dos_access_time = False;
+ bool exclude_dos_write_time = False;
+ bool exclude_dos_change_time = False;
+ bool exclude_dos_inode = False;
+ bool numeric = True;
+ bool determine_size = (bufsize == 0);
int fnum = -1;
SEC_DESC *sd;
fstring sidstr;
@@ -5147,7 +5147,7 @@ cacl_set(TALLOC_CTX *ctx,
size_t sd_size;
int ret = 0;
char *p;
- BOOL numeric = True;
+ bool numeric = True;
/* the_acl will be null for REMOVE_ALL operations */
if (the_acl) {
@@ -5208,7 +5208,7 @@ cacl_set(TALLOC_CTX *ctx,
case SMBC_XATTR_MODE_REMOVE:
for (i=0;sd->dacl && i<sd->dacl->num_aces;i++) {
- BOOL found = False;
+ bool found = False;
for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
if (sec_ace_equal(&sd->dacl->aces[i],
@@ -5235,7 +5235,7 @@ cacl_set(TALLOC_CTX *ctx,
case SMBC_XATTR_MODE_ADD:
for (i=0;sd->dacl && i<sd->dacl->num_aces;i++) {
- BOOL found = False;
+ bool found = False;
for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
if (sid_equal(&sd->dacl->aces[i].trustee,
@@ -6387,7 +6387,7 @@ smbc_option_set(SMBCCTX *context,
va_list ap;
union {
int i;
- BOOL b;
+ bool b;
smbc_get_auth_data_with_context_fn auth_fn;
void *v;
} option_value;
@@ -6398,7 +6398,7 @@ smbc_option_set(SMBCCTX *context,
/*
* Log to standard error instead of standard output.
*/
- option_value.b = (BOOL) va_arg(ap, int);
+ option_value.b = (bool) va_arg(ap, int);
context->internal->_debug_stderr = option_value.b;
} else if (strcmp(option_name, "full_time_names") == 0) {
@@ -6410,7 +6410,7 @@ smbc_option_set(SMBCCTX *context,
* be CHANGE_TIME but was confused and sometimes referred to
* CREATE_TIME.)
*/
- option_value.b = (BOOL) va_arg(ap, int);
+ option_value.b = (bool) va_arg(ap, int);
context->internal->_full_time_names = option_value.b;
} else if (strcmp(option_name, "open_share_mode") == 0) {
@@ -6533,7 +6533,7 @@ smbc_init_context(SMBCCTX *context)
* Do some library-wide intializations the first time we get
* called
*/
- BOOL conf_loaded = False;
+ bool conf_loaded = False;
/* Set this to what the user wants */
DEBUGLEVEL = context->debug;
diff --git a/source3/libsmb/namecache.c b/source3/libsmb/namecache.c
index aeca5673c0..b569100d94 100644
--- a/source3/libsmb/namecache.c
+++ b/source3/libsmb/namecache.c
@@ -33,7 +33,7 @@
* false on failure
**/
-BOOL namecache_enable(void)
+bool namecache_enable(void)
{
/*
* Check if name caching disabled by setting the name cache
@@ -68,7 +68,7 @@ BOOL namecache_enable(void)
* false on failure
**/
-BOOL namecache_shutdown(void)
+bool namecache_shutdown(void)
{
if (!gencache_shutdown()) {
DEBUG(2, ("namecache_shutdown: Couldn't close namecache on top of gencache.\n"));
@@ -111,13 +111,13 @@ static char* namecache_key(const char *name, int name_type)
* ip addresses being stored
**/
-BOOL namecache_store(const char *name, int name_type,
+bool namecache_store(const char *name, int name_type,
int num_names, struct ip_service *ip_list)
{
time_t expiry;
char *key, *value_string;
int i;
- BOOL ret;
+ bool ret;
/*
* we use gecache call to avoid annoying debug messages about
@@ -179,7 +179,7 @@ BOOL namecache_store(const char *name, int name_type,
* false if name isn't found in the cache or has expired
**/
-BOOL namecache_fetch(const char *name, int name_type, struct ip_service **ip_list,
+bool namecache_fetch(const char *name, int name_type, struct ip_service **ip_list,
int *num_names)
{
char *key, *value;
@@ -229,9 +229,9 @@ BOOL namecache_fetch(const char *name, int name_type, struct ip_service **ip_lis
*
**/
-BOOL namecache_delete(const char *name, int name_type)
+bool namecache_delete(const char *name, int name_type)
{
- BOOL ret;
+ bool ret;
char *key;
if (!gencache_init())
@@ -298,13 +298,13 @@ static char *namecache_status_record_key(const char *name, int name_type1,
/* Store a name status record. */
-BOOL namecache_status_store(const char *keyname, int keyname_type,
+bool namecache_status_store(const char *keyname, int keyname_type,
int name_type, struct in_addr keyip,
const char *srvname)
{
char *key;
time_t expiry;
- BOOL ret;
+ bool ret;
if (!gencache_init())
return False;
@@ -327,7 +327,7 @@ BOOL namecache_status_store(const char *keyname, int keyname_type,
/* Fetch a name status record. */
-BOOL namecache_status_fetch(const char *keyname, int keyname_type,
+bool namecache_status_fetch(const char *keyname, int keyname_type,
int name_type, struct in_addr keyip, char *srvname_out)
{
char *key = NULL;
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 5459210c64..12e0d01b3b 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -20,7 +20,7 @@
#include "includes.h"
/* nmbd.c sets this to True. */
-BOOL global_in_nmbd = False;
+bool global_in_nmbd = False;
/****************************
* SERVER AFFINITY ROUTINES *
@@ -46,11 +46,11 @@ static char *saf_key(const char *domain)
/****************************************************************************
****************************************************************************/
-BOOL saf_store( const char *domain, const char *servername )
+bool saf_store( const char *domain, const char *servername )
{
char *key;
time_t expire;
- BOOL ret = False;
+ bool ret = False;
if ( !domain || !servername ) {
DEBUG(2,("saf_store: Refusing to store empty domain or servername!\n"));
@@ -79,10 +79,10 @@ BOOL saf_store( const char *domain, const char *servername )
return ret;
}
-BOOL saf_delete( const char *domain )
+bool saf_delete( const char *domain )
{
char *key;
- BOOL ret = False;
+ bool ret = False;
if ( !domain ) {
DEBUG(2,("saf_delete: Refusing to delete empty domain\n"));
@@ -111,7 +111,7 @@ char *saf_fetch( const char *domain )
{
char *server = NULL;
time_t timeout;
- BOOL ret = False;
+ bool ret = False;
char *key = NULL;
if ( !domain || strlen(domain) == 0) {
@@ -198,7 +198,7 @@ NODE_STATUS_STRUCT *node_status_query(int fd,struct nmb_name *name,
struct in_addr to_ip, int *num_names,
struct node_status_extra *extra)
{
- BOOL found=False;
+ bool found=False;
int retries = 2;
int retry_time = 2000;
struct timeval tval;
@@ -281,13 +281,13 @@ NODE_STATUS_STRUCT *node_status_query(int fd,struct nmb_name *name,
a servers name given its IP. Return the matched name in *name.
**************************************************************************/
-BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, fstring name)
+bool name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, fstring name)
{
NODE_STATUS_STRUCT *status = NULL;
struct nmb_name nname;
int count, i;
int sock;
- BOOL result = False;
+ bool result = False;
if (lp_disable_netbios()) {
DEBUG(5,("name_status_find(%s#%02x): netbios is disabled\n", q_name, q_type));
@@ -471,11 +471,11 @@ static int remove_duplicate_addrs2( struct ip_service *iplist, int count )
****************************************************************************/
struct in_addr *name_query(int fd,const char *name,int name_type,
- BOOL bcast,BOOL recurse,
+ bool bcast,bool recurse,
struct in_addr to_ip, int *count, int *flags,
- BOOL *timed_out)
+ bool *timed_out)
{
- BOOL found=False;
+ bool found=False;
int i, retries = 3;
int retry_time = bcast?250:2000;
struct timeval tval;
@@ -669,7 +669,7 @@ XFILE *startlmhosts(const char *fname)
Parse the next line in the lmhosts file.
*********************************************************/
-BOOL getlmhostsent( XFILE *fp, pstring name, int *name_type, struct in_addr *ipaddr)
+bool getlmhostsent( XFILE *fp, pstring name, int *name_type, struct in_addr *ipaddr)
{
pstring line;
@@ -761,7 +761,7 @@ void endlmhosts(XFILE *fp)
return False on failure. Port is set to PORT_NONE;
*********************************************************/
-static BOOL convert_ip2service( struct ip_service **return_iplist, struct in_addr *ip_list, int count )
+static bool convert_ip2service( struct ip_service **return_iplist, struct in_addr *ip_list, int count )
{
int i;
@@ -895,7 +895,7 @@ NTSTATUS resolve_wins(const char *name, int name_type,
for (i=0; i<srv_count; i++) {
struct in_addr wins_ip;
int flags;
- BOOL timed_out;
+ bool timed_out;
wins_ip = wins_srv_ip_tag(wins_tags[t], src_ip);
@@ -1224,9 +1224,9 @@ NTSTATUS internal_resolve_name(const char *name, int name_type,
pstring name_resolve_list;
fstring tok;
const char *ptr;
- BOOL allones = (strcmp(name,"255.255.255.255") == 0);
- BOOL allzeros = (strcmp(name,"0.0.0.0") == 0);
- BOOL is_address = is_ipaddress_v4(name);
+ bool allones = (strcmp(name,"255.255.255.255") == 0);
+ bool allzeros = (strcmp(name,"0.0.0.0") == 0);
+ bool is_address = is_ipaddress_v4(name);
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
int i;
@@ -1394,7 +1394,7 @@ NTSTATUS internal_resolve_name(const char *name, int name_type,
smb.conf to determine the order of name resolution.
*********************************************************/
-BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type)
+bool resolve_name(const char *name, struct in_addr *return_ip, int name_type)
{
struct ip_service *ip_list = NULL;
char *sitename = sitename_fetch(lp_realm()); /* wild guess */
@@ -1435,7 +1435,7 @@ BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type)
Find the IP address of the master browser or DMB for a workgroup.
*********************************************************/
-BOOL find_master_ip(const char *group, struct in_addr *master_ip)
+bool find_master_ip(const char *group, struct in_addr *master_ip)
{
struct ip_service *ip_list = NULL;
int count = 0;
@@ -1471,7 +1471,7 @@ BOOL find_master_ip(const char *group, struct in_addr *master_ip)
for a domain.
*********************************************************/
-BOOL get_pdc_ip(const char *domain, struct in_addr *ip)
+bool get_pdc_ip(const char *domain, struct in_addr *ip)
{
struct ip_service *ip_list = NULL;
int count = 0;
@@ -1518,7 +1518,7 @@ enum dc_lookup_type { DC_NORMAL_LOOKUP, DC_ADS_ONLY, DC_KDC_ONLY };
*********************************************************/
static NTSTATUS get_dc_list(const char *domain, const char *sitename, struct ip_service **ip_list,
- int *count, enum dc_lookup_type lookup_type, int *ordered)
+ int *count, enum dc_lookup_type lookup_type, bool *ordered)
{
fstring resolve_order;
char *saf_servername;
@@ -1531,7 +1531,7 @@ static NTSTATUS get_dc_list(const char *domain, const char *sitename, struct ip_
int local_count, i, j;
struct ip_service *return_iplist = NULL;
struct ip_service *auto_ip_list = NULL;
- BOOL done_auto_lookup = False;
+ bool done_auto_lookup = False;
int auto_count = 0;
NTSTATUS status;
@@ -1713,9 +1713,9 @@ static NTSTATUS get_dc_list(const char *domain, const char *sitename, struct ip_
Small wrapper function to get the DC list and sort it if neccessary.
*********************************************************************/
-NTSTATUS get_sorted_dc_list( const char *domain, const char *sitename, struct ip_service **ip_list, int *count, BOOL ads_only )
+NTSTATUS get_sorted_dc_list( const char *domain, const char *sitename, struct ip_service **ip_list, int *count, bool ads_only )
{
- BOOL ordered;
+ bool ordered;
NTSTATUS status;
enum dc_lookup_type lookup_type = DC_NORMAL_LOOKUP;
@@ -1748,7 +1748,7 @@ NTSTATUS get_sorted_dc_list( const char *domain, const char *sitename, struct ip
NTSTATUS get_kdc_list( const char *realm, const char *sitename, struct ip_service **ip_list, int *count)
{
- BOOL ordered;
+ bool ordered;
NTSTATUS status;
*count = 0;
diff --git a/source3/libsmb/namequery_dc.c b/source3/libsmb/namequery_dc.c
index 39215aaa8f..16d8414b8f 100644
--- a/source3/libsmb/namequery_dc.c
+++ b/source3/libsmb/namequery_dc.c
@@ -29,7 +29,7 @@
**********************************************************************/
#ifdef HAVE_KRB5
-static BOOL is_our_primary_domain(const char *domain)
+static bool is_our_primary_domain(const char *domain)
{
int role = lp_server_role();
@@ -46,7 +46,7 @@ static BOOL is_our_primary_domain(const char *domain)
Find the name and IP address for a server in the realm/domain
*************************************************************************/
-static BOOL ads_dc_name(const char *domain,
+static bool ads_dc_name(const char *domain,
const char *realm,
struct in_addr *dc_ip,
fstring srv_name)
@@ -148,7 +148,7 @@ static BOOL ads_dc_name(const char *domain,
valid since we have already done a name_status_find on it
***************************************************************************/
-static BOOL rpc_dc_name(const char *domain, fstring srv_name, struct in_addr *ip_out)
+static bool rpc_dc_name(const char *domain, fstring srv_name, struct in_addr *ip_out)
{
struct ip_service *ip_list = NULL;
struct in_addr dc_ip, exclude_ip;
@@ -206,11 +206,11 @@ static BOOL rpc_dc_name(const char *domain, fstring srv_name, struct in_addr *ip
wrapper around ads and rpc methods of finds DC's
**********************************************************************/
-BOOL get_dc_name(const char *domain, const char *realm, fstring srv_name, struct in_addr *ip_out)
+bool get_dc_name(const char *domain, const char *realm, fstring srv_name, struct in_addr *ip_out)
{
struct in_addr dc_ip;
- BOOL ret;
- BOOL our_domain = False;
+ bool ret;
+ bool our_domain = False;
zero_ip_v4(&dc_ip);
diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c
index 61e24eb6f9..4d21258f99 100644
--- a/source3/libsmb/nmblib.c
+++ b/source3/libsmb/nmblib.c
@@ -152,8 +152,8 @@ void debug_nmb_packet(struct packet_struct *p)
Handle "compressed" name pointers.
******************************************************************/
-static BOOL handle_name_ptrs(unsigned char *ubuf,int *offset,int length,
- BOOL *got_pointer,int *ret)
+static bool handle_name_ptrs(unsigned char *ubuf,int *offset,int length,
+ bool *got_pointer,int *ret)
{
int loop_count=0;
@@ -180,7 +180,7 @@ static int parse_nmb_name(char *inbuf,int ofs,int length, struct nmb_name *name)
int m,n=0;
unsigned char *ubuf = (unsigned char *)inbuf;
int ret = 0;
- BOOL got_pointer=False;
+ bool got_pointer=False;
int loop_count=0;
int offset = ofs;
@@ -367,7 +367,7 @@ char *nmb_namestr(const struct nmb_name *n)
Allocate and parse some resource records.
******************************************************************/
-static BOOL parse_alloc_res_rec(char *inbuf,int *offset,int length,
+static bool parse_alloc_res_rec(char *inbuf,int *offset,int length,
struct res_rec **recs, int count)
{
int i;
@@ -467,7 +467,7 @@ static int put_compressed_name_ptr(unsigned char *buf,
This is documented in section 4.4.1 of RFC1002.
******************************************************************/
-static BOOL parse_dgram(char *inbuf,int length,struct dgram_packet *dgram)
+static bool parse_dgram(char *inbuf,int length,struct dgram_packet *dgram)
{
int offset;
int flags;
@@ -521,7 +521,7 @@ static BOOL parse_dgram(char *inbuf,int length,struct dgram_packet *dgram)
or is invalid for some reason, True otherwise.
******************************************************************/
-static BOOL parse_nmb(char *inbuf,int length,struct nmb_packet *nmb)
+static bool parse_nmb(char *inbuf,int length,struct nmb_packet *nmb)
{
int nm_flags,offset;
@@ -735,7 +735,7 @@ struct packet_struct *parse_packet(char *buf,int length,
int port)
{
struct packet_struct *p;
- BOOL ok=False;
+ bool ok=False;
p = SMB_MALLOC_P(struct packet_struct);
if (!p)
@@ -807,9 +807,9 @@ struct packet_struct *read_packet(int fd,enum packet_type packet_type)
Send a udp packet on a already open socket.
******************************************************************/
-static BOOL send_udp(int fd,char *buf,int len,struct in_addr ip,int port)
+static bool send_udp(int fd,char *buf,int len,struct in_addr ip,int port)
{
- BOOL ret = False;
+ bool ret = False;
int i;
struct sockaddr_in sock_out;
@@ -913,7 +913,7 @@ void make_nmb_name( struct nmb_name *n, const char *name, int type)
Compare two nmb names
******************************************************************/
-BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2)
+bool nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2)
{
return ((n1->name_type == n2->name_type) &&
strequal(n1->name ,n2->name ) &&
@@ -1072,7 +1072,7 @@ int build_packet(char *buf, size_t buflen, struct packet_struct *p)
Send a packet_struct.
******************************************************************/
-BOOL send_packet(struct packet_struct *p)
+bool send_packet(struct packet_struct *p)
{
char buf[1024];
int len=0;
@@ -1169,7 +1169,7 @@ struct packet_struct *receive_dgram_packet(int fd, int t,
See if a datagram has the right mailslot name.
***************************************************************************/
-BOOL match_mailslot_name(struct packet_struct *p, const char *mailslot_name)
+bool match_mailslot_name(struct packet_struct *p, const char *mailslot_name)
{
struct dgram_packet *dgram = &p->packet.dgram;
char *buf;
diff --git a/source3/libsmb/ntlm_check.c b/source3/libsmb/ntlm_check.c
index dfc62c3070..f8ed044f8a 100644
--- a/source3/libsmb/ntlm_check.c
+++ b/source3/libsmb/ntlm_check.c
@@ -29,7 +29,7 @@
Core of smb password checking routine.
****************************************************************************/
-static BOOL smb_pwd_check_ntlmv1(const DATA_BLOB *nt_response,
+static bool smb_pwd_check_ntlmv1(const DATA_BLOB *nt_response,
const uchar *part_passwd,
const DATA_BLOB *sec_blob,
DATA_BLOB *user_sess_key)
@@ -80,11 +80,11 @@ static BOOL smb_pwd_check_ntlmv1(const DATA_BLOB *nt_response,
Note: The same code works with both NTLMv2 and LMv2.
****************************************************************************/
-static BOOL smb_pwd_check_ntlmv2(const DATA_BLOB *ntv2_response,
+static bool smb_pwd_check_ntlmv2(const DATA_BLOB *ntv2_response,
const uchar *part_passwd,
const DATA_BLOB *sec_blob,
const char *user, const char *domain,
- BOOL upper_case_domain, /* should the domain be transformed into upper case? */
+ bool upper_case_domain, /* should the domain be transformed into upper case? */
DATA_BLOB *user_sess_key)
{
/* Finish the encryption of part_passwd. */
@@ -92,7 +92,7 @@ static BOOL smb_pwd_check_ntlmv2(const DATA_BLOB *ntv2_response,
uchar value_from_encryption[16];
uchar client_response[16];
DATA_BLOB client_key_data;
- BOOL res;
+ bool res;
if (part_passwd == NULL) {
DEBUG(10,("No password set - DISALLOWING access\n"));
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c
index 0c0744867d..7205d57a0a 100644
--- a/source3/libsmb/ntlmssp.c
+++ b/source3/libsmb/ntlmssp.c
@@ -121,7 +121,7 @@ static const uint8 *get_challenge(const struct ntlmssp_state *ntlmssp_state)
*
*/
-static BOOL may_set_challenge(const struct ntlmssp_state *ntlmssp_state)
+static bool may_set_challenge(const struct ntlmssp_state *ntlmssp_state)
{
return True;
}
@@ -400,7 +400,7 @@ static const char *ntlmssp_target_name(struct ntlmssp_state *ntlmssp_state,
}
static void ntlmssp_handle_neg_flags(struct ntlmssp_state *ntlmssp_state,
- uint32 neg_flags, BOOL allow_lm) {
+ uint32 neg_flags, bool allow_lm) {
if (neg_flags & NTLMSSP_NEGOTIATE_UNICODE) {
ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_UNICODE;
ntlmssp_state->neg_flags &= ~NTLMSSP_NEGOTIATE_OEM;
@@ -630,7 +630,7 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state,
NTSTATUS nt_status = NT_STATUS_OK;
/* used by NTLM2 */
- BOOL doing_ntlm2 = False;
+ bool doing_ntlm2 = False;
uchar session_nonce[16];
uchar session_nonce_hash[16];
diff --git a/source3/libsmb/ntlmssp_parse.c b/source3/libsmb/ntlmssp_parse.c
index 15739d3068..76194d5974 100644
--- a/source3/libsmb/ntlmssp_parse.c
+++ b/source3/libsmb/ntlmssp_parse.c
@@ -39,7 +39,7 @@
d = word (4 bytes)
C = constant ascii string
*/
-BOOL msrpc_gen(DATA_BLOB *blob,
+bool msrpc_gen(DATA_BLOB *blob,
const char *format, ...)
{
int i, n;
@@ -182,7 +182,7 @@ if ((head_ofs + amount) > blob->length) { \
C = constant ascii string
*/
-BOOL msrpc_parse(const DATA_BLOB *blob,
+bool msrpc_parse(const DATA_BLOB *blob,
const char *format, ...)
{
int i;
diff --git a/source3/libsmb/ntlmssp_sign.c b/source3/libsmb/ntlmssp_sign.c
index 0e0a1c472f..8413c8066b 100644
--- a/source3/libsmb/ntlmssp_sign.c
+++ b/source3/libsmb/ntlmssp_sign.c
@@ -56,7 +56,7 @@ static NTSTATUS ntlmssp_make_packet_signature(NTLMSSP_STATE *ntlmssp_state,
const uchar *whole_pdu, size_t pdu_length,
enum ntlmssp_direction direction,
DATA_BLOB *sig,
- BOOL encrypt_sig)
+ bool encrypt_sig)
{
if (ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_NTLM2) {
HMACMD5Context ctx;
diff --git a/source3/libsmb/passchange.c b/source3/libsmb/passchange.c
index cec150d8b2..83cfc3efbf 100644
--- a/source3/libsmb/passchange.c
+++ b/source3/libsmb/passchange.c
@@ -33,7 +33,7 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam
struct in_addr ip;
NTSTATUS result;
- BOOL pass_must_change = False;
+ bool pass_must_change = False;
*err_str = '\0';
diff --git a/source3/libsmb/samlogon_cache.c b/source3/libsmb/samlogon_cache.c
index c206922a5e..b1d6c8d8f3 100644
--- a/source3/libsmb/samlogon_cache.c
+++ b/source3/libsmb/samlogon_cache.c
@@ -30,7 +30,7 @@ static TDB_CONTEXT *netsamlogon_tdb = NULL;
open the tdb
***********************************************************************/
-BOOL netsamlogon_cache_init(void)
+bool netsamlogon_cache_init(void)
{
if (!netsamlogon_tdb) {
netsamlogon_tdb = tdb_open_log(lock_path(NETSAMLOGON_TDB), 0,
@@ -45,7 +45,7 @@ BOOL netsamlogon_cache_init(void)
Shutdown samlogon_cache database
***********************************************************************/
-BOOL netsamlogon_cache_shutdown(void)
+bool netsamlogon_cache_shutdown(void)
{
if(netsamlogon_tdb)
return (tdb_close(netsamlogon_tdb) == 0);
@@ -58,7 +58,7 @@ BOOL netsamlogon_cache_shutdown(void)
***********************************************************************/
void netsamlogon_clear_cached_user(TDB_CONTEXT *tdb, NET_USER_INFO_3 *user)
{
- BOOL got_tdb = False;
+ bool got_tdb = False;
DOM_SID sid;
fstring key_str, sid_string;
@@ -104,12 +104,12 @@ void netsamlogon_clear_cached_user(TDB_CONTEXT *tdb, NET_USER_INFO_3 *user)
username should be in UTF-8 format
***********************************************************************/
-BOOL netsamlogon_cache_store( const char *username, NET_USER_INFO_3 *user )
+bool netsamlogon_cache_store( const char *username, NET_USER_INFO_3 *user )
{
TDB_DATA data;
fstring keystr;
prs_struct ps;
- BOOL result = False;
+ bool result = False;
DOM_SID user_sid;
time_t t = time(NULL);
TALLOC_CTX *mem_ctx;
@@ -234,11 +234,11 @@ NET_USER_INFO_3* netsamlogon_cache_get( TALLOC_CTX *mem_ctx, const DOM_SID *user
return user;
}
-BOOL netsamlogon_cache_have(const DOM_SID *user_sid)
+bool netsamlogon_cache_have(const DOM_SID *user_sid)
{
TALLOC_CTX *mem_ctx = talloc_init("netsamlogon_cache_have");
NET_USER_INFO_3 *user = NULL;
- BOOL result;
+ bool result;
if (!mem_ctx)
return False;
diff --git a/source3/libsmb/smb_share_modes.c b/source3/libsmb/smb_share_modes.c
index b0cfc765d1..16b3b10925 100644
--- a/source3/libsmb/smb_share_modes.c
+++ b/source3/libsmb/smb_share_modes.c
@@ -41,7 +41,7 @@ int smb_create_share_mode_entry_ex(struct smbdb_ctx *db_ctx, uint64_t dev,
uint64_t ino, const struct smb_share_mode_entry *new_entry,
const char *sharepath, const char *filename);
-static BOOL sharemodes_procid_equal(const struct server_id *p1, const struct server_id *p2)
+static bool sharemodes_procid_equal(const struct server_id *p1, const struct server_id *p2)
{
return (p1->pid == p2->pid);
}
diff --git a/source3/libsmb/smb_signing.c b/source3/libsmb/smb_signing.c
index c5b1d44586..1e150525ba 100644
--- a/source3/libsmb/smb_signing.c
+++ b/source3/libsmb/smb_signing.c
@@ -25,7 +25,7 @@ struct outstanding_packet_lookup {
struct outstanding_packet_lookup *prev, *next;
uint16 mid;
uint32 reply_seq_num;
- BOOL can_delete; /* Set to False in trans state. */
+ bool can_delete; /* Set to False in trans state. */
};
struct smb_basic_signing_context {
@@ -34,7 +34,7 @@ struct smb_basic_signing_context {
struct outstanding_packet_lookup *outstanding_packet_list;
};
-static BOOL store_sequence_for_reply(struct outstanding_packet_lookup **list,
+static bool store_sequence_for_reply(struct outstanding_packet_lookup **list,
uint16 mid, uint32 reply_seq_num)
{
struct outstanding_packet_lookup *t;
@@ -68,7 +68,7 @@ static BOOL store_sequence_for_reply(struct outstanding_packet_lookup **list,
return True;
}
-static BOOL get_sequence_for_reply(struct outstanding_packet_lookup **list,
+static bool get_sequence_for_reply(struct outstanding_packet_lookup **list,
uint16 mid, uint32 *reply_seq_num)
{
struct outstanding_packet_lookup *t;
@@ -88,7 +88,7 @@ static BOOL get_sequence_for_reply(struct outstanding_packet_lookup **list,
return False;
}
-static BOOL set_sequence_can_delete_flag(struct outstanding_packet_lookup **list, uint16 mid, BOOL can_delete_entry)
+static bool set_sequence_can_delete_flag(struct outstanding_packet_lookup **list, uint16 mid, bool can_delete_entry)
{
struct outstanding_packet_lookup *t;
@@ -105,7 +105,7 @@ static BOOL set_sequence_can_delete_flag(struct outstanding_packet_lookup **list
SMB signing - Common code before we set a new signing implementation
************************************************************/
-static BOOL cli_set_smb_signing_common(struct cli_state *cli)
+static bool cli_set_smb_signing_common(struct cli_state *cli)
{
if (!cli->sign_info.allow_smb_signing) {
return False;
@@ -134,7 +134,7 @@ static BOOL cli_set_smb_signing_common(struct cli_state *cli)
SMB signing - Common code for 'real' implementations
************************************************************/
-static BOOL set_smb_signing_real_common(struct smb_sign_info *si)
+static bool set_smb_signing_real_common(struct smb_sign_info *si)
{
if (si->mandatory_signing) {
DEBUG(5, ("Mandatory SMB signing enabled!\n"));
@@ -170,9 +170,9 @@ static void null_sign_outgoing_message(char *outbuf, struct smb_sign_info *si)
SMB signing - NULL implementation - check a MAC sent by server.
************************************************************/
-static BOOL null_check_incoming_message(const char *inbuf,
+static bool null_check_incoming_message(const char *inbuf,
struct smb_sign_info *si,
- BOOL must_be_ok)
+ bool must_be_ok)
{
return True;
}
@@ -193,7 +193,7 @@ static void null_free_signing_context(struct smb_sign_info *si)
shut down a real signing mechanism
*/
-static BOOL null_set_signing(struct smb_sign_info *si)
+static bool null_set_signing(struct smb_sign_info *si)
{
si->signing_context = NULL;
@@ -219,8 +219,8 @@ static void free_signing_context(struct smb_sign_info *si)
}
-static BOOL signing_good(const char *inbuf, struct smb_sign_info *si,
- BOOL good, uint32 seq, BOOL must_be_ok)
+static bool signing_good(const char *inbuf, struct smb_sign_info *si,
+ bool good, uint32 seq, bool must_be_ok)
{
if (good) {
@@ -378,11 +378,11 @@ static void client_sign_outgoing_message(char *outbuf, struct smb_sign_info *si)
SMB signing - Client implementation - check a MAC sent by server.
************************************************************/
-static BOOL client_check_incoming_message(const char *inbuf,
+static bool client_check_incoming_message(const char *inbuf,
struct smb_sign_info *si,
- BOOL must_be_ok)
+ bool must_be_ok)
{
- BOOL good;
+ bool good;
uint32 reply_seq_number;
unsigned char calc_md5_mac[16];
unsigned char *server_sent_mac;
@@ -465,7 +465,7 @@ static void simple_free_signing_context(struct smb_sign_info *si)
SMB signing - Simple implementation - setup the MAC key.
************************************************************/
-BOOL cli_simple_set_signing(struct cli_state *cli,
+bool cli_simple_set_signing(struct cli_state *cli,
const DATA_BLOB user_session_key,
const DATA_BLOB response)
{
@@ -536,8 +536,8 @@ static void temp_sign_outgoing_message(char *outbuf, struct smb_sign_info *si)
SMB signing - TEMP implementation - check a MAC sent by server.
************************************************************/
-static BOOL temp_check_incoming_message(const char *inbuf,
- struct smb_sign_info *si, BOOL foo)
+static bool temp_check_incoming_message(const char *inbuf,
+ struct smb_sign_info *si, bool foo)
{
return True;
}
@@ -555,7 +555,7 @@ static void temp_free_signing_context(struct smb_sign_info *si)
SMB signing - NULL implementation - setup the MAC key.
************************************************************/
-BOOL cli_null_set_signing(struct cli_state *cli)
+bool cli_null_set_signing(struct cli_state *cli)
{
return null_set_signing(&cli->sign_info);
}
@@ -564,7 +564,7 @@ BOOL cli_null_set_signing(struct cli_state *cli)
SMB signing - temp implementation - setup the MAC key.
************************************************************/
-BOOL cli_temp_set_signing(struct cli_state *cli)
+bool cli_temp_set_signing(struct cli_state *cli)
{
if (!cli_set_smb_signing_common(cli)) {
return False;
@@ -599,7 +599,7 @@ void cli_calculate_sign_mac(struct cli_state *cli)
* which had a bad checksum, True otherwise.
*/
-BOOL cli_check_sign_mac(struct cli_state *cli)
+bool cli_check_sign_mac(struct cli_state *cli)
{
if (!cli->sign_info.check_incoming_message(cli->inbuf, &cli->sign_info, True)) {
free_signing_context(&cli->sign_info);
@@ -612,7 +612,7 @@ BOOL cli_check_sign_mac(struct cli_state *cli)
Enter trans/trans2/nttrans state.
************************************************************/
-BOOL client_set_trans_sign_state_on(struct cli_state *cli, uint16 mid)
+bool client_set_trans_sign_state_on(struct cli_state *cli, uint16 mid)
{
struct smb_sign_info *si = &cli->sign_info;
struct smb_basic_signing_context *data = (struct smb_basic_signing_context *)si->signing_context;
@@ -636,7 +636,7 @@ BOOL client_set_trans_sign_state_on(struct cli_state *cli, uint16 mid)
Leave trans/trans2/nttrans state.
************************************************************/
-BOOL client_set_trans_sign_state_off(struct cli_state *cli, uint16 mid)
+bool client_set_trans_sign_state_off(struct cli_state *cli, uint16 mid)
{
uint32 reply_seq_num;
struct smb_sign_info *si = &cli->sign_info;
@@ -666,7 +666,7 @@ BOOL client_set_trans_sign_state_off(struct cli_state *cli, uint16 mid)
Is client signing on ?
************************************************************/
-BOOL client_is_signing_on(struct cli_state *cli)
+bool client_is_signing_on(struct cli_state *cli)
{
struct smb_sign_info *si = &cli->sign_info;
return si->doing_signing;
@@ -718,11 +718,11 @@ static void srv_sign_outgoing_message(char *outbuf, struct smb_sign_info *si)
SMB signing - Server implementation - check a MAC sent by server.
************************************************************/
-static BOOL srv_check_incoming_message(const char *inbuf,
+static bool srv_check_incoming_message(const char *inbuf,
struct smb_sign_info *si,
- BOOL must_be_ok)
+ bool must_be_ok)
{
- BOOL good;
+ bool good;
struct smb_basic_signing_context *data =
(struct smb_basic_signing_context *)si->signing_context;
uint32 reply_seq_number = data->send_seq_num;
@@ -801,9 +801,9 @@ static struct smb_sign_info srv_sign_info = {
Turn signing off or on for oplock break code.
************************************************************/
-BOOL srv_oplock_set_signing(BOOL onoff)
+bool srv_oplock_set_signing(bool onoff)
{
- BOOL ret = srv_sign_info.doing_signing;
+ bool ret = srv_sign_info.doing_signing;
srv_sign_info.doing_signing = onoff;
return ret;
}
@@ -812,7 +812,7 @@ BOOL srv_oplock_set_signing(BOOL onoff)
Called to validate an incoming packet from the client.
************************************************************/
-BOOL srv_check_sign_mac(const char *inbuf, BOOL must_be_ok)
+bool srv_check_sign_mac(const char *inbuf, bool must_be_ok)
{
/* Check if it's a session keepalive. */
if(CVAL(inbuf,0) == SMBkeepalive) {
@@ -908,7 +908,7 @@ void srv_set_signing_negotiated(void)
reads/writes if it is.
************************************************************/
-BOOL srv_is_signing_active(void)
+bool srv_is_signing_active(void)
{
return srv_sign_info.doing_signing;
}
@@ -919,7 +919,7 @@ BOOL srv_is_signing_active(void)
in the negprot.
************************************************************/
-BOOL srv_is_signing_negotiated(void)
+bool srv_is_signing_negotiated(void)
{
return srv_sign_info.negotiated_smb_signing;
}
@@ -928,7 +928,7 @@ BOOL srv_is_signing_negotiated(void)
Returns whether signing is actually happening
************************************************************/
-BOOL srv_signing_started(void)
+bool srv_signing_started(void)
{
struct smb_basic_signing_context *data;
diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c
index f536383f4e..20eddff722 100644
--- a/source3/libsmb/smbencrypt.c
+++ b/source3/libsmb/smbencrypt.c
@@ -49,9 +49,9 @@ void SMBencrypt_hash(const uchar lm_hash[16], const uchar *c8, uchar p24[24])
Returns False if password must have been truncated to create LM hash
*/
-BOOL SMBencrypt(const char *passwd, const uchar *c8, uchar p24[24])
+bool SMBencrypt(const char *passwd, const uchar *c8, uchar p24[24])
{
- BOOL ret;
+ bool ret;
uchar lm_hash[16];
ret = E_deshash(passwd, lm_hash);
@@ -107,9 +107,9 @@ void E_md5hash(const uchar salt[16], const uchar nthash[16], uchar hash_out[16])
* @note p16 is filled in regardless
*/
-BOOL E_deshash(const char *passwd, uchar p16[16])
+bool E_deshash(const char *passwd, uchar p16[16])
{
- BOOL ret = True;
+ bool ret = True;
fstring dospwd;
ZERO_STRUCT(dospwd);
@@ -159,9 +159,9 @@ void nt_lm_owf_gen(const char *pwd, uchar nt_p16[16], uchar p16[16])
}
/* Does both the NTLMv2 owfs of a user's password */
-BOOL ntv2_owf_gen(const uchar owf[16],
+bool ntv2_owf_gen(const uchar owf[16],
const char *user_in, const char *domain_in,
- BOOL upper_case_domain, /* Transform the domain into UPPER case */
+ bool upper_case_domain, /* Transform the domain into UPPER case */
uchar kr_buf[16])
{
smb_ucs2_t *user;
@@ -431,7 +431,7 @@ static DATA_BLOB LMv2_generate_response(const uchar ntlm_v2_hash[16],
return final_response;
}
-BOOL SMBNTLMv2encrypt_hash(const char *user, const char *domain, const uchar nt_hash[16],
+bool SMBNTLMv2encrypt_hash(const char *user, const char *domain, const uchar nt_hash[16],
const DATA_BLOB *server_chal,
const DATA_BLOB *names_blob,
DATA_BLOB *lm_response, DATA_BLOB *nt_response,
@@ -470,7 +470,7 @@ BOOL SMBNTLMv2encrypt_hash(const char *user, const char *domain, const uchar nt_
/* Plaintext version of the above. */
-BOOL SMBNTLMv2encrypt(const char *user, const char *domain, const char *password,
+bool SMBNTLMv2encrypt(const char *user, const char *domain, const char *password,
const DATA_BLOB *server_chal,
const DATA_BLOB *names_blob,
DATA_BLOB *lm_response, DATA_BLOB *nt_response,
@@ -490,7 +490,7 @@ BOOL SMBNTLMv2encrypt(const char *user, const char *domain, const char *password
encode a password buffer with a unicode password. The buffer
is filled with random data to make it harder to attack.
************************************************************/
-BOOL encode_pw_buffer(uint8 buffer[516], const char *password, int string_flags)
+bool encode_pw_buffer(uint8 buffer[516], const char *password, int string_flags)
{
uchar new_pw[512];
size_t new_pw_len;
@@ -522,7 +522,7 @@ BOOL encode_pw_buffer(uint8 buffer[516], const char *password, int string_flags)
returned password including termination.
************************************************************/
-BOOL decode_pw_buffer(uint8 in_buffer[516], char *new_pwrd,
+bool decode_pw_buffer(uint8 in_buffer[516], char *new_pwrd,
int new_pwrd_size, uint32 *new_pw_len,
int string_flags)
{
diff --git a/source3/libsmb/spnego.c b/source3/libsmb/spnego.c
index d69d25c0db..57b2d8060b 100644
--- a/source3/libsmb/spnego.c
+++ b/source3/libsmb/spnego.c
@@ -25,7 +25,7 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
-static BOOL read_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
+static bool read_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
{
ZERO_STRUCTP(token);
@@ -106,7 +106,7 @@ static BOOL read_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
return !asn1->has_error;
}
-static BOOL write_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
+static bool write_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
{
asn1_push_tag(asn1, ASN1_CONTEXT(0));
asn1_push_tag(asn1, ASN1_SEQUENCE(0));
@@ -169,7 +169,7 @@ static BOOL write_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
return !asn1->has_error;
}
-static BOOL read_negTokenTarg(ASN1_DATA *asn1, negTokenTarg_t *token)
+static bool read_negTokenTarg(ASN1_DATA *asn1, negTokenTarg_t *token)
{
ZERO_STRUCTP(token);
@@ -212,7 +212,7 @@ static BOOL read_negTokenTarg(ASN1_DATA *asn1, negTokenTarg_t *token)
return !asn1->has_error;
}
-static BOOL write_negTokenTarg(ASN1_DATA *asn1, negTokenTarg_t *token)
+static bool write_negTokenTarg(ASN1_DATA *asn1, negTokenTarg_t *token)
{
asn1_push_tag(asn1, ASN1_CONTEXT(1));
asn1_push_tag(asn1, ASN1_SEQUENCE(0));
@@ -311,9 +311,9 @@ ssize_t write_spnego_data(DATA_BLOB *blob, SPNEGO_DATA *spnego)
return ret;
}
-BOOL free_spnego_data(SPNEGO_DATA *spnego)
+bool free_spnego_data(SPNEGO_DATA *spnego)
{
- BOOL ret = True;
+ bool ret = True;
if (!spnego) goto out;
diff --git a/source3/libsmb/trustdom_cache.c b/source3/libsmb/trustdom_cache.c
index 37ad85ce0c..f350cd0bc8 100644
--- a/source3/libsmb/trustdom_cache.c
+++ b/source3/libsmb/trustdom_cache.c
@@ -47,7 +47,7 @@
* false if cache init failed
**/
-BOOL trustdom_cache_enable(void)
+bool trustdom_cache_enable(void)
{
/* Init trustdom cache by calling gencache initialisation */
if (!gencache_init()) {
@@ -67,7 +67,7 @@ BOOL trustdom_cache_enable(void)
* false if it failed
**/
-BOOL trustdom_cache_shutdown(void)
+bool trustdom_cache_shutdown(void)
{
/* Close trustdom cache by calling gencache shutdown */
if (!gencache_shutdown()) {
@@ -108,12 +108,12 @@ static char* trustdom_cache_key(const char* name)
* false if store attempt failed
**/
-BOOL trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid,
+bool trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid,
time_t timeout)
{
char *key, *alt_key;
fstring sid_string;
- BOOL ret;
+ bool ret;
/*
* we use gecache call to avoid annoying debug messages
@@ -161,7 +161,7 @@ BOOL trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid,
* false if has expired/doesn't exist
**/
-BOOL trustdom_cache_fetch(const char* name, DOM_SID* sid)
+bool trustdom_cache_fetch(const char* name, DOM_SID* sid)
{
char *key = NULL, *value = NULL;
time_t timeout;
@@ -230,7 +230,7 @@ uint32 trustdom_cache_fetch_timestamp( void )
store the timestamp from the last update
*******************************************************************/
-BOOL trustdom_cache_store_timestamp( uint32 t, time_t timeout )
+bool trustdom_cache_store_timestamp( uint32 t, time_t timeout )
{
fstring value;
diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c
index 0922f9f41e..e82d24426d 100644
--- a/source3/libsmb/trusts_util.c
+++ b/source3/libsmb/trusts_util.c
@@ -140,7 +140,7 @@ NTSTATUS trust_pw_find_change_and_store_it(struct rpc_pipe_client *cli,
Enumerate the list of trusted domains from a DC
*********************************************************************/
-BOOL enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain,
+bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain,
char ***domain_names, uint32 *num_domains,
DOM_SID **sids )
{
@@ -151,7 +151,7 @@ BOOL enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain,
uint32 enum_ctx = 0;
struct cli_state *cli = NULL;
struct rpc_pipe_client *lsa_pipe;
- BOOL retry;
+ bool retry;
*domain_names = NULL;
*num_domains = 0;