]> git.ipfire.org Git - thirdparty/krb5.git/commit
Add IPv6 address logging support to audit plugin
authorSarah Day <sarahday@mit.edu>
Mon, 7 Dec 2015 18:48:22 +0000 (13:48 -0500)
committerTom Yu <tlyu@mit.edu>
Mon, 14 Dec 2015 23:14:45 +0000 (18:14 -0500)
commit5e063638032912f93df1426dc92cdae5e65c5e5a
tree6f9e8349d1ff470d77adeb3845391a2b57947bf8
parent56d9942a793e18cd91ab45ef0cb06c3738198e2a
Add IPv6 address logging support to audit plugin

The jsonwalker.py test was failing due to the audit plugin only
logging the IP for IPv4.  The audit plugin should log the IP address
for both IPv4 and IPv6.  Rename the JSON "ipv4" field in the
"fromaddr" JSON object to "ip" and set the field if either an IPv4 or
an IPv6 address is present.  Any parsers of the audit log can tell
which address is stored in the "ip" field by checking the "type" field
in "fromaddr".  Also update the jsonwalker.py reference JSON file,
au_dict.json, to handle this new field name.

old audit:

{"fromaddr":{"type":<int>,"length":<int>,"ipv4":[<4 int>]}

where "ipv4" only occurs when type is ADDRTYPE_INET

new audit:

{"fromaddr":{"type":<int>,"length":<int>,"ip":[<<length> int>]}

where "ip" only occurs when type is ADDRTYPE_INET or ADDRTYPE_INET6

[tlyu@mit.edu: minor commit message edits]

ticket: 8298
src/plugins/audit/j_dict.h
src/plugins/audit/kdc_j_encode.c
src/tests/au_dict.json