summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb2
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 /source4/smb_server/smb2
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)
Diffstat (limited to 'source4/smb_server/smb2')
-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
8 files changed, 39 insertions, 39 deletions
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);