summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2010-05-10 07:10:57 +0000
committerjkar8572 <jkar8572>2010-05-10 07:10:57 +0000
commit5b9c30f584a4f36aceade621341c084b840dfaff (patch)
tree490ac6b5eb573419c392b594271c24e2012f6cbb
parentf3553cfee6701f98e27a30318f8b759bcbbca370 (diff)
We shouldn't pass NULL to XGETQSTAT quotactl since kernel either fails with
EFAULT or reads garbage from NULL address (which makes SELinux spit warnings). (Jan Kara)
-rw-r--r--Changelog1
-rw-r--r--quotasys.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/Changelog b/Changelog
index 23ff6ba..3d62471 100644
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,5 @@
Changes in quota-tools from 3.17 to 4.00-pre2
+* improve detection of XFS kernel quota interface (Jan Kara)
* support of GFS2 filesystem (Christoph Hellwig)
* avoid memory corruption of NULL address (Petr Pisar)
* fixup typos in manpages (Michael Meskes)
diff --git a/quotasys.c b/quotasys.c
index 307a359..5b6996c 100644
--- a/quotasys.c
+++ b/quotasys.c
@@ -754,7 +754,7 @@ void init_kernel_interface(void)
else {
fs_quota_stat_t dummy;
- if (!quotactl(QCMD(Q_XGETQSTAT, 0), NULL, 0, (void *)&dummy) || (errno != EINVAL && errno != ENOSYS))
+ if (!quotactl(QCMD(Q_XGETQSTAT, 0), "/dev/root", 0, (void *)&dummy) || (errno != EINVAL && errno != ENOSYS))
kernel_qfmt[kernel_qfmt_num++] = QF_XFS;
}
/* Detect new kernel interface; Assume generic interface unless we can prove there is not one... */