summaryrefslogtreecommitdiff
path: root/source4/auth/gensec
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-10-07 13:10:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:56 -0500
commit0df01cee47c07df1238b24eb94b3d7fac1c59973 (patch)
tree891bf24ce0a5a491d2da9418788a53c186e0a37a /source4/auth/gensec
parent775a3d034d903243d9dd4309817f188c7984d037 (diff)
downloadsamba-0df01cee47c07df1238b24eb94b3d7fac1c59973.tar.gz
samba-0df01cee47c07df1238b24eb94b3d7fac1c59973.tar.bz2
samba-0df01cee47c07df1238b24eb94b3d7fac1c59973.zip
r25562: Use standard bool types in cyrus sasl code - patch by Julien.
(This used to be commit 4f664939af0d6ac389efebc51f2f31e9acee80b4)
Diffstat (limited to 'source4/auth/gensec')
-rw-r--r--source4/auth/gensec/cyrus_sasl.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/source4/auth/gensec/cyrus_sasl.c b/source4/auth/gensec/cyrus_sasl.c
index db77ed13a7..0bce35e1c5 100644
--- a/source4/auth/gensec/cyrus_sasl.c
+++ b/source4/auth/gensec/cyrus_sasl.c
@@ -248,6 +248,7 @@ static NTSTATUS gensec_sasl_unwrap_packets(struct gensec_security *gensec_securi
return sasl_nt_status(sasl_ret);
}
+
static NTSTATUS gensec_sasl_wrap_packets(struct gensec_security *gensec_security,
TALLOC_CTX *out_mem_ctx,
const DATA_BLOB *in,
@@ -271,7 +272,7 @@ static NTSTATUS gensec_sasl_wrap_packets(struct gensec_security *gensec_security
}
/* Try to figure out what features we actually got on the connection */
-static BOOL gensec_sasl_have_feature(struct gensec_security *gensec_security,
+static bool gensec_sasl_have_feature(struct gensec_security *gensec_security,
uint32_t feature)
{
struct gensec_sasl_state *gensec_sasl_state = talloc_get_type(gensec_security->private_data,
@@ -279,25 +280,25 @@ static BOOL gensec_sasl_have_feature(struct gensec_security *gensec_security,
sasl_ssf_t ssf;
int sasl_ret = sasl_getprop(gensec_sasl_state->conn, SASL_SSF, &ssf);
if (sasl_ret != SASL_OK) {
- return False;
+ return false;
}
if (feature & GENSEC_FEATURE_SIGN) {
if (ssf == 0) {
- return False;
+ return false;
}
if (ssf >= 1) {
- return True;
+ return true;
}
}
if (feature & GENSEC_FEATURE_SEAL) {
if (ssf <= 1) {
- return False;
+ return false;
}
if (ssf > 1) {
- return True;
+ return true;
}
}
- return False;
+ return false;
}
/* This could in theory work with any SASL mech */
@@ -309,7 +310,7 @@ static const struct gensec_security_ops gensec_sasl_security_ops = {
.wrap_packets = gensec_sasl_wrap_packets,
.unwrap_packets = gensec_sasl_unwrap_packets,
.have_feature = gensec_sasl_have_feature,
- .enabled = True,
+ .enabled = true,
.priority = GENSEC_SASL
};