]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
IFp4 @208451:
authorpjd <pjd@FreeBSD.org>
Fri, 30 Nov 2012 23:18:49 +0000 (23:18 +0000)
committerpjd <pjd@FreeBSD.org>
Fri, 30 Nov 2012 23:18:49 +0000 (23:18 +0000)
commit632d7191a2034f3e655f731e7828c7ddd32bc0e5
tree689c46974acab0658b3c913c45fe97b40d9cf687
parent07398249f32ac853914c1fb2f42644d1dadf456f
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
sys/kern/vfs_lookup.c
sys/security/audit/audit.c
sys/security/audit/audit.h
sys/security/audit/audit_arg.c
sys/security/audit/audit_bsm_klib.c
sys/security/audit/audit_private.h