vfs_syscalls / fhstatfs / suser()

Alfred Perlstein alfred at freebsd.org
Mon Jun 7 14:57:51 GMT 2004


* 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
> +> @@ -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 at mu.org cell: 408-480-4684


More information about the freebsd-current mailing list