diff options
author | Simo Sorce <idra@samba.org> | 2012-03-31 21:37:56 -0400 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2012-04-12 12:06:42 +0200 |
commit | 88d5d5c4b458761fd77acdb72f09253413ac03e5 (patch) | |
tree | aaa10140705a3f5883aab6c0e5e1f64fae40c925 /source3/librpc/crypto | |
parent | f116262a733cdf24c13e7c44a54736a2755f8335 (diff) | |
download | samba-88d5d5c4b458761fd77acdb72f09253413ac03e5.tar.gz samba-88d5d5c4b458761fd77acdb72f09253413ac03e5.tar.bz2 samba-88d5d5c4b458761fd77acdb72f09253413ac03e5.zip |
auth-krb: Nove oid packet check to gensec_util.
This is clearly a utiliy function generic to gensec. Also the 3 callers
had identical implementations. Provide a generic implementation for all
of them and avoid duplicating the code everywhere.
Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/librpc/crypto')
-rw-r--r-- | source3/librpc/crypto/gse.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/source3/librpc/crypto/gse.c b/source3/librpc/crypto/gse.c index e2a84c19b5..b14829b6cc 100644 --- a/source3/librpc/crypto/gse.c +++ b/source3/librpc/crypto/gse.c @@ -803,26 +803,6 @@ static NTSTATUS gensec_gse_server_start(struct gensec_security *gensec_security) } /** - * Check if the packet is one for this mechansim - * - * @param gensec_security GENSEC state - * @param in The request, as a DATA_BLOB - * @return Error, INVALID_PARAMETER if it's not a packet for us - * or NT_STATUS_OK if the packet is ok. - */ - -static NTSTATUS gensec_gse_magic(struct gensec_security *gensec_security, - const DATA_BLOB *in) -{ - if (gensec_gssapi_check_oid(in, GENSEC_OID_KERBEROS5)) { - return NT_STATUS_OK; - } else { - return NT_STATUS_INVALID_PARAMETER; - } -} - - -/** * Next state function for the GSE GENSEC mechanism * * @param gensec_gse_state GSE State @@ -1163,7 +1143,7 @@ const struct gensec_security_ops gensec_gse_krb5_security_ops = { .oid = gensec_gse_krb5_oids, .client_start = gensec_gse_client_start, .server_start = gensec_gse_server_start, - .magic = gensec_gse_magic, + .magic = gensec_magic_check_krb5_oid, .update = gensec_gse_update, .session_key = gensec_gse_session_key, .session_info = gensec_gse_session_info, |