Skip to content

Commit

Permalink
output/krb5: have krb5 properties in alerts
Browse files Browse the repository at this point in the history
Ticket: OISF#5977
  • Loading branch information
catenacyber committed Jun 5, 2023
1 parent d68f8dd commit 499e268
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions rust/src/krb/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// written by Pierre Chifflier <chifflier@wzdftpd.net>

use crate::jsonbuilder::{JsonBuilder, JsonError};
use crate::krb::krb5::{KRB5State,KRB5Transaction,test_weak_encryption};
use crate::krb::krb5::{KRB5Transaction,test_weak_encryption};

fn krb5_log_response(jsb: &mut JsonBuilder, tx: &mut KRB5Transaction) -> Result<(), JsonError>
{
Expand Down Expand Up @@ -68,7 +68,7 @@ fn krb5_log_response(jsb: &mut JsonBuilder, tx: &mut KRB5Transaction) -> Result<
}

#[no_mangle]
pub extern "C" fn rs_krb5_log_json_response(jsb: &mut JsonBuilder, _state: &mut KRB5State, tx: &mut KRB5Transaction) -> bool
pub extern "C" fn rs_krb5_log_json_response(tx: &mut KRB5Transaction, jsb: &mut JsonBuilder) -> bool
{
krb5_log_response(jsb, tx).is_ok()
}
2 changes: 1 addition & 1 deletion src/output-json-krb5.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static int JsonKRB5Logger(ThreadVars *tv, void *thread_data,
}

jb_open_object(jb, "krb5");
if (!rs_krb5_log_json_response(jb, state, krb5tx)) {
if (!rs_krb5_log_json_response(krb5tx, jb)) {
goto error;
}
jb_close(jb);
Expand Down
4 changes: 2 additions & 2 deletions src/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1147,8 +1147,8 @@ static AppLayerLogger alert_applayer_loggers[ALPROTO_MAX] = {
{ ALPROTO_NTP, NULL, NULL }, // no logging
{ ALPROTO_FTPDATA, NULL, NULL }, // TODO state
{ ALPROTO_TFTP, "tftp", (bool (*)(void *tx, struct JsonBuilder *jb))rs_tftp_log_json_request },
{ ALPROTO_IKE, NULL, NULL }, // TODO state + option
{ ALPROTO_KRB5, NULL, NULL }, // TODO state
{ ALPROTO_IKE, NULL, NULL }, // TODO state + option
{ ALPROTO_KRB5, "krb5", (bool (*)(void *tx, struct JsonBuilder *jb))rs_krb5_log_json_response },
{ ALPROTO_QUIC, "quic", rs_quic_to_json },
{ ALPROTO_DHCP, NULL, NULL }, // TODO logger with option
{ ALPROTO_SNMP, "snmp", (bool (*)(void *tx, struct JsonBuilder *jb))rs_snmp_log_json_response },
Expand Down

0 comments on commit 499e268

Please sign in to comment.