summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb
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/smb
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/smb')
-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
7 files changed, 44 insertions, 44 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;
}
/*