vn_open_cred() needs a non NULL ucred pointer

Reviewed by:	kib
This commit is contained in:
pho 2009-06-23 11:29:54 +00:00
parent 367665ede0
commit 6945f47d28

View File

@ -2941,7 +2941,7 @@ coredump(struct thread *td)
NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, name, td);
flags = O_CREAT | FWRITE | O_NOFOLLOW;
error = vn_open_cred(&nd, &flags, S_IRUSR | S_IWUSR, VN_OPEN_NOAUDIT,
NULL, NULL);
cred, NULL);
if (error) {
#ifdef AUDIT
audit_proc_coredump(td, name, error);