summaryrefslogtreecommitdiff
path: root/source3/librpc
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2012-05-21 18:25:28 +0200
committerAlexander Bokovoy <ab@samba.org>2012-05-23 17:51:51 +0300
commit2b144531f1a760514f217012e9dab01359b7a0d7 (patch)
tree0c9285cd0e52efff36d3bf700cbc9ccd918bcde1 /source3/librpc
parent0a6e568344adb66e5f20ce61f106d791886fcb35 (diff)
downloadsamba-2b144531f1a760514f217012e9dab01359b7a0d7.tar.gz
gse: Use the smb_gss_oid_equal wrapper.
Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/librpc')
-rw-r--r--source3/librpc/crypto/gse.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/source3/librpc/crypto/gse.c b/source3/librpc/crypto/gse.c
index fba942bd640..11a545727b7 100644
--- a/source3/librpc/crypto/gse.c
+++ b/source3/librpc/crypto/gse.c
@@ -57,24 +57,6 @@ struct gse_context {
gss_OID ret_mech;
};
-#ifndef HAVE_GSS_OID_EQUAL
-
-static bool gss_oid_equal(const gss_OID o1, const gss_OID o2)
-{
- if (o1 == o2) {
- return true;
- }
- if ((o1 == NULL && o2 != NULL) || (o1 != NULL && o2 == NULL)) {
- return false;
- }
- if (o1->length != o2->length) {
- return false;
- }
- return memcmp(o1->elements, o2->elements, o1->length) == false;
-}
-
-#endif
-
/* free non talloc dependent contexts */
static int gse_context_destructor(void *ptr)
{
@@ -126,7 +108,8 @@ static int gse_context_destructor(void *ptr)
* this code to EAP or other GSS mechanisms determines an
* implementation-dependent way of releasing any dynamically
* allocated OID */
- SMB_ASSERT(gss_oid_equal(&gse_ctx->gss_mech, GSS_C_NO_OID) || gss_oid_equal(&gse_ctx->gss_mech, gss_mech_krb5));
+ SMB_ASSERT(smb_gss_oid_equal(&gse_ctx->gss_mech, GSS_C_NO_OID) ||
+ smb_gss_oid_equal(&gse_ctx->gss_mech, gss_mech_krb5));
return 0;
}
@@ -994,7 +977,7 @@ static bool gensec_gse_have_feature(struct gensec_security *gensec_security,
}
if (feature & GENSEC_FEATURE_SESSION_KEY) {
/* Only for GSE/Krb5 */
- if (gss_oid_equal(gse_ctx->ret_mech, gss_mech_krb5)) {
+ if (smb_gss_oid_equal(gse_ctx->ret_mech, gss_mech_krb5)) {
return true;
}
}