diff options
author | jkar8572 <jkar8572> | 2010-05-10 07:10:57 +0000 |
---|---|---|
committer | jkar8572 <jkar8572> | 2010-05-10 07:10:57 +0000 |
commit | 5b9c30f584a4f36aceade621341c084b840dfaff (patch) | |
tree | 490ac6b5eb573419c392b594271c24e2012f6cbb | |
parent | f3553cfee6701f98e27a30318f8b759bcbbca370 (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-- | Changelog | 1 | ||||
-rw-r--r-- | quotasys.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -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) @@ -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... */ |