Re: vfs_syscalls / fhstatfs / suser()

From: Alfred Perlstein <alfred_at_freebsd.org>
Date: Mon, 7 Jun 2004 07:57:50 -0700
* Pawel Jakub Dawidek <pjd_at_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
> +> _at__at_ -4128,11 +4128,6 _at__at_ 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_at_ who bring it from NetBSD.

That sounds right.

-- 
- Alfred Perlstein
- Research Engineering Development Inc.
- email: bright_at_mu.org cell: 408-480-4684
Received on Mon Jun 07 2004 - 12:57:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:56 UTC