commit
50f45f8484
@ -0,0 +1 @@
|
||||
SOURCES/quota-4.06.tar.gz
|
@ -0,0 +1 @@
|
||||
98288699cc14da42f762301c2b6731ec7c777681 SOURCES/quota-4.06.tar.gz
|
@ -0,0 +1,29 @@
|
||||
From c9a2a6fea0668579f5fb8d77cb219f51d104581f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Wed, 6 Jan 2016 17:58:22 +0100
|
||||
Subject: [PATCH] Validate upper bound of RPC port
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
rquota_svc.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/rquota_svc.c b/rquota_svc.c
|
||||
index 338b70f..93472e0 100644
|
||||
--- a/rquota_svc.c
|
||||
+++ b/rquota_svc.c
|
||||
@@ -142,7 +142,7 @@ static void parse_options(int argc, char **argv)
|
||||
break;
|
||||
case 'p':
|
||||
port = strtol(optarg, &endptr, 0);
|
||||
- if (*endptr || port <= 0) {
|
||||
+ if (*endptr || port <= 0 || port > 0xffff) {
|
||||
errstr(_("Illegal port number: %s\n"), optarg);
|
||||
show_help();
|
||||
exit(1);
|
||||
--
|
||||
2.5.0
|
||||
|
@ -0,0 +1,43 @@
|
||||
From 1959f3768a284315250acd4d17a9f5ef0b8ea189 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kara <jack@suse.cz>
|
||||
Date: Mon, 30 Nov 2020 16:35:26 +0100
|
||||
Subject: [PATCH] Drop sys/cdefs.h usage
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
quota.h header includes sys/cdefs.h because it uses __P() macro in
|
||||
quotactl syscall declaration. However glibc currently defines __P() is
|
||||
nop and it only causes issues with other libc implementations (e.g. musl
|
||||
libc). So just drop __P() usage and sys/cdefs.h include.
|
||||
|
||||
Reported-by: 2xsaiko <git@dblsaiko.net>
|
||||
Signed-off-by: Jan Kara <jack@suse.cz>
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
quota.h | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/quota.h b/quota.h
|
||||
index 4c21411..845cbbd 100644
|
||||
--- a/quota.h
|
||||
+++ b/quota.h
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef GUARD_QUOTA_H
|
||||
#define GUARD_QUOTA_H
|
||||
|
||||
-#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -182,6 +181,6 @@ enum {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
-long quotactl __P((int, const char *, qid_t, caddr_t));
|
||||
+long quotactl(int, const char *, qid_t, caddr_t);
|
||||
|
||||
#endif /* _QUOTA_ */
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,34 @@
|
||||
From 25f16b1de313ce0d411f754572f94f051bfbe3c8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Tue, 16 Mar 2021 17:28:15 +0100
|
||||
Subject: [PATCH] quota_nld: Initialize sa_mask when registering PID file
|
||||
removal
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
term_action.sa_mask is an automatic variable and and thus unitialized.
|
||||
This patch empties the signal mask.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
Signed-off-by: Jan Kara <jack@suse.cz>
|
||||
---
|
||||
quota_nld.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/quota_nld.c b/quota_nld.c
|
||||
index 72d99a9..09c4775 100644
|
||||
--- a/quota_nld.c
|
||||
+++ b/quota_nld.c
|
||||
@@ -466,7 +466,7 @@ static void use_pid_file(void)
|
||||
|
||||
term_action.sa_handler = remove_pid;
|
||||
term_action.sa_flags = 0;
|
||||
- if (sigaction(SIGTERM, &term_action, NULL))
|
||||
+ if (sigemptyset(&term_action.sa_mask) || sigaction(SIGTERM, &term_action, NULL))
|
||||
errstr(_("Could not register PID file removal on SIGTERM.\n"));
|
||||
if (store_pid())
|
||||
errstr(_("Could not store my PID %jd.\n"), (intmax_t )getpid());
|
||||
--
|
||||
2.26.3
|
||||
|
@ -0,0 +1,32 @@
|
||||
From 55f1a0604bd4df6d591674b5bef123be1af84e55 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Fri, 20 Nov 2020 15:28:49 +0100
|
||||
Subject: [PATCH] quotacheck: Remove a dead code from process_file()
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The ret variable inicialization is useless because it is assigned in
|
||||
all (two) subsequent code branches.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
Signed-off-by: Jan Kara <jack@suse.cz>
|
||||
---
|
||||
quotacheck.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/quotacheck.c b/quotacheck.c
|
||||
index 5810ced..1b81610 100644
|
||||
--- a/quotacheck.c
|
||||
+++ b/quotacheck.c
|
||||
@@ -672,7 +672,6 @@ Please turn quotas off or use -f to force checking.\n"),
|
||||
}
|
||||
}
|
||||
|
||||
- ret = 0;
|
||||
memset(old_info + type, 0, sizeof(old_info[type]));
|
||||
if (is_tree_qfmt(cfmt))
|
||||
ret = v2_buffer_file(qfname, fd, type, cfmt);
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,72 @@
|
||||
From 43b6e31f39edbe7de4f4feeef4d0cf6be093e021 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kara <jack@suse.cz>
|
||||
Date: Mon, 23 Nov 2020 17:12:27 +0100
|
||||
Subject: [PATCH] quotaio_xfs: Warn when large kernel timestamps cannot be
|
||||
handled
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When time_t is 32-bit, warn if the kernel returns anything that cannot
|
||||
fit in these time stamps. This also fixes a compilation warning that
|
||||
shift exceeds data type size. Similarly when converting data to pass to
|
||||
kernel, just avoid the pointless shift (generating compiler warning)
|
||||
when time_t is 32-bit.
|
||||
|
||||
Reported-by: "Dmitry V. Levin" <ldv@altlinux.org>
|
||||
Signed-off-by: Jan Kara <jack@suse.cz>
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
configure.ac | 2 ++
|
||||
quotaio_xfs.c | 9 +++++++++
|
||||
2 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 2239b49..296b77a 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -82,6 +82,8 @@ AS_IF([test x"$enable_werror" != "xno"], [
|
||||
])
|
||||
AC_SUBST([WARN_CFLAGS])
|
||||
|
||||
+AC_CHECK_SIZEOF([time_t], [], [#include <time.h>])
|
||||
+
|
||||
# =========
|
||||
# Find ldap
|
||||
# =========
|
||||
diff --git a/quotaio_xfs.c b/quotaio_xfs.c
|
||||
index 2db1c0c..5abb2c2 100644
|
||||
--- a/quotaio_xfs.c
|
||||
+++ b/quotaio_xfs.c
|
||||
@@ -45,8 +45,13 @@ report: xfs_report
|
||||
static inline time_t xfs_kern2utildqblk_ts(const struct xfs_kern_dqblk *k,
|
||||
__s32 timer, __s8 timer_hi)
|
||||
{
|
||||
+#if SIZEOF_TIME_T > 4
|
||||
if (k->d_fieldmask & FS_DQ_BIGTIME)
|
||||
return (__u32)timer | (__s64)timer_hi << 32;
|
||||
+#else
|
||||
+ if (k->d_fieldmask & FS_DQ_BIGTIME && timer_hi != 0)
|
||||
+ errstr(_("Truncating kernel returned time stamp."));
|
||||
+#endif
|
||||
return timer;
|
||||
}
|
||||
|
||||
@@ -54,10 +59,14 @@ static inline void xfs_util2kerndqblk_ts(const struct xfs_kern_dqblk *k,
|
||||
__s32 *timer_lo, __s8 *timer_hi, time_t timer)
|
||||
{
|
||||
*timer_lo = timer;
|
||||
+#if SIZEOF_TIME_T > 4
|
||||
if (k->d_fieldmask & FS_DQ_BIGTIME)
|
||||
*timer_hi = timer >> 32;
|
||||
else
|
||||
*timer_hi = 0;
|
||||
+#else
|
||||
+ *timer_hi = 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static inline int want_bigtime(time_t timer)
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,39 @@
|
||||
From 8a3321627bb9215ed40f8f7036a1e86bcaf10ad1 Mon Sep 17 00:00:00 2001
|
||||
From: "Dmitry V. Levin" <ldv@altlinux.org>
|
||||
Date: Sun, 22 Nov 2020 08:00:00 +0000
|
||||
Subject: [PATCH] quotaops: fix compilation warning
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When quota is configured using --enable-werror --disable-bsd_behaviour,
|
||||
the compilation fails with the following diagnostics:
|
||||
|
||||
quotaops.c: In function 'getprivs':
|
||||
quotaops.c:143:1: error: label 'out_err' defined but not used [-Werror=unused-label]
|
||||
|
||||
Fixes: 7942290a ("quotaops: Do not leak dquot structures on failure")
|
||||
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
|
||||
Signed-off-by: Jan Kara <jack@suse.cz>
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
quotaops.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/quotaops.c b/quotaops.c
|
||||
index ff4d16e..96086f4 100644
|
||||
--- a/quotaops.c
|
||||
+++ b/quotaops.c
|
||||
@@ -140,7 +140,9 @@ struct dquot *getprivs(qid_t id, struct quota_handle **handles, int ignore_noquo
|
||||
id2name(id, handles[i]->qh_type, name);
|
||||
errstr(_("error while getting quota from %s for %s (id %u): %s\n"),
|
||||
handles[i]->qh_quotadev, name, id, estr);
|
||||
+#if defined(BSD_BEHAVIOUR)
|
||||
out_err:
|
||||
+#endif
|
||||
freeprivs(qhead);
|
||||
return NULL;
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,80 @@
|
||||
From 6400cf65afed09c63d96cc62b1e7eee964bdb6cb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Tue, 23 Aug 2011 13:45:15 +0200
|
||||
Subject: [PATCH] warnquota configuration tunes
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Rest of changes (378a64006bb1e818e84a1c77808563b802b028fa) not
|
||||
accepted by upstream (we had root@... addresses and more enterprise
|
||||
wordings usually there). Later improved by the upstream in
|
||||
0efb2331f1c39c9665fb6e92e83c7d080b877de1.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
warnquota.c | 2 +-
|
||||
warnquota.conf | 16 ++++++++--------
|
||||
2 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/warnquota.c b/warnquota.c
|
||||
index 2882fee..48d79c0 100644
|
||||
--- a/warnquota.c
|
||||
+++ b/warnquota.c
|
||||
@@ -883,7 +883,7 @@ cc_parse_err:
|
||||
}
|
||||
#ifdef USE_LDAP_MAIL_LOOKUP
|
||||
else if (!strcmp(var, "LDAP_MAIL")) {
|
||||
- if(strcasecmp(value, "true") == 0)
|
||||
+ if(strncasecmp(value, "true", 4) == 0)
|
||||
config->use_ldap_mail = 1;
|
||||
else
|
||||
config->use_ldap_mail = 0;
|
||||
diff --git a/warnquota.conf b/warnquota.conf
|
||||
index 5bbd0ab..366c3e0 100644
|
||||
--- a/warnquota.conf
|
||||
+++ b/warnquota.conf
|
||||
@@ -19,20 +19,20 @@ FAIL = "configure /etc/warnquota.conf before running warnquota"
|
||||
#
|
||||
# command used for sending mails
|
||||
#
|
||||
-MAIL_CMD = "/usr/lib/sendmail -t"
|
||||
+MAIL_CMD = "/usr/sbin/sendmail -t"
|
||||
|
||||
#
|
||||
# Standard mail fields
|
||||
-FROM = "root@localhost"
|
||||
-SUBJECT = "Your account quota has exceeded!"
|
||||
+FROM = "root@example.com"
|
||||
+SUBJECT = "You are exceeding your allocated disk space limits"
|
||||
# Note that if LDAP is configured, the name in CC_TO gets looked up in LDAP
|
||||
# to obtain email address similarly to email recipient address.
|
||||
-CC_TO = "root@localhost"
|
||||
+CC_TO = "root@example.com"
|
||||
# If you set this variable CC will be used only when user has less than
|
||||
# specified grace time left (examples of possible times: 5 seconds, 1 minute,
|
||||
# 12 hours, 5 days)
|
||||
# CC_BEFORE = 2 days
|
||||
-SUPPORT = "root@localhost"
|
||||
+SUPPORT = "root@example.com"
|
||||
PHONE = "123 456 789"
|
||||
# Text in the beginning of the mail (if not specified, default text is used)
|
||||
# This way text can be split to more lines
|
||||
@@ -40,11 +40,11 @@ PHONE = "123 456 789"
|
||||
# The expressions %i, %h, %d, and %% are substituted for user/group name,
|
||||
# host name, domain name, and '%' respectively. For backward compatibility
|
||||
# %s behaves as %i but is deprecated.
|
||||
-MESSAGE = Hello user %i, I've noticed you use too much space\
|
||||
- on my disk in %h.%d.|Delete your files on the following filesystems:|
|
||||
+MESSAGE = Your disk usage has exceeded the agreed limits\
|
||||
+ on this server|Please delete any unnecessary files on following filesystems:|
|
||||
# Text in the end of the mail (if not specified, default text using SUPPORT and PHONE
|
||||
# is created)
|
||||
-SIGNATURE = See you!| Your admin of %h|
|
||||
+SIGNATURE = root@example.com
|
||||
# Following text is used for mails about group exceeding quotas
|
||||
GROUP_MESSAGE = Hello,|\
|
||||
your group %i is using too much disk space at %h.|\
|
||||
--
|
||||
2.25.4
|
||||
|
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Disk quota netlink message daemon
|
||||
After=syslog.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
EnvironmentFile=-/etc/sysconfig/quota_nld
|
||||
ExecStart=/usr/sbin/quota_nld $QUOTA_NLD_OPTS
|
||||
PIDFile=/run/quota_nld.pid
|
||||
Group=tty
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -0,0 +1,5 @@
|
||||
# Arguments to pass to quota_nld daemon.
|
||||
# -b, --print-below Inform about falling usage bellow limits too
|
||||
# -C, --no-console Do not print messages on last user's terminal
|
||||
# -D, --no-dbus Do not forward messages to D-Bus
|
||||
QUOTA_NLD_OPTS=""
|
@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Remote quota server
|
||||
Documentation=man:rpc.rquotad(8)
|
||||
Requires=rpcbind.service
|
||||
PartOf=rpcbind.service
|
||||
After=rpcbind.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
EnvironmentFile=-/etc/sysconfig/rpc-rquotad
|
||||
ExecStart=/usr/sbin/rpc.rquotad $RPCRQUOTADOPTS
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=nfs-server.service
|
@ -0,0 +1,8 @@
|
||||
# Optionas to pass to rpc.rquotad daemon. See rpc.rquotad(8) manual page for
|
||||
# more details.
|
||||
# -I, --autofs Ignore autofs mount points
|
||||
# -p port, --port port Listen on alternative port
|
||||
# -s, --no-setquota Don't allow setting quotas with RPC (default)
|
||||
# -S, --setquota Allow setting quotas with RPC
|
||||
# -x path, --xtab path Use alternative NFSD export table
|
||||
RPCRQUOTADOPTS=""
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue