Blob Blame Raw
From 5b9c30f584a4f36aceade621341c084b840dfaff Mon Sep 17 00:00:00 2001
From: jkar8572 <jkar8572>
Date: Mon, 10 May 2010 07:10:57 +0000
Subject: [PATCH] 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)

Petr Pisar: Changelog entry removed.

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... */
-- 
1.7.4.2