Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
audit: initialize context values in case of mandatory events
Issue ghak120 enabled syscall records to accompany required records when no rules are present to trigger the storage of syscall context. A reported issue showed that the cwd was not always initialized. That issue was already resolved, but a review of all other records that could be triggered at the time of a syscall record revealed other potential values that could be missing or misleading. Initialize them. The fds array is reset to -1 after the first syscall to indicate it isn't valid any more, but was never set to -1 when the context was allocated to indicate it wasn't yet valid. The audit_inode* functions can be called without going through getname_flags() or getname_kernel() that sets audit_names and cwd, so set the cwd if it has not already been done so due to audit_names being valid. The LSM dump_common_audit_data() LSM_AUDIT_DATA_NET:AF_UNIX case was missed with the ghak96 patch, so add that case here. Please see issue linux-audit/audit-kernel#120 Please see issue linux-audit/audit-kernel#96 Passes audit-testsuite. Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
- Loading branch information