DragonFly submit List (threaded) for 2005-07
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: jail.chflags_allowed
On Sat, Jul 23, 2005 at 06:58:36PM +0200, Deyan Dyankov wrote:
> @@ -2134,6 +2135,13 @@
> return (error);
>
> /*
> + * If we are inside a jail and jail.chflags_allowed=0
> + * return "Operation not permitted"
> + */
> + if (!jail_chflags_allowed && p->p_ucred->cr_prison)
> + return (EPERM);
> +
> + /*
> * note: vget is required for any operation that might mod the vnode
> * so VINACTIVE is properly cleared.
> */
Please use the jailed() inline from /sys/sys/jail.h, it does exactly the
same check:
+ if (!jail_chflags_allowed && jailed(p->p_ucred))
+ return (EPERM);
--
Michal Belczyk
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]