From 43150722c97d7dd9571efbebd3d5098657f82adf Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 5 Oct 2001 17:55:11 +0000 Subject: [PATCH] The aio kthreads start off with a root credential just like all other kthreads, so don't malloc a ucred just so we can create a duplicate of the one we already have. --- sys/kern/vfs_aio.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 89a0c65d721..f7e00f592bc 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -695,16 +695,9 @@ aio_daemon(void *uproc) /* * Get rid of our current filedescriptors. AIOD's don't need any * filedescriptors, except as temporarily inherited from the client. - * Credentials are also cloned, and made equivalent to "root". */ fdfree(td); mycp->p_fd = NULL; - mycp->p_ucred = crcopy(mycp->p_ucred); - mycp->p_ucred->cr_uid = 0; - uifree(mycp->p_ucred->cr_uidinfo); - mycp->p_ucred->cr_uidinfo = uifind(0); - mycp->p_ucred->cr_ngroups = 1; - mycp->p_ucred->cr_groups[0] = 1; /* The daemon resides in its own pgrp. */ enterpgrp(mycp, mycp->p_pid, 1);