Add a note to change_root() that the callers need to authorize the operation.

As requested by elad@.
This commit is contained in:
bad 2009-08-02 20:44:55 +00:00
parent 14861af47a
commit 0152c542e8

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_syscalls.c,v 1.397 2009/08/01 21:17:11 bad Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.398 2009/08/02 20:44:55 bad Exp $ */
/*- /*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.397 2009/08/01 21:17:11 bad Exp $"); __KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.398 2009/08/02 20:44:55 bad Exp $");
#ifdef _KERNEL_OPT #ifdef _KERNEL_OPT
#include "opt_fileassoc.h" #include "opt_fileassoc.h"
@ -1207,6 +1207,7 @@ sys_chroot(struct lwp *l, const struct sys_chroot_args *uap, register_t *retval)
/* /*
* Common routine for chroot and fchroot. * Common routine for chroot and fchroot.
* NB: callers need to properly authorize the change root operation.
*/ */
void void
change_root(struct cwdinfo *cwdi, struct vnode *vp, struct lwp *l) change_root(struct cwdinfo *cwdi, struct vnode *vp, struct lwp *l)