HomeFreeBSD

audit_canon_path_vp: don't panic if cdir == NULL

Description

audit_canon_path_vp: don't panic if cdir == NULL

cdir may have simply failed to resolve (e.g. fget_cap failure in namei
leading to NULL dp passed to AUDIT_ARG_UPATH*_VP); restore the pre-rS358191
behavior of setting cpath[0] = '\0' and bailing out instead of panicking.

This was found by inadvertently running the libc/c063 tests with auditing
enabled, resulting in a panic.

Reviewed by: mjg (committed version actually his)
Differential Revision: https://reviews.freebsd.org/D24445

Details

Provenance
kevansAuthored on
Reviewer
mjg
Differential Revision
D24445: audit_canon_path_vp: don't panic if cdir == NULL
Parents
rS360030: MFC r359766:
Branches
Unknown
Tags
Unknown