Date: Mon, 7 Jun 2004 07:57:50 -0700 From: Alfred Perlstein <alfred@freebsd.org> To: Pawel Jakub Dawidek <pjd@FreeBSD.org> Cc: FreeBSD current mailing list <current@freebsd.org> Subject: Re: vfs_syscalls / fhstatfs / suser() Message-ID: <20040607145750.GB90021@elvis.mu.org> In-Reply-To: <20040607114505.GQ12007@darkness.comp.waw.pl> References: <Pine.BSF.4.53.0406061932520.62813@e0-0.zab2.int.zabbadoz.net> <20040607114505.GQ12007@darkness.comp.waw.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
* Pawel Jakub Dawidek <pjd@FreeBSD.org> [040607 04:45] wrote:
> +>
> +>
> +> --- ./vfs_syscalls.c.orig Sun Jun 6 19:32:23 2004
> +> +++ ./vfs_syscalls.c Sun Jun 6 19:33:12 2004
> +> @@ -4128,11 +4128,6 @@ fhstatfs(td, uap)
> +> sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
> +> if ((error = VFS_STATFS(mp, sp, td)) != 0)
> +> return (error);
> +> - if (suser(td)) {
> +> - bcopy(sp, &sb, sizeof(sb));
> +> - sb.f_fsid.val[0] = sb.f_fsid.val[1] = 0;
> +> - sp = &sb;
> +> - }
> +> return (copyout(sp, uap->buf, sizeof(*sp)));
> +> }
>
> I'm not sure what the intention was, but I think we should probably
> change first suser() to suser_cred(td->td_ucred, PRISON_ROOT) as leave
> second one.
>
> PS. I'm CCing this to alfred@ who bring it from NetBSD.
That sounds right.
--
- Alfred Perlstein
- Research Engineering Development Inc.
- email: bright@mu.org cell: 408-480-4684
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040607145750.GB90021>
