summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-10-06 22:10:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:54 -0500
commit0c56f8dac31c51a42dedf2a1da9fd76896855b19 (patch)
tree59d4dfa169bc9b5bd20a8dc31dd40f4fa6259f04
parent734aaefd34016cc422287aafe6689f19892bd3a6 (diff)
downloadsamba-0c56f8dac31c51a42dedf2a1da9fd76896855b19.tar.gz
samba-0c56f8dac31c51a42dedf2a1da9fd76896855b19.tar.bz2
samba-0c56f8dac31c51a42dedf2a1da9fd76896855b19.zip
r25551: Convert to standard bool type.
(This used to be commit c9651e2c5c078edee7b91085e936a93625c8d708)
-rw-r--r--source4/smb_server/smb/negprot.c8
-rw-r--r--source4/smb_server/smb/reply.c6
-rw-r--r--source4/smb_server/smb/request.c16
-rw-r--r--source4/smb_server/smb/search.c8
-rw-r--r--source4/smb_server/smb/sesssetup.c6
-rw-r--r--source4/smb_server/smb/signing.c38
-rw-r--r--source4/smb_server/smb/trans2.c6
-rw-r--r--source4/smb_server/smb2/fileinfo.c8
-rw-r--r--source4/smb_server/smb2/fileio.c32
-rw-r--r--source4/smb_server/smb2/find.c10
-rw-r--r--source4/smb_server/smb2/keepalive.c2
-rw-r--r--source4/smb_server/smb2/negprot.c2
-rw-r--r--source4/smb_server/smb2/receive.c6
-rw-r--r--source4/smb_server/smb2/sesssetup.c8
-rw-r--r--source4/smb_server/smb2/tcon.c10
15 files changed, 83 insertions, 83 deletions
diff --git a/source4/smb_server/smb/negprot.c b/source4/smb_server/smb/negprot.c
index 835aa67302..de70dfe5f6 100644
--- a/source4/smb_server/smb/negprot.c
+++ b/source4/smb_server/smb/negprot.c
@@ -251,7 +251,7 @@ static void reply_nt1(struct smbsrv_request *req, uint16_t choice)
int secword=0;
time_t t = req->request_time.tv_sec;
NTTIME nttime;
- BOOL negotiate_spnego = False;
+ bool negotiate_spnego = false;
char *large_test_path;
unix_to_nt_time(&nttime, t);
@@ -269,7 +269,7 @@ static void reply_nt1(struct smbsrv_request *req, uint16_t choice)
(lp_security(global_loadparm) != SEC_SHARE) &&
lp_use_spnego(global_loadparm) &&
(req->flags2 & FLAGS2_EXTENDED_SECURITY)) {
- negotiate_spnego = True;
+ negotiate_spnego = true;
capabilities |= CAP_EXTENDED_SECURITY;
}
@@ -493,10 +493,10 @@ void smbsrv_reply_negprot(struct smbsrv_request *req)
smbsrv_terminate_connection(req->smb_conn, "multiple negprot's are not permitted");
return;
}
- req->smb_conn->negotiate.done_negprot = True;
+ req->smb_conn->negotiate.done_negprot = true;
p = req->in.data;
- while (True) {
+ while (true) {
size_t len;
protos = talloc_realloc(req, protos, char *, protos_count + 1);
diff --git a/source4/smb_server/smb/reply.c b/source4/smb_server/smb/reply.c
index 47963a205f..aff0587bc6 100644
--- a/source4/smb_server/smb/reply.c
+++ b/source4/smb_server/smb/reply.c
@@ -824,9 +824,9 @@ void smbsrv_reply_read_and_X(struct smbsrv_request *req)
io->readx.in.mincnt = SVAL(req->in.vwv, VWV(6));
io->readx.in.remaining = SVAL(req->in.vwv, VWV(9));
if (req->flags2 & FLAGS2_READ_PERMIT_EXECUTE) {
- io->readx.in.read_for_execute = True;
+ io->readx.in.read_for_execute = true;
} else {
- io->readx.in.read_for_execute = False;
+ io->readx.in.read_for_execute = false;
}
if (req->smb_conn->negotiate.client_caps & CAP_LARGE_READX) {
@@ -2272,7 +2272,7 @@ static NTSTATUS parse_session_request(struct smbsrv_request *req)
req->smb_conn->negotiate.calling_name);
NT_STATUS_NOT_OK_RETURN(status);
- req->smb_conn->negotiate.done_nbt_session = True;
+ req->smb_conn->negotiate.done_nbt_session = true;
return NT_STATUS_OK;
}
diff --git a/source4/smb_server/smb/request.c b/source4/smb_server/smb/request.c
index b882e8d5c8..da8d1e2d05 100644
--- a/source4/smb_server/smb/request.c
+++ b/source4/smb_server/smb/request.c
@@ -614,25 +614,25 @@ size_t req_pull_ascii4(struct smbsrv_request *req, const char **dest, const uint
/*
pull a DATA_BLOB from a request packet, returning a talloced blob
- return False if any part is outside the data portion of the packet
+ return false if any part is outside the data portion of the packet
*/
-BOOL req_pull_blob(struct smbsrv_request *req, const uint8_t *src, int len, DATA_BLOB *blob)
+bool req_pull_blob(struct smbsrv_request *req, const uint8_t *src, int len, DATA_BLOB *blob)
{
if (len != 0 && req_data_oob(req, src, len)) {
- return False;
+ return false;
}
(*blob) = data_blob_talloc(req, src, len);
- return True;
+ return true;
}
/* check that a lump of data in a request is within the bounds of the data section of
the packet */
-BOOL req_data_oob(struct smbsrv_request *req, const uint8_t *ptr, uint32_t count)
+bool req_data_oob(struct smbsrv_request *req, const uint8_t *ptr, uint32_t count)
{
if (count == 0) {
- return False;
+ return false;
}
/* be careful with wraparound! */
@@ -640,9 +640,9 @@ BOOL req_data_oob(struct smbsrv_request *req, const uint8_t *ptr, uint32_t count
ptr >= req->in.data + req->in.data_size ||
count > req->in.data_size ||
ptr + count > req->in.data + req->in.data_size) {
- return True;
+ return true;
}
- return False;
+ return false;
}
diff --git a/source4/smb_server/smb/search.c b/source4/smb_server/smb/search.c
index 000f21ee24..ccf2ff7365 100644
--- a/source4/smb_server/smb/search.c
+++ b/source4/smb_server/smb/search.c
@@ -37,13 +37,13 @@ struct search_state {
/*
fill a single entry in a search find reply
*/
-static BOOL find_fill_info(struct smbsrv_request *req,
+static bool find_fill_info(struct smbsrv_request *req,
const union smb_search_data *file)
{
uint8_t *p;
if (req->out.data_size + 43 > req_max_data(req)) {
- return False;
+ return false;
}
req_grow_data(req, req->out.data_size + 43);
@@ -61,11 +61,11 @@ static BOOL find_fill_info(struct smbsrv_request *req,
memcpy(p+30, file->search.name, MIN(strlen(file->search.name)+1, 12));
SCVAL(p,42,0);
- return True;
+ return true;
}
/* callback function for search first/next */
-static BOOL find_callback(void *private, const union smb_search_data *file)
+static bool find_callback(void *private, const union smb_search_data *file)
{
struct search_state *state = (struct search_state *)private;
diff --git a/source4/smb_server/smb/sesssetup.c b/source4/smb_server/smb/sesssetup.c
index 29d14016e7..57e2f28b8a 100644
--- a/source4/smb_server/smb/sesssetup.c
+++ b/source4/smb_server/smb/sesssetup.c
@@ -48,7 +48,7 @@ static void smbsrv_sesssetup_backend_send(struct smbsrv_request *req,
NTSTATUS status)
{
if (NT_STATUS_IS_OK(status)) {
- req->smb_conn->negotiate.done_sesssetup = True;
+ req->smb_conn->negotiate.done_sesssetup = true;
/* we need to keep the session long term */
req->session = talloc_steal(req->smb_conn, req->session);
}
@@ -129,7 +129,7 @@ static void sesssetup_old(struct smbsrv_request *req, union smb_sesssetup *sess)
user_info = talloc(req, struct auth_usersupplied_info);
if (!user_info) goto nomem;
- user_info->mapped_state = False;
+ user_info->mapped_state = false;
user_info->logon_parameters = 0;
user_info->flags = 0;
user_info->client.account_name = sess->old.in.user;
@@ -266,7 +266,7 @@ static void sesssetup_nt1(struct smbsrv_request *req, union smb_sesssetup *sess)
user_info = talloc(req, struct auth_usersupplied_info);
if (!user_info) goto nomem;
- user_info->mapped_state = False;
+ user_info->mapped_state = false;
user_info->logon_parameters = 0;
user_info->flags = 0;
user_info->client.account_name = sess->nt1.in.user;
diff --git a/source4/smb_server/smb/signing.c b/source4/smb_server/smb/signing.c
index eaffaa33dd..b91a65ab84 100644
--- a/source4/smb_server/smb/signing.c
+++ b/source4/smb_server/smb/signing.c
@@ -63,12 +63,12 @@ void smbsrv_sign_packet(struct smbsrv_request *req)
setup the signing key for a connection. Called after authentication succeeds
in a session setup
*/
-BOOL smbsrv_setup_signing(struct smbsrv_connection *smb_conn,
+bool smbsrv_setup_signing(struct smbsrv_connection *smb_conn,
DATA_BLOB *session_key,
DATA_BLOB *response)
{
if (!set_smb_signing_common(&smb_conn->signing)) {
- return False;
+ return false;
}
return smbcli_simple_set_signing(smb_conn,
&smb_conn->signing, session_key, response);
@@ -90,38 +90,38 @@ void smbsrv_signing_restart(struct smbsrv_connection *smb_conn,
* pretend we have seen a
* valid packet, so we don't
* turn it off */
- smb_conn->signing.seen_valid = True;
+ smb_conn->signing.seen_valid = true;
}
}
}
-BOOL smbsrv_init_signing(struct smbsrv_connection *smb_conn)
+bool smbsrv_init_signing(struct smbsrv_connection *smb_conn)
{
smb_conn->signing.mac_key = data_blob(NULL, 0);
if (!smbcli_set_signing_off(&smb_conn->signing)) {
- return False;
+ return false;
}
switch (lp_server_signing(global_loadparm)) {
case SMB_SIGNING_OFF:
- smb_conn->signing.allow_smb_signing = False;
+ smb_conn->signing.allow_smb_signing = false;
break;
case SMB_SIGNING_SUPPORTED:
- smb_conn->signing.allow_smb_signing = True;
+ smb_conn->signing.allow_smb_signing = true;
break;
case SMB_SIGNING_REQUIRED:
- smb_conn->signing.allow_smb_signing = True;
- smb_conn->signing.mandatory_signing = True;
+ smb_conn->signing.allow_smb_signing = true;
+ smb_conn->signing.mandatory_signing = true;
break;
case SMB_SIGNING_AUTO:
if (lp_domain_logons(global_loadparm)) {
- smb_conn->signing.allow_smb_signing = True;
+ smb_conn->signing.allow_smb_signing = true;
} else {
- smb_conn->signing.allow_smb_signing = False;
+ smb_conn->signing.allow_smb_signing = false;
}
break;
}
- return True;
+ return true;
}
/*
@@ -151,24 +151,24 @@ void smbsrv_signing_no_reply(struct smbsrv_request *req)
************************************************************/
/**
* Check a packet supplied by the server.
- * @return False if we had an established signing connection
- * which had a back checksum, True otherwise
+ * @return false if we had an established signing connection
+ * which had a back checksum, true otherwise
*/
-BOOL smbsrv_signing_check_incoming(struct smbsrv_request *req)
+bool smbsrv_signing_check_incoming(struct smbsrv_request *req)
{
- BOOL good;
+ bool good;
req_signing_alloc_seq_num(req);
switch (req->smb_conn->signing.signing_state)
{
case SMB_SIGNING_ENGINE_OFF:
- return True;
+ return true;
case SMB_SIGNING_ENGINE_BSRSPYL:
case SMB_SIGNING_ENGINE_ON:
{
if (req->in.size < (HDR_SS_FIELD + 8)) {
- return False;
+ return false;
} else {
good = check_signed_incoming_message(&req->in,
&req->smb_conn->signing.mac_key,
@@ -179,5 +179,5 @@ BOOL smbsrv_signing_check_incoming(struct smbsrv_request *req)
}
}
}
- return False;
+ return false;
}
diff --git a/source4/smb_server/smb/trans2.c b/source4/smb_server/smb/trans2.c
index 75a03fbe79..45ea234d09 100644
--- a/source4/smb_server/smb/trans2.c
+++ b/source4/smb_server/smb/trans2.c
@@ -790,7 +790,7 @@ static NTSTATUS find_fill_info(struct find_state *state,
}
/* callback function for trans2 findfirst/findnext */
-static BOOL find_callback(void *private, const union smb_search_data *file)
+static bool find_callback(void *private, const union smb_search_data *file)
{
struct find_state *state = talloc_get_type(private, struct find_state);
struct smb_trans2 *trans = state->op->trans;
@@ -802,11 +802,11 @@ static BOOL find_callback(void *private, const union smb_search_data *file)
trans->out.data.length > trans->in.max_data) {
/* restore the old length and tell the backend to stop */
smbsrv_blob_grow_data(trans, &trans->out.data, old_length);
- return False;
+ return false;
}
state->last_entry_offset = old_length;
- return True;
+ return true;
}
/*
diff --git a/source4/smb_server/smb2/fileinfo.c b/source4/smb_server/smb2/fileinfo.c
index 4f4b790702..41b31f586f 100644
--- a/source4/smb_server/smb2/fileinfo.c
+++ b/source4/smb_server/smb2/fileinfo.c
@@ -53,7 +53,7 @@ static void smb2srv_getinfo_send(struct ntvfs_request *ntvfs)
SMB2SRV_CHECK(op->send_fn(op));
}
- SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x08, True, op->info->out.blob.length));
+ SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x08, true, op->info->out.blob.length));
/* TODO: this is maybe a o16s32_blob */
SMB2SRV_CHECK(smb2_push_o16s16_blob(&req->out, 0x02, op->info->out.blob));
@@ -205,7 +205,7 @@ void smb2srv_getinfo_recv(struct smb2srv_request *req)
struct smb2_getinfo *info;
struct smb2srv_getinfo_op *op;
- SMB2SRV_CHECK_BODY_SIZE(req, 0x28, True);
+ SMB2SRV_CHECK_BODY_SIZE(req, 0x28, true);
SMB2SRV_TALLOC_IO_PTR(info, struct smb2_getinfo);
/* this overwrites req->io_ptr !*/
SMB2SRV_TALLOC_IO_PTR(op, struct smb2srv_getinfo_op);
@@ -247,7 +247,7 @@ static void smb2srv_setinfo_send(struct ntvfs_request *ntvfs)
SMB2SRV_CHECK_ASYNC_STATUS(op, struct smb2srv_setinfo_op);
- SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x02, False, 0));
+ SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x02, false, 0));
smb2srv_send_reply(req);
}
@@ -349,7 +349,7 @@ void smb2srv_setinfo_recv(struct smb2srv_request *req)
struct smb2_setinfo *info;
struct smb2srv_setinfo_op *op;
- SMB2SRV_CHECK_BODY_SIZE(req, 0x20, True);
+ SMB2SRV_CHECK_BODY_SIZE(req, 0x20, true);
SMB2SRV_TALLOC_IO_PTR(info, struct smb2_setinfo);
/* this overwrites req->io_ptr !*/
SMB2SRV_TALLOC_IO_PTR(op, struct smb2srv_setinfo_op);
diff --git a/source4/smb_server/smb2/fileio.c b/source4/smb_server/smb2/fileio.c
index 3e4d7ffceb..47b5dbe60c 100644
--- a/source4/smb_server/smb2/fileio.c
+++ b/source4/smb_server/smb2/fileio.c
@@ -31,7 +31,7 @@ static void smb2srv_create_send(struct ntvfs_request *ntvfs)
union smb_open *io;
SMB2SRV_CHECK_ASYNC_STATUS(io, union smb_open);
- SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x58, True, io->smb2.out.blob.length));
+ SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x58, true, io->smb2.out.blob.length));
SSVAL(req->out.body, 0x02, io->smb2.out.oplock_flags);
SIVAL(req->out.body, 0x04, io->smb2.out.create_action);
@@ -58,7 +58,7 @@ void smb2srv_create_recv(struct smb2srv_request *req)
union smb_open *io;
DATA_BLOB blob;
- SMB2SRV_CHECK_BODY_SIZE(req, 0x38, True);
+ SMB2SRV_CHECK_BODY_SIZE(req, 0x38, true);
SMB2SRV_TALLOC_IO_PTR(io, union smb_open);
SMB2SRV_SETUP_NTVFS_REQUEST(smb2srv_create_send, NTVFS_ASYNC_STATE_MAY_ASYNC);
@@ -88,7 +88,7 @@ static void smb2srv_close_send(struct ntvfs_request *ntvfs)
union smb_close *io;
SMB2SRV_CHECK_ASYNC_STATUS(io, union smb_close);
- SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x3C, False, 0));
+ SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x3C, false, 0));
SSVAL(req->out.body, 0x02, io->smb2.out.flags);
SIVAL(req->out.body, 0x04, io->smb2.out._pad);
@@ -107,7 +107,7 @@ void smb2srv_close_recv(struct smb2srv_request *req)
{
union smb_close *io;
- SMB2SRV_CHECK_BODY_SIZE(req, 0x18, False);
+ SMB2SRV_CHECK_BODY_SIZE(req, 0x18, false);
SMB2SRV_TALLOC_IO_PTR(io, union smb_close);
SMB2SRV_SETUP_NTVFS_REQUEST(smb2srv_close_send, NTVFS_ASYNC_STATE_MAY_ASYNC);
@@ -126,7 +126,7 @@ static void smb2srv_flush_send(struct ntvfs_request *ntvfs)
union smb_flush *io;
SMB2SRV_CHECK_ASYNC_STATUS(io, union smb_flush);
- SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x04, False, 0));
+ SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x04, false, 0));
SSVAL(req->out.body, 0x02, 0);
@@ -138,7 +138,7 @@ void smb2srv_flush_recv(struct smb2srv_request *req)
union smb_flush *io;
uint16_t _pad;
- SMB2SRV_CHECK_BODY_SIZE(req, 0x18, False);
+ SMB2SRV_CHECK_BODY_SIZE(req, 0x18, false);
SMB2SRV_TALLOC_IO_PTR(io, union smb_flush);
SMB2SRV_SETUP_NTVFS_REQUEST(smb2srv_flush_send, NTVFS_ASYNC_STATE_MAY_ASYNC);
@@ -157,7 +157,7 @@ static void smb2srv_read_send(struct ntvfs_request *ntvfs)
union smb_read *io;
SMB2SRV_CHECK_ASYNC_STATUS(io, union smb_read);
- SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x10, True, io->smb2.out.data.length));
+ SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x10, true, io->smb2.out.data.length));
/* TODO: avoid the memcpy */
SMB2SRV_CHECK(smb2_push_o16s32_blob(&req->out, 0x02, io->smb2.out.data));
@@ -170,7 +170,7 @@ void smb2srv_read_recv(struct smb2srv_request *req)
{
union smb_read *io;
- SMB2SRV_CHECK_BODY_SIZE(req, 0x30, True);
+ SMB2SRV_CHECK_BODY_SIZE(req, 0x30, true);
SMB2SRV_TALLOC_IO_PTR(io, union smb_read);
SMB2SRV_SETUP_NTVFS_REQUEST(smb2srv_read_send, NTVFS_ASYNC_STATE_MAY_ASYNC);
@@ -199,7 +199,7 @@ static void smb2srv_write_send(struct ntvfs_request *ntvfs)
union smb_write *io;
SMB2SRV_CHECK_ASYNC_STATUS(io, union smb_write);
- SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x10, True, 0));
+ SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x10, true, 0));
SSVAL(req->out.body, 0x02, io->smb2.out._pad);
SIVAL(req->out.body, 0x04, io->smb2.out.nwritten);
@@ -212,7 +212,7 @@ void smb2srv_write_recv(struct smb2srv_request *req)
{
union smb_write *io;
- SMB2SRV_CHECK_BODY_SIZE(req, 0x30, True);
+ SMB2SRV_CHECK_BODY_SIZE(req, 0x30, true);
SMB2SRV_TALLOC_IO_PTR(io, union smb_write);
SMB2SRV_SETUP_NTVFS_REQUEST(smb2srv_write_send, NTVFS_ASYNC_STATE_MAY_ASYNC);
@@ -234,7 +234,7 @@ static void smb2srv_lock_send(struct ntvfs_request *ntvfs)
union smb_lock *io;
SMB2SRV_CHECK_ASYNC_STATUS_ERR(io, union smb_lock);
- SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x04, False, 0));
+ SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x04, false, 0));
SSVAL(req->out.body, 0x02, io->smb2.out.unknown1);
@@ -245,7 +245,7 @@ void smb2srv_lock_recv(struct smb2srv_request *req)
{
union smb_lock *io;
- SMB2SRV_CHECK_BODY_SIZE(req, 0x30, False);
+ SMB2SRV_CHECK_BODY_SIZE(req, 0x30, false);
SMB2SRV_TALLOC_IO_PTR(io, union smb_lock);
SMB2SRV_SETUP_NTVFS_REQUEST(smb2srv_lock_send, NTVFS_ASYNC_STATE_MAY_ASYNC);
@@ -269,7 +269,7 @@ static void smb2srv_ioctl_send(struct ntvfs_request *ntvfs)
union smb_ioctl *io;
SMB2SRV_CHECK_ASYNC_STATUS_ERR(io, union smb_ioctl);
- SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x30, True, 0));
+ SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x30, true, 0));
SSVAL(req->out.body, 0x02, io->smb2.out._pad);
SIVAL(req->out.body, 0x04, io->smb2.out.function);
@@ -294,7 +294,7 @@ void smb2srv_ioctl_recv(struct smb2srv_request *req)
union smb_ioctl *io;
struct smb2_handle h;
- SMB2SRV_CHECK_BODY_SIZE(req, 0x38, True);
+ SMB2SRV_CHECK_BODY_SIZE(req, 0x38, true);
SMB2SRV_TALLOC_IO_PTR(io, union smb_ioctl);
SMB2SRV_SETUP_NTVFS_REQUEST(smb2srv_ioctl_send, NTVFS_ASYNC_STATE_MAY_ASYNC);
@@ -330,7 +330,7 @@ static void smb2srv_notify_send(struct ntvfs_request *ntvfs)
DATA_BLOB blob = data_blob(NULL, 0);
SMB2SRV_CHECK_ASYNC_STATUS(io, union smb_notify);
- SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x08, True, 0));
+ SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x08, true, 0));
#define MAX_BYTES_PER_CHAR 3
@@ -384,7 +384,7 @@ void smb2srv_notify_recv(struct smb2srv_request *req)
{
union smb_notify *io;
- SMB2SRV_CHECK_BODY_SIZE(req, 0x20, False);
+ SMB2SRV_CHECK_BODY_SIZE(req, 0x20, false);
SMB2SRV_TALLOC_IO_PTR(io, union smb_notify);
SMB2SRV_SETUP_NTVFS_REQUEST(smb2srv_notify_send, NTVFS_ASYNC_STATE_MAY_ASYNC);
diff --git a/source4/smb_server/smb2/find.c b/source4/smb_server/smb2/find.c
index 9ab62c35f5..c594adf7a0 100644
--- a/source4/smb_server/smb2/find.c
+++ b/source4/smb_server/smb2/find.c
@@ -40,7 +40,7 @@ struct smb2srv_find_state {
};
/* callback function for SMB2 Find */
-static BOOL smb2srv_find_callback(void *private, const union smb_search_data *file)
+static bool smb2srv_find_callback(void *private, const union smb_search_data *file)
{
struct smb2srv_find_state *state = talloc_get_type(private, struct smb2srv_find_state);
struct smb2_find *info = state->info;
@@ -54,12 +54,12 @@ static BOOL smb2srv_find_callback(void *private, const union smb_search_data *fi
info->out.blob.length > info->in.max_response_size) {
/* restore the old length and tell the backend to stop */
smbsrv_blob_grow_data(state, &info->out.blob, old_length);
- return False;
+ return false;
}
state->last_entry_offset = old_length;
- return True;
+ return true;
}
static void smb2srv_find_send(struct ntvfs_request *ntvfs)
@@ -68,7 +68,7 @@ static void smb2srv_find_send(struct ntvfs_request *ntvfs)
struct smb2srv_find_state *state;
SMB2SRV_CHECK_ASYNC_STATUS(state, struct smb2srv_find_state);
- SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x08, True, state->info->out.blob.length));
+ SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x08, true, state->info->out.blob.length));
if (state->info->out.blob.length > 0) {
SIVAL(state->info->out.blob.data + state->last_entry_offset, 0, 0);
@@ -141,7 +141,7 @@ void smb2srv_find_recv(struct smb2srv_request *req)
struct smb2srv_find_state *state;
struct smb2_find *info;
- SMB2SRV_CHECK_BODY_SIZE(req, 0x20, True);
+ SMB2SRV_CHECK_BODY_SIZE(req, 0x20, true);
SMB2SRV_TALLOC_IO_PTR(info, struct smb2_find);
/* this overwrites req->io_ptr !*/
SMB2SRV_TALLOC_IO_PTR(state, struct smb2srv_find_state);
diff --git a/source4/smb_server/smb2/keepalive.c b/source4/smb_server/smb2/keepalive.c
index ed4903ec29..f40bcc485c 100644
--- a/source4/smb_server/smb2/keepalive.c
+++ b/source4/smb_server/smb2/keepalive.c
@@ -38,7 +38,7 @@ static void smb2srv_keepalive_send(struct smb2srv_request *req)
return;
}
- status = smb2srv_setup_reply(req, 0x04, False, 0);
+ status = smb2srv_setup_reply(req, 0x04, false, 0);
if (!NT_STATUS_IS_OK(status)) {
smbsrv_terminate_connection(req->smb_conn, nt_errstr(status));
talloc_free(req);
diff --git a/source4/smb_server/smb2/negprot.c b/source4/smb_server/smb2/negprot.c
index 3035f77396..78c17aa03e 100644
--- a/source4/smb_server/smb2/negprot.c
+++ b/source4/smb_server/smb2/negprot.c
@@ -122,7 +122,7 @@ static void smb2srv_negprot_send(struct smb2srv_request *req, struct smb2_negpro
return;
}
- status = smb2srv_setup_reply(req, 0x40, True, io->out.secblob.length);
+ status = smb2srv_setup_reply(req, 0x40, true, io->out.secblob.length);
if (!NT_STATUS_IS_OK(status)) {
smbsrv_terminate_connection(req->smb_conn, nt_errstr(status));
talloc_free(req);
diff --git a/source4/smb_server/smb2/receive.c b/source4/smb_server/smb2/receive.c
index 31b7f72cca..a440c33dc0 100644
--- a/source4/smb_server/smb2/receive.c
+++ b/source4/smb_server/smb2/receive.c
@@ -59,7 +59,7 @@ struct smb2srv_request *smb2srv_init_request(struct smbsrv_connection *smb_conn)
}
NTSTATUS smb2srv_setup_reply(struct smb2srv_request *req, uint16_t body_fixed_size,
- BOOL body_dynamic_present, uint32_t body_dynamic_size)
+ bool body_dynamic_present, uint32_t body_dynamic_size)
{
uint32_t flags = 0x00000001;
uint32_t pid = IVAL(req->in.hdr, SMB2_HDR_PID);
@@ -237,7 +237,7 @@ void smb2srv_send_error(struct smb2srv_request *req, NTSTATUS error)
return;
}
- status = smb2srv_setup_reply(req, 8, True, 0);
+ status = smb2srv_setup_reply(req, 8, true, 0);
if (!NT_STATUS_IS_OK(status)) {
smbsrv_terminate_connection(req->smb_conn, nt_errstr(status));
talloc_free(req);
@@ -521,7 +521,7 @@ NTSTATUS smbsrv_init_smb2_connection(struct smbsrv_connection *smb_conn)
smb_conn->negotiate.zone_offset = get_time_zone(time(NULL));
smb_conn->config.security = SEC_USER;
- smb_conn->config.nt_status_support = True;
+ smb_conn->config.nt_status_support = true;
status = smbsrv_init_sessions(smb_conn, UINT64_MAX);
NT_STATUS_NOT_OK_RETURN(status);
diff --git a/source4/smb_server/smb2/sesssetup.c b/source4/smb_server/smb2/sesssetup.c
index 76f89d43d2..7d72193e6e 100644
--- a/source4/smb_server/smb2/sesssetup.c
+++ b/source4/smb_server/smb2/sesssetup.c
@@ -42,7 +42,7 @@ static void smb2srv_sesssetup_send(struct smb2srv_request *req, union smb_sessse
return;
}
- SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x08, True, io->smb2.out.secblob.length));
+ SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x08, true, io->smb2.out.secblob.length));
SSVAL(req->out.hdr, SMB2_HDR_UNKNOWN1, unknown1);
SBVAL(req->out.hdr, SMB2_HDR_UID, io->smb2.out.uid);
@@ -187,7 +187,7 @@ void smb2srv_sesssetup_recv(struct smb2srv_request *req)
{
union smb_sesssetup *io;
- SMB2SRV_CHECK_BODY_SIZE(req, 0x18, True);
+ SMB2SRV_CHECK_BODY_SIZE(req, 0x18, true);
SMB2SRV_TALLOC_IO_PTR(io, union smb_sesssetup);
io->smb2.level = RAW_SESSSETUP_SMB2;
@@ -215,7 +215,7 @@ static void smb2srv_logoff_send(struct smb2srv_request *req)
return;
}
- SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x04, False, 0));
+ SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x04, false, 0));
SSVAL(req->out.body, 0x02, 0);
@@ -226,7 +226,7 @@ void smb2srv_logoff_recv(struct smb2srv_request *req)
{
uint16_t _pad;
- SMB2SRV_CHECK_BODY_SIZE(req, 0x04, False);
+ SMB2SRV_CHECK_BODY_SIZE(req, 0x04, false);
_pad = SVAL(req->in.body, 0x02);
diff --git a/source4/smb_server/smb2/tcon.c b/source4/smb_server/smb2/tcon.c
index 6d7e19e470..572d3b5bf5 100644
--- a/source4/smb_server/smb2/tcon.c
+++ b/source4/smb_server/smb2/tcon.c
@@ -70,7 +70,7 @@ static NTSTATUS smb2srv_send_oplock_break(void *p, struct ntvfs_handle *h, uint8
SSVAL(req->in.body, 0, 2);
- status = smb2srv_setup_reply(req, 0x18, False, 0);
+ status = smb2srv_setup_reply(req, 0x18, false, 0);
NT_STATUS_NOT_OK_RETURN(status);
SSVAL(req->out.hdr, SMB2_HDR_UNKNOWN1, 0x0000);
@@ -372,7 +372,7 @@ static void smb2srv_tcon_send(struct smb2srv_request *req, union smb_tcon *io)
unknown1 = 0x0001;
}
- SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x10, False, 0));
+ SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x10, false, 0));
SIVAL(req->out.hdr, SMB2_HDR_TID, io->smb2.out.tid);
SSVAL(req->out.hdr, SMB2_HDR_UNKNOWN1,unknown1);
@@ -389,7 +389,7 @@ void smb2srv_tcon_recv(struct smb2srv_request *req)
{
union smb_tcon *io;
- SMB2SRV_CHECK_BODY_SIZE(req, 0x08, True);
+ SMB2SRV_CHECK_BODY_SIZE(req, 0x08, true);
SMB2SRV_TALLOC_IO_PTR(io, union smb_tcon);
io->smb2.level = RAW_TCON_SMB2;
@@ -422,7 +422,7 @@ static void smb2srv_tdis_send(struct smb2srv_request *req)
return;
}
- status = smb2srv_setup_reply(req, 0x04, False, 0);
+ status = smb2srv_setup_reply(req, 0x04, false, 0);
if (!NT_STATUS_IS_OK(status)) {
smbsrv_terminate_connection(req->smb_conn, nt_errstr(status));
talloc_free(req);
@@ -438,7 +438,7 @@ void smb2srv_tdis_recv(struct smb2srv_request *req)
{
uint16_t _pad;
- SMB2SRV_CHECK_BODY_SIZE(req, 0x04, False);
+ SMB2SRV_CHECK_BODY_SIZE(req, 0x04, false);
_pad = SVAL(req->in.body, 0x02);