MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bsm_rec_verify

Function bsm_rec_verify

freebsd/security/audit/audit_bsm.c:1817–1833  ·  view source on GitHub ↗

* Verify that a record is a valid BSM record. This verification is simple * now, but may be expanded on sometime in the future. Return 1 if the * record is good, 0 otherwise. */

Source from the content-addressed store, hash-verified

1815 * record is good, 0 otherwise.
1816 */
1817int
1818bsm_rec_verify(void *rec)
1819{
1820 char c = *(char *)rec;
1821
1822 /*
1823 * Check the token ID of the first token; it has to be a header
1824 * token.
1825 *
1826 * XXXAUDIT There needs to be a token structure to map a token.
1827 * XXXAUDIT 'Shouldn't be simply looking at the first char.
1828 */
1829 if ((c != AUT_HEADER32) && (c != AUT_HEADER32_EX) &&
1830 (c != AUT_HEADER64) && (c != AUT_HEADER64_EX))
1831 return (0);
1832 return (1);
1833}

Callers 1

sys_auditFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected