- include kauth.h for kauth_cred_geteuid.

- fix an incomplete kauth change.
This commit is contained in:
yamt 2006-05-15 09:14:42 +00:00
parent d8a45254df
commit f1761fc4af

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.202 2006/05/14 21:55:38 elad Exp $ */
/* $NetBSD: trap.c,v 1.203 2006/05/15 09:14:42 yamt Exp $ */
/*
* Copyright (c) 1992, 1993
@ -78,7 +78,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.202 2006/05/14 21:55:38 elad Exp $");
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.203 2006/05/15 09:14:42 yamt Exp $");
#include "opt_cputype.h" /* which mips CPU levels do we support? */
#include "opt_ktrace.h"
@ -99,6 +99,7 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.202 2006/05/14 21:55:38 elad Exp $");
#endif
#include <sys/sa.h>
#include <sys/savar.h>
#include <sys/kauth.h>
#include <mips/cache.h>
#include <mips/locore.h>
@ -412,7 +413,7 @@ trap(unsigned status, unsigned cause, unsigned vaddr, unsigned opc,
if (rv == ENOMEM) {
printf("UVM: pid %d (%s), uid %d killed: out of swap\n",
p->p_pid, p->p_comm,
p->p_cred && ?
p->p_cred ?
kauth_cred_geteuid(p->p_cred) : (uid_t) -1);
ksi.ksi_signo = SIGKILL;
ksi.ksi_code = 0;