Fix ignoring disabled quotas
This commit is contained in:
parent
7275d7d7be
commit
467ef82fdb
53
quota-4.05-Fix-ignoring-disabled-quotas.patch
Normal file
53
quota-4.05-Fix-ignoring-disabled-quotas.patch
Normal file
@ -0,0 +1,53 @@
|
||||
From 514cfb367e9c673c9c18b84a9c9c94ea84b91112 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Fri, 21 Feb 2020 10:00:05 +0100
|
||||
Subject: [PATCH] Fix ignoring disabled quotas
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
"quota" command ignores file systems without enabled quotas. (In
|
||||
contrast to "quota -f".) This works for local file systems and it used
|
||||
to work for NFS file system until this commit:
|
||||
|
||||
commit 4cd287f3fa3838a31eb6636366f8ce26ee6e1425
|
||||
Author: Jan Kara <jack@suse.cz>
|
||||
Date: Tue May 28 10:52:49 2019 +0200
|
||||
|
||||
rpc: Clarify error message when cannot connect to rpc.rquotad
|
||||
|
||||
Currently when RPC rquota service is not registered, we report somewhat
|
||||
confusing "No such file of directory" error. For other errors when
|
||||
creating rquota request we report "Connection refused". There's no big
|
||||
difference for user between these errors and neither of them tells what
|
||||
really happened. So just unify handling of these errors and report more
|
||||
general error telling the user where the problem is.
|
||||
|
||||
that broke it. "quota" command now reports an error whenever at least
|
||||
one NFS-mounted file system has disabled the quotas. This renders the
|
||||
tool unusable.
|
||||
|
||||
This patch readds an exception for the ENOENT errno that was removed
|
||||
with the commit probably by a mistake.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
quotaops.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/quotaops.c b/quotaops.c
|
||||
index 1a8d7fe..0daa8ec 100644
|
||||
--- a/quotaops.c
|
||||
+++ b/quotaops.c
|
||||
@@ -127,7 +127,7 @@ struct dquot *getprivs(qid_t id, struct quota_handle **handles, int ignore_noquo
|
||||
char *estr;
|
||||
|
||||
/* If rpc.rquotad is not running, filesystem might be just without quotas... */
|
||||
- if (ignore_noquota && errno == ECONNREFUSED)
|
||||
+ if (ignore_noquota && (errno == ENOENT || errno == ECONNREFUSED))
|
||||
continue;
|
||||
|
||||
if (errno == ECONNREFUSED) {
|
||||
--
|
||||
2.21.1
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
Name: quota
|
||||
Epoch: 1
|
||||
Version: 4.05
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
Summary: System administration tools for monitoring users' disk usage
|
||||
# quota_nld.c, quotaio_xfs.h: GPLv2
|
||||
# bylabel.c copied from util-linux: GPLv2+
|
||||
@ -99,6 +99,9 @@ Patch16: quota-4.05-warnquota-Clarify-that-CC_TO-gets-resolved-through-L.patch
|
||||
# Initialize all members of a configparams structure in warnquota,
|
||||
# in upstream after 4.05, <https://sourceforge.net/p/linuxquota/patches/51/>
|
||||
Patch17: quota-4.05-warnquota-Initialize-all-members-of-a-configparams-s.patch
|
||||
# Fix ignoring disabled quotas, bug #1805110, proposed to upstream,
|
||||
# <https://sourceforge.net/p/linuxquota/bugs/136/>
|
||||
Patch18: quota-4.05-Fix-ignoring-disabled-quotas.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: bash
|
||||
@ -236,6 +239,7 @@ Linux/UNIX environment.
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
# Regenerate build scripts
|
||||
autoreconf -f -i
|
||||
|
||||
@ -385,6 +389,9 @@ make check
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Feb 21 2020 Petr Pisar <ppisar@redhat.com> - 1:4.05-9
|
||||
- Fix ignoring disabled quotas (bug #1805110)
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.05-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user