summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_aio.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-10-05 17:55:11 +0000
committerjhb <jhb@FreeBSD.org>2001-10-05 17:55:11 +0000
commit563c710867bb2e0f54b6dd7891e9875754a1f656 (patch)
treec75b904b9e14d4c848d9f15d395cc63e31437c21 /sys/kern/vfs_aio.c
parentc307754b5d788d0049009f7958f79532417dfe90 (diff)
downloadFreeBSD-src-563c710867bb2e0f54b6dd7891e9875754a1f656.zip
FreeBSD-src-563c710867bb2e0f54b6dd7891e9875754a1f656.tar.gz
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.
Diffstat (limited to 'sys/kern/vfs_aio.c')
-rw-r--r--sys/kern/vfs_aio.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index 89a0c65..f7e00f5 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);
OpenPOWER on IntegriCloud