summaryrefslogtreecommitdiffstats
path: root/sys/security/audit/audit.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2012-11-30 23:18:49 +0000
committerpjd <pjd@FreeBSD.org>2012-11-30 23:18:49 +0000
commit632d7191a2034f3e655f731e7828c7ddd32bc0e5 (patch)
tree689c46974acab0658b3c913c45fe97b40d9cf687 /sys/security/audit/audit.c
parent07398249f32ac853914c1fb2f42644d1dadf456f (diff)
downloadFreeBSD-src-632d7191a2034f3e655f731e7828c7ddd32bc0e5.zip
FreeBSD-src-632d7191a2034f3e655f731e7828c7ddd32bc0e5.tar.gz
IFp4 @208451:
Fix path handling for *at() syscalls. Before the change directory descriptor was totally ignored, so the relative path argument was appended to current working directory path and not to the path provided by descriptor, thus wrong paths were stored in audit logs. Now that we use directory descriptor in vfs_lookup, move AUDIT_ARG_UPATH1() and AUDIT_ARG_UPATH2() calls to the place where we hold file descriptors table lock, so we are sure paths will be resolved according to the same directory in audit record and in actual operation. Sponsored by: FreeBSD Foundation (auditdistd) Reviewed by: rwatson MFC after: 2 weeks
Diffstat (limited to 'sys/security/audit/audit.c')
-rw-r--r--sys/security/audit/audit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/security/audit/audit.c b/sys/security/audit/audit.c
index 74bfde7..2063c9d 100644
--- a/sys/security/audit/audit.c
+++ b/sys/security/audit/audit.c
@@ -691,7 +691,7 @@ audit_proc_coredump(struct thread *td, char *path, int errcode)
if (path != NULL) {
pathp = &ar->k_ar.ar_arg_upath1;
*pathp = malloc(MAXPATHLEN, M_AUDITPATH, M_WAITOK);
- audit_canon_path(td, path, *pathp);
+ audit_canon_path(td, AT_FDCWD, path, *pathp);
ARG_SET_VALID(ar, ARG_UPATH1);
}
ar->k_ar.ar_arg_signum = td->td_proc->p_sig;
OpenPOWER on IntegriCloud