summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2005-05-22 21:52:30 +0000
committerpjd <pjd@FreeBSD.org>2005-05-22 21:52:30 +0000
commita6e0e217b2f0f56ca79b81d2969a21d07a1d5039 (patch)
tree72474345e88f120fcedb60f6662a979152c76a4f /sys/compat
parent9c80b4966970886f4b2048444beb6e62fb4e1d58 (diff)
downloadFreeBSD-src-a6e0e217b2f0f56ca79b81d2969a21d07a1d5039.zip
FreeBSD-src-a6e0e217b2f0f56ca79b81d2969a21d07a1d5039.tar.gz
If we need to hide fsid, kern_statfs()/kern_fstatfs() will do it for us,
so do not duplicate the code in cvtstatfs(). Note, that we now need to clear fsid in freebsd4_getfsstat(). This moves all security related checks from functions like cvtstatfs() and will allow to add more security related stuff (like statfs(2), etc. protection for jails) a bit easier.
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_stats.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c
index 6a51b1c..f446ec6 100644
--- a/sys/compat/linux/linux_stats.c
+++ b/sys/compat/linux/linux_stats.c
@@ -237,13 +237,8 @@ bsd_to_linux_statfs(struct thread *td, struct statfs *bsd_statfs,
linux_statfs->f_bavail = bsd_statfs->f_bavail;
linux_statfs->f_ffree = bsd_statfs->f_ffree;
linux_statfs->f_files = bsd_statfs->f_files;
- if (suser(td)) {
- linux_statfs->f_fsid.val[0] = 0;
- linux_statfs->f_fsid.val[1] = 0;
- } else {
- linux_statfs->f_fsid.val[0] = bsd_statfs->f_fsid.val[0];
- linux_statfs->f_fsid.val[1] = bsd_statfs->f_fsid.val[1];
- }
+ linux_statfs->f_fsid.val[0] = bsd_statfs->f_fsid.val[0];
+ linux_statfs->f_fsid.val[1] = bsd_statfs->f_fsid.val[1];
linux_statfs->f_namelen = MAXNAMLEN;
}
OpenPOWER on IntegriCloud