commit 315a7acef02cd699b64a70165b8fbeb011533840 Author: MSVSphere Packaging Team Date: Mon Oct 7 21:12:46 2024 +0300 import quota-4.09-2.el9 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a338120 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/quota-4.09.tar.gz diff --git a/.quota.metadata b/.quota.metadata new file mode 100644 index 0000000..67539cf --- /dev/null +++ b/.quota.metadata @@ -0,0 +1 @@ +5c215d869626b532be2773f4161bdcc8b9f97126 SOURCES/quota-4.09.tar.gz diff --git a/SOURCES/quota-4.03-Validate-upper-bound-of-RPC-port.patch b/SOURCES/quota-4.03-Validate-upper-bound-of-RPC-port.patch new file mode 100644 index 0000000..aa0d12b --- /dev/null +++ b/SOURCES/quota-4.03-Validate-upper-bound-of-RPC-port.patch @@ -0,0 +1,29 @@ +From c9a2a6fea0668579f5fb8d77cb219f51d104581f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +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ř +--- + 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 + diff --git a/SOURCES/quota-4.06-warnquota-configuration-tunes.patch b/SOURCES/quota-4.06-warnquota-configuration-tunes.patch new file mode 100644 index 0000000..3f4e38f --- /dev/null +++ b/SOURCES/quota-4.06-warnquota-configuration-tunes.patch @@ -0,0 +1,80 @@ +From 6400cf65afed09c63d96cc62b1e7eee964bdb6cb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +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ř +--- + 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 + diff --git a/SOURCES/quota-4.10-Add-quotactl_fd-support.patch b/SOURCES/quota-4.10-Add-quotactl_fd-support.patch new file mode 100644 index 0000000..973cdfb --- /dev/null +++ b/SOURCES/quota-4.10-Add-quotactl_fd-support.patch @@ -0,0 +1,580 @@ +From ded570b1fffbeaefbecb6c191f0b5168f3b8ad0d Mon Sep 17 00:00:00 2001 +From: Carlos Maiolino +Date: Fri, 26 Jan 2024 19:02:10 +0100 +Subject: [PATCH 2/3] Add quotactl_fd() support + +To be able to set quotas on filesystems without a backing device, quota tools +should be able to use quotactl_fd(). +To achieve that, add a new helper, do_quotactl(), to select between quotactl() +and quotactl_fd(). + +This shouldn't change the semantics of current code. quotactl_fd() will be +called if and only if the handlers contain an empty device, and a valid +mountpoint. +All current calls containing a value device should be still handled by quotactl(). +The same is true for calls passing a NULL device on purpose, aiming to sync +active quotas. + +Signed-off-by: Carlos Maiolino +Signed-off-by: Lukas Czerner +Signed-off-by: Jan Kara +Signed-off-by: Pavel Reichl +--- + Makefile.am | 1 + + quotacheck.c | 12 +++++------ + quotaio.c | 4 ++-- + quotaio_generic.c | 12 +++++------ + quotaio_meta.c | 4 ++-- + quotaio_v1.c | 10 ++++----- + quotaio_v2.c | 12 +++++------ + quotaio_xfs.c | 21 ++++++++++-------- + quotaon.c | 8 +++---- + quotaon_xfs.c | 9 ++++---- + quotasync.c | 2 +- + quotasys.c | 55 ++++++++++++++++++++++++++++++++++++----------- + quotasys.h | 3 +++ + 13 files changed, 96 insertions(+), 57 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 372eafb..13a0f06 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -207,6 +207,7 @@ quotastats_SOURCES = \ + pot.h + + quotastats_LDADD = \ ++ libquota.a \ + $(INTLLIBS) + + xqmstats_SOURCES = \ +diff --git a/quotacheck.c b/quotacheck.c +index bd62d9a..e2c3bbd 100644 +--- a/quotacheck.c ++++ b/quotacheck.c +@@ -648,8 +648,8 @@ Please turn quotas off or use -f to force checking.\n"), + type2name(type), mnt->me_dir); + } + /* At least sync quotas so damage will be smaller */ +- if (quotactl(QCMD((kernel_iface == IFACE_GENERIC)? Q_SYNC : Q_6_5_SYNC, type), +- mnt->me_devname, 0, NULL) < 0) ++ if (do_quotactl(QCMD((kernel_iface == IFACE_GENERIC)? Q_SYNC : Q_6_5_SYNC, type), ++ mnt->me_devname, mnt->me_dir, 0, NULL) < 0) + die(4, _("Error while syncing quotas on %s: %s\n"), mnt->me_devname, strerror(errno)); + } + +@@ -848,8 +848,8 @@ static int dump_to_file(struct mount_entry *mnt, int type) + if (get_qf_name(mnt, type, cfmt, NF_FORMAT, &filename) < 0) + errstr(_("Cannot find checked quota file for %ss on %s!\n"), _(type2name(type)), mnt->me_devname); + else { +- if (quotactl(QCMD((kernel_iface == IFACE_GENERIC) ? Q_QUOTAOFF : Q_6_5_QUOTAOFF, type), +- mnt->me_devname, 0, NULL) < 0) ++ if (do_quotactl(QCMD((kernel_iface == IFACE_GENERIC) ? Q_QUOTAOFF : Q_6_5_QUOTAOFF, type), ++ mnt->me_devname, mnt->me_dir, 0, NULL) < 0) + errstr(_("Cannot turn %s quotas off on %s: %s\nKernel won't know about changes quotacheck did.\n"), + _(type2name(type)), mnt->me_devname, strerror(errno)); + else { +@@ -859,9 +859,9 @@ static int dump_to_file(struct mount_entry *mnt, int type) + rename_files(mnt, type); + + if (kernel_iface == IFACE_GENERIC) +- ret = quotactl(QCMD(Q_QUOTAON, type), mnt->me_devname, util2kernfmt(cfmt), filename); ++ ret = do_quotactl(QCMD(Q_QUOTAON, type), mnt->me_devname, mnt->me_dir, util2kernfmt(cfmt), filename); + else +- ret = quotactl(QCMD(Q_6_5_QUOTAON, type), mnt->me_devname, 0, filename); ++ ret = do_quotactl(QCMD(Q_6_5_QUOTAON, type), mnt->me_devname, mnt->me_dir, 0, filename); + if (ret < 0) + errstr(_("Cannot turn %s quotas on on %s: %s\nKernel won't know about changes quotacheck did.\n"), + _(type2name(type)), mnt->me_devname, strerror(errno)); +diff --git a/quotaio.c b/quotaio.c +index 94ae458..9bebb5e 100644 +--- a/quotaio.c ++++ b/quotaio.c +@@ -140,8 +140,8 @@ struct quota_handle *init_io(struct mount_entry *mnt, int type, int fmt, int fla + if (QIO_ENABLED(h)) { /* Kernel uses same file? */ + unsigned int cmd = + (kernel_iface == IFACE_GENERIC) ? Q_SYNC : Q_6_5_SYNC; +- if (quotactl(QCMD(cmd, h->qh_type), h->qh_quotadev, +- 0, NULL) < 0) { ++ if (do_quotactl(QCMD(cmd, h->qh_type), h->qh_quotadev, ++ h->qh_dir, 0, NULL) < 0) { + die(4, _("Cannot sync quotas on device %s: %s\n"), + h->qh_quotadev, strerror(errno)); + } +diff --git a/quotaio_generic.c b/quotaio_generic.c +index 5b23955..3c95872 100644 +--- a/quotaio_generic.c ++++ b/quotaio_generic.c +@@ -50,7 +50,7 @@ int vfs_get_info(struct quota_handle *h) + { + struct if_dqinfo kinfo; + +- if (quotactl(QCMD(Q_GETINFO, h->qh_type), h->qh_quotadev, 0, (void *)&kinfo) < 0) { ++ if (do_quotactl(QCMD(Q_GETINFO, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kinfo) < 0) { + errstr(_("Cannot get info for %s quota file from kernel on %s: %s\n"), type2name(h->qh_type), h->qh_quotadev, strerror(errno)); + return -1; + } +@@ -68,7 +68,7 @@ int vfs_set_info(struct quota_handle *h, int flags) + kinfo.dqi_igrace = h->qh_info.dqi_igrace; + kinfo.dqi_valid = flags; + +- if (quotactl(QCMD(Q_SETINFO, h->qh_type), h->qh_quotadev, 0, (void *)&kinfo) < 0) { ++ if (do_quotactl(QCMD(Q_SETINFO, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kinfo) < 0) { + errstr(_("Cannot set info for %s quota file from kernel on %s: %s\n"), type2name(h->qh_type), h->qh_quotadev, strerror(errno)); + return -1; + } +@@ -80,7 +80,7 @@ int vfs_get_dquot(struct dquot *dquot) + { + struct if_dqblk kdqblk; + +- if (quotactl(QCMD(Q_GETQUOTA, dquot->dq_h->qh_type), dquot->dq_h->qh_quotadev, dquot->dq_id, (void *)&kdqblk) < 0) { ++ if (do_quotactl(QCMD(Q_GETQUOTA, dquot->dq_h->qh_type), dquot->dq_h->qh_quotadev, dquot->dq_h->qh_dir, dquot->dq_id, (void *)&kdqblk) < 0) { + errstr(_("Cannot get quota for %s %d from kernel on %s: %s\n"), type2name(dquot->dq_h->qh_type), dquot->dq_id, dquot->dq_h->qh_quotadev, strerror(errno)); + return -1; + } +@@ -95,7 +95,7 @@ int vfs_set_dquot(struct dquot *dquot, int flags) + + generic_util2kerndqblk(&kdqblk, &dquot->dq_dqb); + kdqblk.dqb_valid = flags; +- if (quotactl(QCMD(Q_SETQUOTA, dquot->dq_h->qh_type), dquot->dq_h->qh_quotadev, dquot->dq_id, (void *)&kdqblk) < 0) { ++ if (do_quotactl(QCMD(Q_SETQUOTA, dquot->dq_h->qh_type), dquot->dq_h->qh_quotadev, dquot->dq_h->qh_dir, dquot->dq_id, (void *)&kdqblk) < 0) { + errstr(_("Cannot set quota for %s %d from kernel on %s: %s\n"), type2name(dquot->dq_h->qh_type), dquot->dq_id, dquot->dq_h->qh_quotadev, strerror(errno)); + return -1; + } +@@ -188,8 +188,8 @@ int vfs_scan_dquots(struct quota_handle *h, + + dquot->dq_h = h; + while (1) { +- ret = quotactl(QCMD(Q_GETNEXTQUOTA, h->qh_type), +- h->qh_quotadev, id, (void *)&kdqblk); ++ ret = do_quotactl(QCMD(Q_GETNEXTQUOTA, h->qh_type), ++ h->qh_quotadev, h->qh_dir, id, (void *)&kdqblk); + if (ret < 0) + break; + +diff --git a/quotaio_meta.c b/quotaio_meta.c +index ad6ff7a..51ebbcf 100644 +--- a/quotaio_meta.c ++++ b/quotaio_meta.c +@@ -59,8 +59,8 @@ static int meta_scan_dquots(struct quota_handle *h, int (*process_dquot)(struct + struct if_nextdqblk kdqblk; + int ret; + +- ret = quotactl(QCMD(Q_GETNEXTQUOTA, h->qh_type), h->qh_quotadev, 0, +- (void *)&kdqblk); ++ ret = do_quotactl(QCMD(Q_GETNEXTQUOTA, h->qh_type), h->qh_quotadev, ++ h->qh_dir, 0, (void *)&kdqblk); + /* + * Fall back to scanning using passwd if Q_GETNEXTQUOTA is not + * supported +diff --git a/quotaio_v1.c b/quotaio_v1.c +index 6a6dc78..187a5a5 100644 +--- a/quotaio_v1.c ++++ b/quotaio_v1.c +@@ -118,7 +118,7 @@ static int v1_init_io(struct quota_handle *h) + else { + struct v1_kern_dqblk kdqblk; + +- if (quotactl(QCMD(Q_V1_GETQUOTA, h->qh_type), h->qh_quotadev, 0, (void *)&kdqblk) < 0) { ++ if (do_quotactl(QCMD(Q_V1_GETQUOTA, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kdqblk) < 0) { + if (errno == EPERM) { /* We have no permission to get this information? */ + h->qh_info.dqi_bgrace = h->qh_info.dqi_igrace = 0; /* It hopefully won't be needed */ + } +@@ -193,11 +193,11 @@ static int v1_write_info(struct quota_handle *h) + else { + struct v1_kern_dqblk kdqblk; + +- if (quotactl(QCMD(Q_V1_GETQUOTA, h->qh_type), h->qh_quotadev, 0, (void *)&kdqblk) < 0) ++ if (do_quotactl(QCMD(Q_V1_GETQUOTA, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kdqblk) < 0) + return -1; + kdqblk.dqb_btime = h->qh_info.dqi_bgrace; + kdqblk.dqb_itime = h->qh_info.dqi_igrace; +- if (quotactl(QCMD(Q_V1_SETQUOTA, h->qh_type), h->qh_quotadev, 0, (void *)&kdqblk) < 0) ++ if (do_quotactl(QCMD(Q_V1_SETQUOTA, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kdqblk) < 0) + return -1; + } + } +@@ -237,7 +237,7 @@ static struct dquot *v1_read_dquot(struct quota_handle *h, qid_t id) + else { + struct v1_kern_dqblk kdqblk; + +- if (quotactl(QCMD(Q_V1_GETQUOTA, h->qh_type), h->qh_quotadev, id, (void *)&kdqblk) < 0) { ++ if (do_quotactl(QCMD(Q_V1_GETQUOTA, h->qh_type), h->qh_quotadev, h->qh_dir, id, (void *)&kdqblk) < 0) { + free(dquot); + return NULL; + } +@@ -299,7 +299,7 @@ static int v1_commit_dquot(struct dquot *dquot, int flags) + else + cmd = Q_V1_SETQUOTA; + v1_util2kerndqblk(&kdqblk, &dquot->dq_dqb); +- if (quotactl(QCMD(cmd, h->qh_type), h->qh_quotadev, dquot->dq_id, ++ if (do_quotactl(QCMD(cmd, h->qh_type), h->qh_quotadev, h->qh_dir, dquot->dq_id, + (void *)&kdqblk) < 0) + return -1; + } +diff --git a/quotaio_v2.c b/quotaio_v2.c +index 56a549f..b0fe7bf 100644 +--- a/quotaio_v2.c ++++ b/quotaio_v2.c +@@ -275,7 +275,7 @@ static int v2_init_io(struct quota_handle *h) + else { + struct v2_kern_dqinfo kdqinfo; + +- if (quotactl(QCMD(Q_V2_GETINFO, h->qh_type), h->qh_quotadev, 0, (void *)&kdqinfo) < 0) { ++ if (do_quotactl(QCMD(Q_V2_GETINFO, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kdqinfo) < 0) { + /* Temporary check just before fix gets to kernel */ + if (errno == EPERM) /* Don't have permission to get information? */ + return 0; +@@ -403,8 +403,8 @@ static int v2_write_info(struct quota_handle *h) + kdqinfo.dqi_blocks = h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks; + kdqinfo.dqi_free_blk = h->qh_info.u.v2_mdqi.dqi_qtree.dqi_free_blk; + kdqinfo.dqi_free_entry = h->qh_info.u.v2_mdqi.dqi_qtree.dqi_free_entry; +- if (quotactl(QCMD(Q_V2_SETGRACE, h->qh_type), h->qh_quotadev, 0, (void *)&kdqinfo) < 0 || +- quotactl(QCMD(Q_V2_SETFLAGS, h->qh_type), h->qh_quotadev, 0, (void *)&kdqinfo) < 0) ++ if (do_quotactl(QCMD(Q_V2_SETGRACE, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kdqinfo) < 0 || ++ do_quotactl(QCMD(Q_V2_SETFLAGS, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kdqinfo) < 0) + return -1; + } + } +@@ -441,7 +441,7 @@ static struct dquot *v2_read_dquot(struct quota_handle *h, qid_t id) + else { + struct v2_kern_dqblk kdqblk; + +- if (quotactl(QCMD(Q_V2_GETQUOTA, h->qh_type), h->qh_quotadev, id, (void *)&kdqblk) < 0) { ++ if (do_quotactl(QCMD(Q_V2_GETQUOTA, h->qh_type), h->qh_quotadev, h->qh_dir, id, (void *)&kdqblk) < 0) { + free(dquot); + return NULL; + } +@@ -485,8 +485,8 @@ static int v2_commit_dquot(struct dquot *dquot, int flags) + else + cmd = Q_V2_SETQUOTA; + v2_util2kerndqblk(&kdqblk, &dquot->dq_dqb); +- if (quotactl(QCMD(cmd, dquot->dq_h->qh_type), dquot->dq_h->qh_quotadev, +- dquot->dq_id, (void *)&kdqblk) < 0) ++ if (do_quotactl(QCMD(cmd, dquot->dq_h->qh_type), dquot->dq_h->qh_quotadev, ++ dquot->dq_h->qh_dir, dquot->dq_id, (void *)&kdqblk) < 0) + return -1; + } + return 0; +diff --git a/quotaio_xfs.c b/quotaio_xfs.c +index 5abb2c2..0bf6f34 100644 +--- a/quotaio_xfs.c ++++ b/quotaio_xfs.c +@@ -128,7 +128,7 @@ static int xfs_init_io(struct quota_handle *h) + + qcmd = QCMD(Q_XFS_GETQSTAT, h->qh_type); + memset(&info, 0, sizeof(struct xfs_mem_dqinfo)); +- if (quotactl(qcmd, h->qh_quotadev, 0, (void *)&info) < 0) ++ if (do_quotactl(qcmd, h->qh_quotadev, h->qh_dir, 0, (void *)&info) < 0) + return -1; + h->qh_info.dqi_bgrace = info.qs_btimelimit; + h->qh_info.dqi_igrace = info.qs_itimelimit; +@@ -153,7 +153,7 @@ static int xfs_write_info(struct quota_handle *h) + xdqblk.d_itimer = h->qh_info.dqi_igrace; + xdqblk.d_fieldmask |= FS_DQ_TIMER_MASK; + qcmd = QCMD(Q_XFS_SETQLIM, h->qh_type); +- if (quotactl(qcmd, h->qh_quotadev, 0, (void *)&xdqblk) < 0) ++ if (do_quotactl(qcmd, h->qh_quotadev, h->qh_dir, 0, (void *)&xdqblk) < 0) + return -1; + return 0; + } +@@ -174,7 +174,8 @@ static struct dquot *xfs_read_dquot(struct quota_handle *h, qid_t id) + return dquot; + + qcmd = QCMD(Q_XFS_GETQUOTA, h->qh_type); +- if (quotactl(qcmd, h->qh_quotadev, id, (void *)&xdqblk) < 0) { ++ if (do_quotactl(qcmd, h->qh_quotadev, h->qh_dir, ++ id, (void *)&xdqblk) < 0) { + ; + } + else { +@@ -219,7 +220,7 @@ static int xfs_commit_dquot(struct dquot *dquot, int flags) + } + + qcmd = QCMD(Q_XFS_SETQLIM, h->qh_type); +- if (quotactl(qcmd, h->qh_quotadev, id, (void *)&xdqblk) < 0) ++ if (do_quotactl(qcmd, h->qh_quotadev, h->qh_dir, id, (void *)&xdqblk) < 0) + return -1; + return 0; + } +@@ -234,7 +235,9 @@ static int xfs_get_dquot(struct dquot *dq) + int ret; + + memset(&d, 0, sizeof(d)); +- ret = quotactl(qcmd, dq->dq_h->qh_quotadev, dq->dq_id, (void *)&d); ++ ret = do_quotactl(qcmd, dq->dq_h->qh_quotadev, dq->dq_h->qh_dir, ++ dq->dq_id, (void *)&d); ++ + if (ret < 0) { + if (errno == ENOENT) + return 0; +@@ -254,8 +257,8 @@ static int xfs_kernel_scan_dquots(struct quota_handle *h, + + dquot->dq_h = h; + while (1) { +- ret = quotactl(QCMD(Q_XGETNEXTQUOTA, h->qh_type), +- h->qh_quotadev, id, (void *)&xdqblk); ++ ret = do_quotactl(QCMD(Q_XGETNEXTQUOTA, h->qh_type), ++ h->qh_quotadev, h->qh_dir, id, (void *)&xdqblk); + if (ret < 0) + break; + +@@ -286,8 +289,8 @@ static int xfs_scan_dquots(struct quota_handle *h, int (*process_dquot) (struct + int ret; + struct xfs_kern_dqblk xdqblk; + +- ret = quotactl(QCMD(Q_XGETNEXTQUOTA, h->qh_type), h->qh_quotadev, 0, +- (void *)&xdqblk); ++ ret = do_quotactl(QCMD(Q_XGETNEXTQUOTA, h->qh_type), h->qh_quotadev, ++ h->qh_dir, 0, (void *)&xdqblk); + if (ret < 0 && (errno == ENOSYS || errno == EINVAL)) { + if (!XFS_USRQUOTA(h) && !XFS_GRPQUOTA(h) && !XFS_PRJQUOTA(h)) + return 0; +diff --git a/quotaon.c b/quotaon.c +index 125b934..351c851 100644 +--- a/quotaon.c ++++ b/quotaon.c +@@ -152,13 +152,13 @@ static int quotarsquashonoff(const char *quotadev, int type, int flags) + + info.dqi_flags = V1_DQF_RSQUASH; + info.dqi_valid = IIF_FLAGS; +- ret = quotactl(qcmd, quotadev, 0, (void *)&info); ++ ret = do_quotactl(qcmd, quotadev, NULL, 0, (void *)&info); + } + else { + int mode = (flags & STATEFLAG_OFF) ? 0 : 1; + int qcmd = QCMD(Q_V1_RSQUASH, type); + +- ret = quotactl(qcmd, quotadev, 0, (void *)&mode); ++ ret = do_quotactl(qcmd, quotadev, NULL, 0, (void *)&mode); + } + if (ret < 0) { + errstr(_("set root_squash on %s: %s\n"), quotadev, strerror(errno)); +@@ -184,7 +184,7 @@ static int quotaonoff(const char *quotadev, const char *quotadir, char *quotafil + qcmd = QCMD(Q_QUOTAOFF, type); + else + qcmd = QCMD(Q_6_5_QUOTAOFF, type); +- if (quotactl(qcmd, quotadev, 0, NULL) < 0) { ++ if (do_quotactl(qcmd, quotadev, quotadir, 0, NULL) < 0) { + errstr(_("quotactl on %s [%s]: %s\n"), quotadev, quotadir, strerror(errno)); + return 1; + } +@@ -199,7 +199,7 @@ static int quotaonoff(const char *quotadev, const char *quotadir, char *quotafil + qcmd = QCMD(Q_6_5_QUOTAON, type); + kqf = 0; + } +- if (quotactl(qcmd, quotadev, kqf, (void *)quotafile) < 0) { ++ if (do_quotactl(qcmd, quotadev, quotadir, kqf, (void *)quotafile) < 0) { + if (errno == ENOENT) + errstr(_("cannot find %s on %s [%s]\n"), quotafile, quotadev, quotadir); + else +diff --git a/quotaon_xfs.c b/quotaon_xfs.c +index d137240..dda3023 100644 +--- a/quotaon_xfs.c ++++ b/quotaon_xfs.c +@@ -32,7 +32,7 @@ static int xfs_state_check(int qcmd, int type, int flags, const char *dev, int r + if (flags & STATEFLAG_ALL) + return 0; /* noop */ + +- if (quotactl(QCMD(Q_XFS_GETQSTAT, type), dev, 0, (void *)&info) < 0) { ++ if (do_quotactl(QCMD(Q_XFS_GETQSTAT, type), dev, NULL, 0, (void *)&info) < 0) { + errstr(_("quotactl() on %s: %s\n"), dev, strerror(errno)); + return -1; + } +@@ -156,7 +156,7 @@ static int xfs_onoff(const char *dev, int type, int flags, int roothack, int xop + if (check != 1) + return (check < 0); + +- if (quotactl(QCMD(qcmd, type), dev, 0, (void *)&xopts) < 0) { ++ if (do_quotactl(QCMD(qcmd, type), dev, NULL, 0, (void *)&xopts) < 0) { + errstr(_("quotactl on %s: %s\n"), dev, strerror(errno)); + return 1; + } +@@ -176,7 +176,7 @@ static int xfs_delete(const char *dev, int type, int flags, int roothack, int xo + if (check != 1) + return (check < 0); + +- if (quotactl(QCMD(qcmd, type), dev, 0, (void *)&xopts) < 0) { ++ if (do_quotactl(QCMD(qcmd, type), dev, NULL, 0, (void *)&xopts) < 0) { + errstr(_("Failed to delete quota: %s\n"), + strerror(errno)); + return 1; +@@ -208,7 +208,8 @@ int xfs_newstate(struct mount_entry *mnt, int type, char *xarg, int flags) + struct xfs_mem_dqinfo info; + u_int16_t sbflags = 0; + +- if (!quotactl(QCMD(Q_XFS_GETQSTAT, type), mnt->me_devname, 0, (void *)&info)) ++ if (!quotactl(QCMD(Q_XFS_GETQSTAT, type), mnt->me_devname, ++ mnt->me_dir, 0, (void *)&info)) + sbflags = (info.qs_flags & 0xff00) >> 8; + + if ((type == USRQUOTA && (sbflags & XFS_QUOTA_UDQ_ACCT)) && +diff --git a/quotasync.c b/quotasync.c +index 80f7e9e..cad2a20 100644 +--- a/quotasync.c ++++ b/quotasync.c +@@ -100,7 +100,7 @@ static int sync_one(int type, char *dev) + { + int qcmd = QCMD(Q_SYNC, type); + +- return quotactl(qcmd, dev, 0, NULL); ++ return do_quotactl(qcmd, dev, NULL, 0, NULL); + } + + static int syncquotas(int type) +diff --git a/quotasys.c b/quotasys.c +index 9af9932..903816b 100644 +--- a/quotasys.c ++++ b/quotasys.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include "pot.h" + #include "bylabel.h" +@@ -670,6 +671,36 @@ const char *str2number(const char *string, qsize_t *inodes) + return NULL; + } + ++/* ++ * Wrappers for quotactl syscalls ++ */ ++#ifdef SYS_quotactl_fd ++int do_quotactl(int cmd, const char *dev, const char *mnt, int id, caddr_t addr) ++{ ++ int ret = -EINVAL; ++ ++ if (mnt && !dev) { ++ int fd = open(mnt, O_DIRECTORY | O_PATH); ++ ++ if (fd < 0) { ++ errstr(_("Unable to get a filedescriptor from mountpoint: %s\n"), mnt); ++ return fd; ++ } ++ ++ ret = syscall(SYS_quotactl_fd, fd, cmd, id, addr); ++ close(fd); ++ return ret; ++ } ++ ++ return quotactl(cmd, dev, id, addr); ++} ++#else ++int do_quotactl(int cmd, const char *dev, const char *mnt, int id, caddr_t addr) ++{ ++ return quotactl(cmd, dev, id, addr); ++} ++#endif ++ + /* + * Wrappers for mount options processing functions + */ +@@ -685,7 +716,7 @@ static int hasxfsquota(const char *dev, struct mntent *mnt, int type, int flags) + return QF_XFS; + + memset(&info, 0, sizeof(struct xfs_mem_dqinfo)); +- if (!quotactl(QCMD(Q_XFS_GETQSTAT, type), dev, 0, (void *)&info)) { ++ if (!do_quotactl(QCMD(Q_XFS_GETQSTAT, type), dev, mnt->mnt_dir, 0, (void *)&info)) { + #ifdef XFS_ROOTHACK + int sbflags = (info.qs_flags & 0xff00) >> 8; + #endif /* XFS_ROOTHACK */ +@@ -719,7 +750,7 @@ static int hasvfsmetaquota(const char *dev, struct mntent *mnt, int type, int fl + { + uint32_t fmt; + +- if (!quotactl(QCMD(Q_GETFMT, type), dev, 0, (void *)&fmt)) ++ if (!do_quotactl(QCMD(Q_GETFMT, type), dev, mnt->mnt_dir, 0, (void *)&fmt)) + return QF_META; + return QF_ERROR; + } +@@ -796,7 +827,7 @@ static int hasquota(const char *dev, struct mntent *mnt, int type, int flags) + if (!strcmp(mnt->mnt_type, MNTTYPE_EXT4) || !strcmp(mnt->mnt_type, MNTTYPE_F2FS)) { + struct if_dqinfo kinfo; + +- if (quotactl(QCMD(Q_GETINFO, type), dev, 0, (void *)&kinfo) == 0) { ++ if (do_quotactl(QCMD(Q_GETINFO, type), dev, mnt->mnt_dir, 0, (void *)&kinfo) == 0) { + if (kinfo.dqi_flags & DQF_SYS_FILE) + return QF_META; + } +@@ -1069,11 +1100,11 @@ void init_kernel_interface(void) + else { + fs_quota_stat_t dummy; + +- if (!quotactl(QCMD(Q_XGETQSTAT, 0), "/dev/root", 0, (void *)&dummy) || ++ if (!do_quotactl(QCMD(Q_XGETQSTAT, 0), "/dev/root", NULL, 0, (void *)&dummy) || + (errno != EINVAL && errno != ENOSYS)) + kernel_qfmt[kernel_qfmt_num++] = QF_XFS; + } +- if (quotactl(QCMD(Q_V2_GETSTATS, 0), NULL, 0, (void *)&v2_stats) >= 0) { ++ if (do_quotactl(QCMD(Q_V2_GETSTATS, 0), NULL, NULL, 0, (void *)&v2_stats) >= 0) { + kernel_qfmt[kernel_qfmt_num++] = QF_VFSV0; + kernel_iface = IFACE_VFSV0; + } +@@ -1085,9 +1116,9 @@ void init_kernel_interface(void) + int err_quota = 0; + char tmp[1024]; /* Just temporary buffer */ + +- if (quotactl(QCMD(Q_V1_GETSTATS, 0), NULL, 0, tmp)) ++ if (do_quotactl(QCMD(Q_V1_GETSTATS, 0), NULL, NULL, 0, tmp)) + err_stat = errno; +- if (quotactl(QCMD(Q_V1_GETQUOTA, 0), "/dev/null", 0, tmp)) ++ if (do_quotactl(QCMD(Q_V1_GETQUOTA, 0), "/dev/null", NULL, 0, tmp)) + err_quota = errno; + + /* On a RedHat 2.4.2-2 we expect 0, EINVAL +@@ -1127,7 +1158,7 @@ static int v1_kern_quota_on(const char *dev, int type) + char tmp[1024]; /* Just temporary buffer */ + qid_t id = (type == USRQUOTA) ? getuid() : getgid(); + +- if (!quotactl(QCMD(Q_V1_GETQUOTA, type), dev, id, tmp)) /* OK? */ ++ if (!do_quotactl(QCMD(Q_V1_GETQUOTA, type), dev, NULL, id, tmp)) /* OK? */ + return 1; + return 0; + } +@@ -1138,7 +1169,7 @@ static int v2_kern_quota_on(const char *dev, int type) + char tmp[1024]; /* Just temporary buffer */ + qid_t id = (type == USRQUOTA) ? getuid() : getgid(); + +- if (!quotactl(QCMD(Q_V2_GETQUOTA, type), dev, id, tmp)) /* OK? */ ++ if (!do_quotactl(QCMD(Q_V2_GETQUOTA, type), dev, NULL, id, tmp)) /* OK? */ + return 1; + return 0; + } +@@ -1155,7 +1186,7 @@ int kern_quota_state_xfs(const char *dev, int type) + { + struct xfs_mem_dqinfo info; + +- if (!quotactl(QCMD(Q_XFS_GETQSTAT, type), dev, 0, (void *)&info)) { ++ if (!do_quotactl(QCMD(Q_XFS_GETQSTAT, type), dev, NULL, 0, (void *)&info)) { + if (type == USRQUOTA) { + return !!(info.qs_flags & XFS_QUOTA_UDQ_ACCT) + + !!(info.qs_flags & XFS_QUOTA_UDQ_ENFD); +@@ -1199,8 +1230,8 @@ int kern_quota_on(struct mount_entry *mnt, int type, int fmt) + if (kernel_iface == IFACE_GENERIC) { + int actfmt; + +- if (quotactl(QCMD(Q_GETFMT, type), mnt->me_devname, 0, +- (void *)&actfmt) >= 0) { ++ if (do_quotactl(QCMD(Q_GETFMT, type), mnt->me_devname, ++ mnt->me_dir, 0, (void *)&actfmt) >= 0) { + actfmt = kern2utilfmt(actfmt); + if (actfmt >= 0) + return actfmt; +diff --git a/quotasys.h b/quotasys.h +index 841251e..b166ad2 100644 +--- a/quotasys.h ++++ b/quotasys.h +@@ -206,6 +206,9 @@ void end_mounts_scan(void); + /* Parse kernel version and return 1 if ext4 supports quota feature */ + int ext4_supports_quota_feature(void); + ++/* Wrapper around quota syscalls, either call quotactl or quotactl_fd */ ++int do_quotactl(int cmd, const char *dev, const char *mnt, int id, caddr_t addr); ++ + /* Quota output formats */ + #define QOF_ERROR -1 + #define QOF_DEFAULT 0 +-- +2.45.2 + diff --git a/SOURCES/quota-4.10-Enable-support-for-tmpfs-quotas.patch b/SOURCES/quota-4.10-Enable-support-for-tmpfs-quotas.patch new file mode 100644 index 0000000..023dc68 --- /dev/null +++ b/SOURCES/quota-4.10-Enable-support-for-tmpfs-quotas.patch @@ -0,0 +1,336 @@ +From 00534e79856c8ce385ea1fdcdc2dcb32b1ed5de6 Mon Sep 17 00:00:00 2001 +From: Carlos Maiolino +Date: Fri, 26 Jan 2024 19:02:11 +0100 +Subject: [PATCH 3/3] Enable support for tmpfs quotas + +To achieve so, add a new function quotactl_handle() to the quotaio subsystem, +this will call do_quotactl() with or without a valid quotadev, according to the +filesystem type. + +Signed-off-by: Carlos Maiolino +Signed-off-by: Lukas Czerner +Signed-off-by: Jan Kara +Signed-off-by: Pavel Reichl +--- + mntopt.h | 1 + + quotaio.c | 19 +++++++++++++++++-- + quotaio.h | 2 ++ + quotaio_generic.c | 11 +++++------ + quotaio_meta.c | 3 +-- + quotaio_v1.c | 11 +++++------ + quotaio_v2.c | 11 +++++------ + quotaio_xfs.c | 4 ++-- + quotasys.c | 27 +++++++++++++++++++++------ + 9 files changed, 59 insertions(+), 30 deletions(-) + +diff --git a/mntopt.h b/mntopt.h +index 0f3b0c5..9b71990 100644 +--- a/mntopt.h ++++ b/mntopt.h +@@ -22,6 +22,7 @@ + #define MNTTYPE_MPFS "mpfs" /* EMC Celerra MPFS filesystem */ + #define MNTTYPE_OCFS2 "ocfs2" /* Oracle Cluster filesystem */ + #define MNTTYPE_GFS2 "gfs2" /* Red Hat Global filesystem 2 */ ++#define MNTTYPE_TMPFS "tmpfs" /* tmpfs filesystem */ + + #ifndef MNTTYPE_NFS + #define MNTTYPE_NFS "nfs" /* Network file system. */ +diff --git a/quotaio.c b/quotaio.c +index 9bebb5e..ae40d2a 100644 +--- a/quotaio.c ++++ b/quotaio.c +@@ -34,6 +34,22 @@ struct disk_dqheader { + u_int32_t dqh_version; + } __attribute__ ((packed)); + ++int quotactl_handle(int cmd, struct quota_handle *h, int id, void *addr) ++{ ++ int err = -EINVAL; ++ ++ if (!h) ++ return err; ++ ++ if (!strcmp(h->qh_fstype, MNTTYPE_TMPFS)) ++ err = do_quotactl(QCMD(cmd, h->qh_type), NULL, h->qh_dir, ++ id, addr); ++ else ++ err = do_quotactl(QCMD(cmd, h->qh_type), h->qh_quotadev, ++ h->qh_dir, id, addr); ++ ++ return err; ++} + /* + * Detect quota format and initialize quota IO + */ +@@ -140,8 +156,7 @@ struct quota_handle *init_io(struct mount_entry *mnt, int type, int fmt, int fla + if (QIO_ENABLED(h)) { /* Kernel uses same file? */ + unsigned int cmd = + (kernel_iface == IFACE_GENERIC) ? Q_SYNC : Q_6_5_SYNC; +- if (do_quotactl(QCMD(cmd, h->qh_type), h->qh_quotadev, +- h->qh_dir, 0, NULL) < 0) { ++ if (quotactl_handle(cmd, h, 0, NULL) < 0) { + die(4, _("Cannot sync quotas on device %s: %s\n"), + h->qh_quotadev, strerror(errno)); + } +diff --git a/quotaio.h b/quotaio.h +index 2c373b2..91689d9 100644 +--- a/quotaio.h ++++ b/quotaio.h +@@ -182,4 +182,6 @@ struct dquot *get_empty_dquot(void); + /* Check whether values in current dquot can be stored on disk */ + int check_dquot_range(struct dquot *dquot); + ++/* Uses do_quotactl() to call quotactl() or quotactl_fd() */ ++int quotactl_handle(int cmd, struct quota_handle *h, int id, void *addr); + #endif /* GUARD_QUOTAIO_H */ +diff --git a/quotaio_generic.c b/quotaio_generic.c +index 3c95872..cf03b59 100644 +--- a/quotaio_generic.c ++++ b/quotaio_generic.c +@@ -50,7 +50,7 @@ int vfs_get_info(struct quota_handle *h) + { + struct if_dqinfo kinfo; + +- if (do_quotactl(QCMD(Q_GETINFO, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kinfo) < 0) { ++ if (quotactl_handle(Q_GETINFO, h, 0, (void *)&kinfo) < 0) { + errstr(_("Cannot get info for %s quota file from kernel on %s: %s\n"), type2name(h->qh_type), h->qh_quotadev, strerror(errno)); + return -1; + } +@@ -68,7 +68,7 @@ int vfs_set_info(struct quota_handle *h, int flags) + kinfo.dqi_igrace = h->qh_info.dqi_igrace; + kinfo.dqi_valid = flags; + +- if (do_quotactl(QCMD(Q_SETINFO, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kinfo) < 0) { ++ if (quotactl_handle(Q_SETINFO, h, 0, (void *)&kinfo) < 0) { + errstr(_("Cannot set info for %s quota file from kernel on %s: %s\n"), type2name(h->qh_type), h->qh_quotadev, strerror(errno)); + return -1; + } +@@ -80,7 +80,7 @@ int vfs_get_dquot(struct dquot *dquot) + { + struct if_dqblk kdqblk; + +- if (do_quotactl(QCMD(Q_GETQUOTA, dquot->dq_h->qh_type), dquot->dq_h->qh_quotadev, dquot->dq_h->qh_dir, dquot->dq_id, (void *)&kdqblk) < 0) { ++ if (quotactl_handle(Q_GETQUOTA, dquot->dq_h, dquot->dq_id, (void *)&kdqblk) < 0) { + errstr(_("Cannot get quota for %s %d from kernel on %s: %s\n"), type2name(dquot->dq_h->qh_type), dquot->dq_id, dquot->dq_h->qh_quotadev, strerror(errno)); + return -1; + } +@@ -95,7 +95,7 @@ int vfs_set_dquot(struct dquot *dquot, int flags) + + generic_util2kerndqblk(&kdqblk, &dquot->dq_dqb); + kdqblk.dqb_valid = flags; +- if (do_quotactl(QCMD(Q_SETQUOTA, dquot->dq_h->qh_type), dquot->dq_h->qh_quotadev, dquot->dq_h->qh_dir, dquot->dq_id, (void *)&kdqblk) < 0) { ++ if (quotactl_handle(Q_SETQUOTA, dquot->dq_h, dquot->dq_id, (void *)&kdqblk) < 0) { + errstr(_("Cannot set quota for %s %d from kernel on %s: %s\n"), type2name(dquot->dq_h->qh_type), dquot->dq_id, dquot->dq_h->qh_quotadev, strerror(errno)); + return -1; + } +@@ -188,8 +188,7 @@ int vfs_scan_dquots(struct quota_handle *h, + + dquot->dq_h = h; + while (1) { +- ret = do_quotactl(QCMD(Q_GETNEXTQUOTA, h->qh_type), +- h->qh_quotadev, h->qh_dir, id, (void *)&kdqblk); ++ ret = quotactl_handle(Q_GETNEXTQUOTA, h, id, (void *)&kdqblk); + if (ret < 0) + break; + +diff --git a/quotaio_meta.c b/quotaio_meta.c +index 51ebbcf..99fdaf8 100644 +--- a/quotaio_meta.c ++++ b/quotaio_meta.c +@@ -59,8 +59,7 @@ static int meta_scan_dquots(struct quota_handle *h, int (*process_dquot)(struct + struct if_nextdqblk kdqblk; + int ret; + +- ret = do_quotactl(QCMD(Q_GETNEXTQUOTA, h->qh_type), h->qh_quotadev, +- h->qh_dir, 0, (void *)&kdqblk); ++ ret = quotactl_handle(Q_GETNEXTQUOTA, h, 0, (void *)&kdqblk); + /* + * Fall back to scanning using passwd if Q_GETNEXTQUOTA is not + * supported +diff --git a/quotaio_v1.c b/quotaio_v1.c +index 187a5a5..0b88d0c 100644 +--- a/quotaio_v1.c ++++ b/quotaio_v1.c +@@ -118,7 +118,7 @@ static int v1_init_io(struct quota_handle *h) + else { + struct v1_kern_dqblk kdqblk; + +- if (do_quotactl(QCMD(Q_V1_GETQUOTA, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kdqblk) < 0) { ++ if (quotactl_handle(Q_V1_GETQUOTA, h, 0, (void *)&kdqblk) < 0) { + if (errno == EPERM) { /* We have no permission to get this information? */ + h->qh_info.dqi_bgrace = h->qh_info.dqi_igrace = 0; /* It hopefully won't be needed */ + } +@@ -193,11 +193,11 @@ static int v1_write_info(struct quota_handle *h) + else { + struct v1_kern_dqblk kdqblk; + +- if (do_quotactl(QCMD(Q_V1_GETQUOTA, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kdqblk) < 0) ++ if (quotactl_handle(Q_V1_GETQUOTA, h, 0, (void *)&kdqblk) < 0) + return -1; + kdqblk.dqb_btime = h->qh_info.dqi_bgrace; + kdqblk.dqb_itime = h->qh_info.dqi_igrace; +- if (do_quotactl(QCMD(Q_V1_SETQUOTA, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kdqblk) < 0) ++ if (quotactl_handle(Q_V1_SETQUOTA, h, 0, (void *)&kdqblk) < 0) + return -1; + } + } +@@ -237,7 +237,7 @@ static struct dquot *v1_read_dquot(struct quota_handle *h, qid_t id) + else { + struct v1_kern_dqblk kdqblk; + +- if (do_quotactl(QCMD(Q_V1_GETQUOTA, h->qh_type), h->qh_quotadev, h->qh_dir, id, (void *)&kdqblk) < 0) { ++ if (quotactl_handle(Q_V1_GETQUOTA, h, id, (void *)&kdqblk) < 0) { + free(dquot); + return NULL; + } +@@ -299,8 +299,7 @@ static int v1_commit_dquot(struct dquot *dquot, int flags) + else + cmd = Q_V1_SETQUOTA; + v1_util2kerndqblk(&kdqblk, &dquot->dq_dqb); +- if (do_quotactl(QCMD(cmd, h->qh_type), h->qh_quotadev, h->qh_dir, dquot->dq_id, +- (void *)&kdqblk) < 0) ++ if (quotactl_handle(cmd, h, dquot->dq_id, (void *)&kdqblk) < 0) + return -1; + } + } +diff --git a/quotaio_v2.c b/quotaio_v2.c +index b0fe7bf..9927cad 100644 +--- a/quotaio_v2.c ++++ b/quotaio_v2.c +@@ -275,7 +275,7 @@ static int v2_init_io(struct quota_handle *h) + else { + struct v2_kern_dqinfo kdqinfo; + +- if (do_quotactl(QCMD(Q_V2_GETINFO, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kdqinfo) < 0) { ++ if (quotactl_handle(Q_V2_GETINFO, h, 0, (void *)&kdqinfo) < 0) { + /* Temporary check just before fix gets to kernel */ + if (errno == EPERM) /* Don't have permission to get information? */ + return 0; +@@ -403,8 +403,8 @@ static int v2_write_info(struct quota_handle *h) + kdqinfo.dqi_blocks = h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks; + kdqinfo.dqi_free_blk = h->qh_info.u.v2_mdqi.dqi_qtree.dqi_free_blk; + kdqinfo.dqi_free_entry = h->qh_info.u.v2_mdqi.dqi_qtree.dqi_free_entry; +- if (do_quotactl(QCMD(Q_V2_SETGRACE, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kdqinfo) < 0 || +- do_quotactl(QCMD(Q_V2_SETFLAGS, h->qh_type), h->qh_quotadev, h->qh_dir, 0, (void *)&kdqinfo) < 0) ++ if (quotactl_handle(Q_V2_SETGRACE, h, 0, (void *)&kdqinfo) < 0 || ++ quotactl_handle(Q_V2_SETFLAGS, h, 0, (void *)&kdqinfo) < 0) + return -1; + } + } +@@ -441,7 +441,7 @@ static struct dquot *v2_read_dquot(struct quota_handle *h, qid_t id) + else { + struct v2_kern_dqblk kdqblk; + +- if (do_quotactl(QCMD(Q_V2_GETQUOTA, h->qh_type), h->qh_quotadev, h->qh_dir, id, (void *)&kdqblk) < 0) { ++ if (quotactl_handle(Q_V2_GETQUOTA, h, id, (void *)&kdqblk) < 0) { + free(dquot); + return NULL; + } +@@ -485,8 +485,7 @@ static int v2_commit_dquot(struct dquot *dquot, int flags) + else + cmd = Q_V2_SETQUOTA; + v2_util2kerndqblk(&kdqblk, &dquot->dq_dqb); +- if (do_quotactl(QCMD(cmd, dquot->dq_h->qh_type), dquot->dq_h->qh_quotadev, +- dquot->dq_h->qh_dir, dquot->dq_id, (void *)&kdqblk) < 0) ++ if (quotactl_handle(cmd, dquot->dq_h, dquot->dq_id, (void *)&kdqblk) < 0) + return -1; + } + return 0; +diff --git a/quotaio_xfs.c b/quotaio_xfs.c +index 0bf6f34..d742f9c 100644 +--- a/quotaio_xfs.c ++++ b/quotaio_xfs.c +@@ -128,7 +128,7 @@ static int xfs_init_io(struct quota_handle *h) + + qcmd = QCMD(Q_XFS_GETQSTAT, h->qh_type); + memset(&info, 0, sizeof(struct xfs_mem_dqinfo)); +- if (do_quotactl(qcmd, h->qh_quotadev, h->qh_dir, 0, (void *)&info) < 0) ++ if (quotactl_handle(qcmd, h, 0, (void *)&info) < 0) + return -1; + h->qh_info.dqi_bgrace = info.qs_btimelimit; + h->qh_info.dqi_igrace = info.qs_itimelimit; +@@ -153,7 +153,7 @@ static int xfs_write_info(struct quota_handle *h) + xdqblk.d_itimer = h->qh_info.dqi_igrace; + xdqblk.d_fieldmask |= FS_DQ_TIMER_MASK; + qcmd = QCMD(Q_XFS_SETQLIM, h->qh_type); +- if (do_quotactl(qcmd, h->qh_quotadev, h->qh_dir, 0, (void *)&xdqblk) < 0) ++ if (quotactl_handle(qcmd, h, 0, (void *)&xdqblk) < 0) + return -1; + return 0; + } +diff --git a/quotasys.c b/quotasys.c +index 903816b..afe5f6d 100644 +--- a/quotasys.c ++++ b/quotasys.c +@@ -70,7 +70,15 @@ int nfs_fstype(char *type) + */ + int meta_qf_fstype(char *type) + { +- return !strcmp(type, MNTTYPE_OCFS2); ++ return !strcmp(type, MNTTYPE_OCFS2) || !strcmp(type, MNTTYPE_TMPFS); ++} ++ ++/* ++ * Check whether the filesystem is not using block device as a backing ++ */ ++int nodev_fstype(char *type) ++{ ++ return !strcmp(type, MNTTYPE_TMPFS) || nfs_fstype(type); + } + + /* +@@ -752,6 +760,7 @@ static int hasvfsmetaquota(const char *dev, struct mntent *mnt, int type, int fl + + if (!do_quotactl(QCMD(Q_GETFMT, type), dev, mnt->mnt_dir, 0, (void *)&fmt)) + return QF_META; ++ + return QF_ERROR; + } + +@@ -816,8 +825,13 @@ static int hasquota(const char *dev, struct mntent *mnt, int type, int flags) + !strcmp(mnt->mnt_type, MNTTYPE_XFS) || + !strcmp(mnt->mnt_type, MNTTYPE_EXFS)) + return hasxfsquota(dev, mnt, type, flags); ++ + if (!strcmp(mnt->mnt_type, MNTTYPE_OCFS2)) + return hasvfsmetaquota(dev, mnt, type, flags); ++ ++ /* tmpfs has no device, pass null here so quotactl_fd() is called */ ++ if (!strcmp(mnt->mnt_type, MNTTYPE_TMPFS)) ++ return hasvfsmetaquota(NULL, mnt, type, flags); + /* + * For ext4 we check whether it has quota in system files and if not, + * we fall back on checking standard quotas. Furthermore we cannot use +@@ -1384,7 +1398,7 @@ alloc: + continue; + } + +- if (!nfs_fstype(mnt->mnt_type)) { ++ if (!nodev_fstype(mnt->mnt_type)) { + if (stat(devname, &st) < 0) { /* Can't stat mounted device? */ + errstr(_("Cannot stat() mounted device %s: %s\n"), devname, strerror(errno)); + free((char *)devname); +@@ -1398,15 +1412,16 @@ alloc: + dev = st.st_rdev; + for (i = 0; i < mnt_entries_cnt && mnt_entries[i].me_dev != dev; i++); + } +- /* Cope with network filesystems or new mountpoint */ +- if (nfs_fstype(mnt->mnt_type) || i == mnt_entries_cnt) { ++ ++ /* Cope with filesystems without a block device or new mountpoint */ ++ if (nodev_fstype(mnt->mnt_type) || i == mnt_entries_cnt) { + if (stat(mnt->mnt_dir, &st) < 0) { /* Can't stat mountpoint? We have better ignore it... */ + errstr(_("Cannot stat() mountpoint %s: %s\n"), mnt->mnt_dir, strerror(errno)); + free((char *)devname); + continue; + } +- if (nfs_fstype(mnt->mnt_type)) { +- /* For network filesystems we must get device from root */ ++ if (nodev_fstype(mnt->mnt_type)) { ++ /* For filesystems without block device we must get device from root */ + dev = st.st_dev; + if (!(flags & MS_NFS_ALL)) { + for (i = 0; i < mnt_entries_cnt && mnt_entries[i].me_dev != dev; i++); +-- +2.45.2 + diff --git a/SOURCES/quota-4.10-Rename-searched_dir-sd_dir-to-sd_isdir.patch b/SOURCES/quota-4.10-Rename-searched_dir-sd_dir-to-sd_isdir.patch new file mode 100644 index 0000000..39c67df --- /dev/null +++ b/SOURCES/quota-4.10-Rename-searched_dir-sd_dir-to-sd_isdir.patch @@ -0,0 +1,52 @@ +From c18e5a1b1e51c0382f5d1431120fe65f7e9c982c Mon Sep 17 00:00:00 2001 +From: Carlos Maiolino +Date: Fri, 26 Jan 2024 19:02:09 +0100 +Subject: [PATCH 1/3] Rename searched_dir->sd_dir to sd_isdir + +The field holds information if we are searching a directory mountpoint or a +device, rename the field to something more meaningful. + +We could switch it to bool, but it seems pointless to include a whole header +just for it, so keep the int type. + +Signed-off-by: Carlos Maiolino +Signed-off-by: Jan Kara +Signed-off-by: Pavel Reichl +--- + quotasys.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/quotasys.c b/quotasys.c +index 3f50e32..9af9932 100644 +--- a/quotasys.c ++++ b/quotasys.c +@@ -1223,7 +1223,7 @@ int kern_quota_on(struct mount_entry *mnt, int type, int fmt) + */ + + struct searched_dir { +- int sd_dir; /* Is searched dir mountpoint or in fact device? */ ++ int sd_isdir; /* Is searched dir mountpoint or in fact device? */ + dev_t sd_dev; /* Device mountpoint lies on */ + ino_t sd_ino; /* Inode number of mountpoint */ + const char *sd_name; /* Name of given dir/device */ +@@ -1454,7 +1454,7 @@ static int process_dirs(int dcnt, char **dirs, int flags) + errstr(_("Cannot stat() given mountpoint %s: %s\nSkipping...\n"), dirs[i], strerror(errno)); + continue; + } +- check_dirs[check_dirs_cnt].sd_dir = S_ISDIR(st.st_mode); ++ check_dirs[check_dirs_cnt].sd_isdir = S_ISDIR(st.st_mode); + if (S_ISDIR(st.st_mode)) { + const char *realmnt = dirs[i]; + +@@ -1538,7 +1538,7 @@ restart: + return 0; + sd = check_dirs + act_checked; + for (i = 0; i < mnt_entries_cnt; i++) { +- if (sd->sd_dir) { ++ if (sd->sd_isdir) { + if (sd->sd_dev == mnt_entries[i].me_dev && sd->sd_ino == mnt_entries[i].me_ino) + break; + } +-- +2.45.2 + diff --git a/SOURCES/quota-4.10-quotaio_xfs-Fix-error-handling-in-xfs_read_dquot.patch b/SOURCES/quota-4.10-quotaio_xfs-Fix-error-handling-in-xfs_read_dquot.patch new file mode 100644 index 0000000..6adbfc1 --- /dev/null +++ b/SOURCES/quota-4.10-quotaio_xfs-Fix-error-handling-in-xfs_read_dquot.patch @@ -0,0 +1,36 @@ +From dba8c5ca95516b9550fc44b2a476ceca60ee4b38 Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Tue, 7 May 2024 12:55:30 +0200 +Subject: [PATCH] quotaio_xfs: Fix error handling in xfs_read_dquot() + +When quotactl(2) fails, xfs_read_dquot() will happily return zero-filled +structure. This is fine when the user structure does not exist but it is +wrong when there's other error (like EACCESS). Fix the error handling. + +Signed-off-by: Jan Kara +Signed-off-by: Pavel Reichl +--- + quotaio_xfs.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/quotaio_xfs.c b/quotaio_xfs.c +index d742f9c..040e7d8 100644 +--- a/quotaio_xfs.c ++++ b/quotaio_xfs.c +@@ -176,7 +176,12 @@ static struct dquot *xfs_read_dquot(struct quota_handle *h, qid_t id) + qcmd = QCMD(Q_XFS_GETQUOTA, h->qh_type); + if (do_quotactl(qcmd, h->qh_quotadev, h->qh_dir, + id, (void *)&xdqblk) < 0) { +- ; ++ /* ++ * ENOENT means the structure just does not exist - return all ++ * zeros. Otherwise return failure. ++ */ ++ if (errno != ENOENT) ++ return NULL; + } + else { + xfs_kern2utildqblk(&dquot->dq_dqb, &xdqblk); +-- +2.45.2 + diff --git a/SOURCES/quota-4.10-quotaio_xfs-Fix-quota-tools-on-XFS.patch b/SOURCES/quota-4.10-quotaio_xfs-Fix-quota-tools-on-XFS.patch new file mode 100644 index 0000000..13e6bed --- /dev/null +++ b/SOURCES/quota-4.10-quotaio_xfs-Fix-quota-tools-on-XFS.patch @@ -0,0 +1,64 @@ +From bd13b74e6d181638023d8a89316417643d9e7fd8 Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Tue, 7 May 2024 14:21:45 +0200 +Subject: [PATCH] quotaio_xfs: Fix quota-tools on XFS + +Patches implementing tmpfs quota support, commit 00534e79856c ("Enable +support for tmpfs quotas") in particular, broke quota-tools on XFS +because quotactl(2) syscall got called with wrong arguments. Fix it. + +Signed-off-by: Jan Kara +Signed-off-by: Pavel Reichl +--- + quotaio_xfs.c | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +diff --git a/quotaio_xfs.c b/quotaio_xfs.c +index 040e7d8..c10534d 100644 +--- a/quotaio_xfs.c ++++ b/quotaio_xfs.c +@@ -124,11 +124,9 @@ static inline int xfs_util2kerndqblk(struct xfs_kern_dqblk *k, struct util_dqblk + static int xfs_init_io(struct quota_handle *h) + { + struct xfs_mem_dqinfo info; +- int qcmd; + +- qcmd = QCMD(Q_XFS_GETQSTAT, h->qh_type); + memset(&info, 0, sizeof(struct xfs_mem_dqinfo)); +- if (quotactl_handle(qcmd, h, 0, (void *)&info) < 0) ++ if (quotactl_handle(Q_XFS_GETQSTAT, h, 0, (void *)&info) < 0) + return -1; + h->qh_info.dqi_bgrace = info.qs_btimelimit; + h->qh_info.dqi_igrace = info.qs_itimelimit; +@@ -142,7 +140,6 @@ static int xfs_init_io(struct quota_handle *h) + static int xfs_write_info(struct quota_handle *h) + { + struct xfs_kern_dqblk xdqblk; +- int qcmd; + + if (!XFS_USRQUOTA(h) && !XFS_GRPQUOTA(h) && !XFS_PRJQUOTA(h)) + return 0; +@@ -152,8 +149,7 @@ static int xfs_write_info(struct quota_handle *h) + xdqblk.d_btimer = h->qh_info.dqi_bgrace; + xdqblk.d_itimer = h->qh_info.dqi_igrace; + xdqblk.d_fieldmask |= FS_DQ_TIMER_MASK; +- qcmd = QCMD(Q_XFS_SETQLIM, h->qh_type); +- if (quotactl_handle(qcmd, h, 0, (void *)&xdqblk) < 0) ++ if (quotactl_handle(Q_XFS_SETQLIM, h, 0, (void *)&xdqblk) < 0) + return -1; + return 0; + } +@@ -180,8 +176,9 @@ static struct dquot *xfs_read_dquot(struct quota_handle *h, qid_t id) + * ENOENT means the structure just does not exist - return all + * zeros. Otherwise return failure. + */ +- if (errno != ENOENT) ++ if (errno != ENOENT) { + return NULL; ++ } + } + else { + xfs_kern2utildqblk(&dquot->dq_dqb, &xdqblk); +-- +2.45.2 + diff --git a/SOURCES/quota_nld.service b/SOURCES/quota_nld.service new file mode 100644 index 0000000..d533d01 --- /dev/null +++ b/SOURCES/quota_nld.service @@ -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 diff --git a/SOURCES/quota_nld.sysconfig b/SOURCES/quota_nld.sysconfig new file mode 100644 index 0000000..51df5be --- /dev/null +++ b/SOURCES/quota_nld.sysconfig @@ -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="" diff --git a/SOURCES/rpc-rquotad.service b/SOURCES/rpc-rquotad.service new file mode 100644 index 0000000..f9c794e --- /dev/null +++ b/SOURCES/rpc-rquotad.service @@ -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 diff --git a/SOURCES/rpc-rquotad.sysconfig b/SOURCES/rpc-rquotad.sysconfig new file mode 100644 index 0000000..4c67c13 --- /dev/null +++ b/SOURCES/rpc-rquotad.sysconfig @@ -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="" diff --git a/SPECS/quota.spec b/SPECS/quota.spec new file mode 100644 index 0000000..41bad1c --- /dev/null +++ b/SPECS/quota.spec @@ -0,0 +1,1050 @@ +# Scan ext file systems directly to increase the performace of a quota +# initialization and check +%bcond_without quota_enables_extdirect +# Use netlink to monitor quota usage and warn interactive users +%bcond_without quota_enables_netlink +# Enable getting quotas remotely over network +%bcond_without quota_enables_rpc +# Allow setting quota remotely over network +%bcond_without quota_enables_rpcsetquota +# Disable TCP Wrappers guard in the RPC quota daemon +%bcond_with quota_enables_tcpwrappers + +Name: quota +Epoch: 1 +Version: 4.09 +Release: 2%{?dist} +Summary: System administration tools for monitoring users' disk usage +# quota_nld.c, quotaio_xfs.h: GPLv2 +# bylabel.c copied from util-linux: GPLv2+ +# COPYING: GPLv2 text and a license declaration +## Only in quota-rpc binary package +# rquota_server.c: GPLv2+ +## Only in quota-rpc and quota-nls binary packages +# rquota_svc.c: GPLv2+ +# svc_socket.c copied from glibc: LGPLv2+ +## Only in quota-nls binary package +# po/cs.po: GPLv2+ +## Only in quota-warnquota binary package +# warnquota.c: GPLv2+ +## Not involved in any binary package +# aclocal.m4: FSFULLR and (GPLv2+ with exception) +# ar-lib: GPLv2 with exception +# depcomp: GPLv2+ with exception +# compile: GPLv2+ with exception +# config.guess: GPLv3+ with exception +# config.rpath: GPLv2+ with exception +# config.sub: GPLv3+ with exception +# configure: FSFUL +# install-sh: MIT and Public Domain +# m4/gettext.m4: GPL with exception +# m4/iconv.m4: GPL with exception +# m4/lib-ld.m4: GPL with exception +# m4/lib-link.m4: GPL with exception +# m4/lib-prefix.m4: GPL with exception +# m4/nls.m4: GPL with exception +# m4/po.m4: GPL with exception +# m4/progtest.m4: GPL with exception +# Makefile.in: FSFULLR +# missing: GPLv2+ with exception +# mkinstalldirs: Public Domain +License: GPLv2 and GPLv2+ +URL: http://sourceforge.net/projects/linuxquota/ +Source0: http://downloads.sourceforge.net/linuxquota/%{name}-%{version}.tar.gz +Source1: quota_nld.service +Source2: quota_nld.sysconfig +Source3: rpc-rquotad.service +Source4: rpc-rquotad.sysconfig +# Not accepted changes (378a64006bb1e818e84a1c77808563b802b028fa), bug #680919 +Patch0: quota-4.06-warnquota-configuration-tunes.patch +# Fix parsing a TCP port number +Patch1: quota-4.03-Validate-upper-bound-of-RPC-port.patch +Patch2: quota-4.10-Rename-searched_dir-sd_dir-to-sd_isdir.patch +Patch3: quota-4.10-Add-quotactl_fd-support.patch +Patch4: quota-4.10-Enable-support-for-tmpfs-quotas.patch +Patch5: quota-4.10-quotaio_xfs-Fix-error-handling-in-xfs_read_dquot.patch +Patch6: quota-4.10-quotaio_xfs-Fix-quota-tools-on-XFS.patch + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: bash +BuildRequires: coreutils +BuildRequires: e2fsprogs-devel +BuildRequires: gcc +BuildRequires: gettext-devel +BuildRequires: make +BuildRequires: openldap-devel +%if %{with quota_enables_extdirect} +BuildRequires: pkgconfig(com_err) +BuildRequires: pkgconfig(ext2fs) +%endif +%if %{with quota_enables_netlink} +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(libnl-3.0) >= 3.1 +BuildRequires: pkgconfig(libnl-genl-3.0) +BuildRequires: systemd-rpm-macros +%endif +%if %{with quota_enables_rpc} +BuildRequires: rpcgen +BuildRequires: pkgconfig(libtirpc) +BuildRequires: systemd-rpm-macros +%if %{with quota_enables_tcpwrappers} +BuildRequires: tcp_wrappers-devel +%endif +%endif +Requires: quota-nls = %{epoch}:%{version}-%{release} +Conflicts: kernel < 2.4 + +%description +The quota package contains system administration tools for monitoring +and limiting user and or group disk usage per file system. + + +%if %{with quota_enables_netlink} +%package nld +Summary: quota_nld daemon +License: GPLv2 and GPLv2+ +Requires: quota-nls = %{epoch}:%{version}-%{release} +# For %%{_unitdir} directory +Requires: systemd + +%description nld +Daemon that listens on netlink socket and processes received quota warnings. +Note, that you have to enable the kernel support for sending quota messages +over netlink (in Filesystems->Quota menu). The daemon supports forwarding +warning messages to the system D-Bus (so that desktop manager can display +a dialog) and writing them to the terminal user has last accessed. +%endif + + +%if %{with quota_enables_rpc} +%package rpc +Summary: RPC quota daemon +License: LGPLv2+ and GPLv2 and GPLv2+ +Requires: quota-nls = %{epoch}:%{version}-%{release} +Requires: rpcbind +# For %%{_unitdir} directory +Requires: systemd +%if %{with quota_enables_tcpwrappers} +Requires: tcp_wrappers +%endif +Conflicts: quota < 1:4.02-3 + +%description rpc +The RPC daemon allows to query and set disk quotas over network. If you run +the daemon on NFS server, you could use quota tools to manage the quotas from +NFS client. +%endif + + +%package warnquota +Summary: Send e-mail to users over quota +License: GPLv2 and GPLv2+ +Requires: quota-nls = %{epoch}:%{version}-%{release} + +%description warnquota +Utility that checks disk quota for each local file system and mails a warning +message to those users who have reached their soft limit. It is typically run +via cron(8). + + +%package nls +Summary: Gettext catalogs for disk quota tools +License: LGPLv2+ and GPLv2 and GPLv2+ +BuildArch: noarch + +%description nls +Disk quota tools messages translated into different natural languages. + + +%if %{with quota_enables_rpc} +%package devel +Summary: Development files for quota RPC +License: GPLv2 +# libtirpc-devel for an included +Requires: libtirpc-devel +# Do not run-require main package, the header files define RPC API to be +# implemented by the developer, not an API for an existing quota library. + +%description devel +This package contains development header files for implementing disk quotas +on remote machines. +%endif + + +%package doc +Summary: Additional documentation for disk quotas +Requires: quota = %{epoch}:%{version}-%{release} +BuildArch: noarch +AutoReq: 0 + +%description doc +This package contains additional documentation for disk quotas concept in +Linux/UNIX environment. + + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +# Regenerate build scripts +autoreconf -f -i + +%build +%global _hardened_build 1 +%configure \ + --enable-bsd-behaviour \ +%if %{with quota_enables_extdirect} + --enable-ext2direct=yes \ +%else + --enable-ext2direct=no \ +%endif + --enable-ldapmail=yes \ +%if %{with quota_enables_tcpwrappers} + --enable-libwrap=yes \ +%else + --disable-libwrap \ +%endif +%if %{with quota_enables_netlink} + --enable-netlink=yes \ +%else + --disable-netlink \ +%endif + --enable-nls \ + --with-pid-dir=/run \ + --disable-rpath \ +%if %{with quota_enables_rpc} + --enable-rpc=yes \ +%else + --disable-rpc \ +%endif +%if %{with quota_enables_rpcsetquota} + --enable-rpcsetquota=yes \ +%else + --disable-rpcsetquota \ +%endif + --disable-silent-rules \ + --disable-xfs-roothack +%{make_build} + + +%install +%{make_install} +rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name} + +%if %{with quota_enables_netlink} +install -p -m644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/quota_nld.service +install -p -m644 -D %{SOURCE2} \ + $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/quota_nld +%endif +%if %{with quota_enables_rpc} +install -p -m644 -D %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/rpc-rquotad.service +install -p -m644 -D %{SOURCE4} \ + $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/rpc-rquotad +%endif + +%find_lang %{name} + + +%check +make check + + +%if %{with quota_enables_netlink} +%post nld +%systemd_post quota_nld.service + +%preun nld +%systemd_preun quota_nld.service + +%postun nld +%systemd_postun_with_restart quota_nld.service +%endif + + +%if %{with quota_enables_rpc} +%post rpc +%systemd_post rpc-rquotad.service + +%preun rpc +%systemd_preun rpc-rquotad.service + +%postun rpc +%systemd_postun_with_restart rpc-rquotad.service +%endif + + +%files +%{_bindir}/* +%{_sbindir}/* +%exclude %{_sbindir}/quota_nld +%if %{with quota_enables_rpc} +%exclude %{_sbindir}/rpc.rquotad +%endif +%exclude %{_sbindir}/warnquota +%{_mandir}/man1/* +%{_mandir}/man8/* +%exclude %{_mandir}/man8/quota_nld.8* +%if %{with quota_enables_rpc} +%exclude %{_mandir}/man8/rpc.rquotad.8* +%endif +%exclude %{_mandir}/man8/warnquota.8* +%doc Changelog + +%if %{with quota_enables_netlink} +%files nld +%config(noreplace) %{_sysconfdir}/sysconfig/quota_nld +%{_unitdir}/quota_nld.service +%{_sbindir}/quota_nld +%{_mandir}/man8/quota_nld.8* +%doc Changelog +%endif + +%if %{with quota_enables_rpc} +%files rpc +%config(noreplace) %{_sysconfdir}/sysconfig/rpc-rquotad +%{_unitdir}/rpc-rquotad.service +%{_sbindir}/rpc.rquotad +%{_mandir}/man8/rpc.rquotad.8* +%doc Changelog +%endif + +%files warnquota +%config(noreplace) %{_sysconfdir}/quotagrpadmins +%config(noreplace) %{_sysconfdir}/quotatab +%config(noreplace) %{_sysconfdir}/warnquota.conf +%{_sbindir}/warnquota +%{_mandir}/man5/* +%{_mandir}/man8/warnquota.8* +%doc Changelog README.ldap-support README.mailserver + +%files nls -f %{name}.lang +# All the other packages require quota-nls, COPYING here is enough. +%license COPYING +%doc Changelog + +%if %{with quota_enables_rpc} +%files devel +%license COPYING +%dir %{_includedir}/rpcsvc +%{_includedir}/rpcsvc/* +%{_mandir}/man3/* +%endif + +%files doc +%doc doc/* ldap-scripts + + +%changelog +* Fri Jul 26 2024 Pavel Reichl - 1:4.09-2 +- Fix regression +- Related: RHEL-50644 + +* Mon Jun 10 2024 Pavel Reichl - 1:4.09-1 +- Update to new upstream version +- Add tmpfs quota support +- Remove rhel-only patches that were merged upstream + +* Tue Aug 10 2021 Mohan Boddu - 1:4.06-6 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Fri Apr 16 2021 Mohan Boddu - 1:4.06-5 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Wed Mar 17 2021 Petr Pisar - 1:4.06-4 +- Fix sa_mask initialization when registering PID file removal + (upstream bug #141) + +* Wed Jan 27 2021 Fedora Release Engineering - 1:4.06-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Dec 14 2020 Petr Pisar - 1:4.06-2 +- Remove a dead code from process_file() (upstream bug #54) +- Fix a compilation warning in quotaops.c +- Warn when kernel XFS large time stamp does fit into (32-bit) user-space + time_t +- Do not use a pointless compiler-internal __P() macro + +* Tue Nov 10 2020 Petr Pisar - 1:4.06-1 +- 4.06 bump + +* Fri Nov 06 2020 Petr Pisar - 1:4.05-17 +- Support grace period expirations past 2038 year for XFS +- Add a synopsis for a project quota option in the quota tool +- Add a --filesystem option to the quota tool +- Complain that ext4 external quota files are deprecated + +* Wed Sep 02 2020 Petr Pisar - 1:4.05-16 +- Require libtirpc-devel by quota-devel because of rpc/rpc.h + +* Mon Aug 24 2020 Petr Pisar - 1:4.05-15 +- Fix setting individual limits for XFS +- Modernize systemd unit packaging + +* Sat Aug 01 2020 Fedora Release Engineering - 1:4.05-14 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 1:4.05-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon May 18 2020 Petr Pisar - 1:4.05-12 +- Set kernel option when setting XFS grace times + +* Mon May 11 2020 Petr Pisar - 1:4.05-11 +- Pass quota type for Q_XFS_GETQSTAT + +* Thu Mar 26 2020 Petr Pisar - 1:4.05-10 +- Use an upstream's patch for ignoring disabled quotas (bug #1805110) + +* Fri Feb 21 2020 Petr Pisar - 1:4.05-9 +- Fix ignoring disabled quotas (bug #1805110) + +* Thu Jan 30 2020 Fedora Release Engineering - 1:4.05-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Nov 06 2019 Petr Pisar - 1:4.05-7 +- Remove a patch for freeing a parsed configuration in warnquota + +* Tue Nov 05 2019 Petr Pisar - 1:4.05-6 +- Optimize out useless checking of file systems with hidden quota files +- Fix warnquota --help output +- Fix checking for the LDAP failures in the warnquota tool +- Report detailed LDAP failures +- Document CC_TO in warquota.conf is looked up with LDAP +- Initialize all members of a configparams structure in warnquota +- Free parsed configuration in warnquota + +* Fri Jul 26 2019 Fedora Release Engineering - 1:4.05-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu May 30 2019 Petr Pisar - 1:4.05-4 +- Move quota_nld.pid file to /run (upstream patch #49) + +* Wed May 29 2019 Petr Pisar - 1:4.05-3 +- Run quota_nld service as tty group + +* Mon May 27 2019 Petr Pisar - 1:4.05-2 +- Report an error if an RPC fails on an explicitly requested file system + (upstream bug #134) +- Fix Free Software Foundation's postal address (upstream bug #133) + +* Tue Apr 02 2019 Petr Pisar - 1:4.05-1 +- 4.05 bump +- License changed (only edquota tool contains a BSD code now) +- quot tool was removed + +* Sat Feb 02 2019 Fedora Release Engineering - 1:4.04-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Aug 23 2018 Petr Pisar - 1:4.04-10 +- Fix file descriptor leaks in error code paths + +* Tue Jul 24 2018 Petr Pisar - 1:4.04-9 +- Distinguish between none quota limits and no allocated resources in quota(1) + tool output + +* Sat Jul 14 2018 Fedora Release Engineering - 1:4.04-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed May 30 2018 Petr Pisar - 1:4.04-7 +- Fix current block usage limit in RPC client + +* Tue May 22 2018 Petr Pisar - 1:4.04-6 +- Fix busy loop in rpc.rquotad (bug #1575956) + +* Fri Feb 09 2018 Fedora Release Engineering - 1:4.04-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Feb 05 2018 Petr Pisar - 1:4.04-4 +- Avoid questions in quotacheck non-interactive mode +- Report an error when quotacheck fails to cache quota files +- Report an error if quota file magic is invalid + +* Mon Feb 05 2018 Petr Pisar - 1:4.04-3 +- rpcgen tool split from glibc-common package +- Pass TIRPC header files location to all RPC compilation units +- Do not iterate over negative UIDs in repquota +- Fix mistakes in warnquota reported by GCC 8 + +* Thu Nov 30 2017 Petr Pisar - 1:4.04-2 +- Disable TCP wrappers (bug #1518778) + +* Wed Sep 06 2017 Petr Pisar - 1:4.04-1 +- 4.04 bump + +* Mon Aug 28 2017 Petr Pisar - 1:4.03-12 +- Fix memory leaks when running quotacheck on ext file systems (bug #1483543) + +* Thu Aug 03 2017 Fedora Release Engineering - 1:4.03-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1:4.03-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue Jul 04 2017 Petr Pisar - 1:4.03-9 +- Fix disabling features at build time +- Fix a race between checking for and opening a directory to be scanned +- Fix an undefined behavior on parsing yes-no answer +- Check for setuid and setgid calls failure in edquota tool +- Check for failures when reading edquota input +- Check for failures when duplicating a file handle + +* Sat Feb 11 2017 Fedora Release Engineering - 1:4.03-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Nov 10 2016 Petr Pisar - 1:4.03-7 +- Fix checking a block read error (upstream bug #123) +- Use direct scanning also for ext4 + +* Fri Jun 10 2016 Petr Pisar - 1:4.03-6 +- Correct repquota indentation for file systems with hiden quota files +- Remove unnecessary quota dependency from quota-devel package +- Break licenses down to each package + +* Thu Mar 10 2016 Petr Pisar - 1:4.03-5 +- Start rpc-rquotad.service when starting nfs-server.service + +* Thu Mar 03 2016 Petr Pisar - 1:4.03-4 +- Declare quota-rpc requires rpcbind because of the rpc.rquotad daemon + +* Mon Feb 22 2016 Petr Pisar - 1:4.03-3 +- Query kernel for next quota on XFS or file system with hidden quota files + (bug #1306195) + +* Thu Feb 04 2016 Fedora Release Engineering - 1:4.03-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jan 06 2016 Petr Pisar - 1:4.03-1 +- 4.03 bump +- Work around Autoconf bug not to link ldap library to everything + (bug #1296455) + +* Thu Jun 18 2015 Fedora Release Engineering - 1:4.02-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Apr 02 2015 Petr Pisar - 1:4.02-3 +- Move rpc.rquotad daemon into quota-rpc sub-package + +* Thu Apr 02 2015 Petr Pisar - 1:4.02-2 +- Add rpc-rquotad.service file which was known as nfs-rquotad.service + in nfs-utils (bug #1206260) + +* Wed Nov 26 2014 Petr Pisar - 1:4.02-1 +- 4.02 bump + +* Sun Aug 17 2014 Fedora Release Engineering - 1:4.01-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 1:4.01-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed Mar 05 2014 Petr Pisar - 1:4.01-12 +- Prevent from grace period overflow in RPC transport (bug #1072769) + +* Wed Oct 16 2013 Petr Pisar - 1:4.01-11 +- Move /sbin/* files under /usr (bug #983179) +- Harden executables due to rpc.rquotad and quota_nld daemons (bug #983179) +- Document quotagrpadmins(5), quotatab(5), warnquota.conf(5), rcp.rquota(8) + (bug #983179) + +* Sun Aug 04 2013 Fedora Release Engineering - 1:4.01-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Jun 13 2013 Petr Pisar - 1:4.01-9 +- Close FILE handles on error too + +* Wed Jun 12 2013 Petr Pisar - 1:4.01-8 +- Allow to set limits using multiplicative units + +* Mon May 27 2013 Petr Pisar - 1:4.01-7 +- Add LGPLv2+ and GPLv2 to license declaration +- Correct changelog dates +- Package additional LDAP scripts as a documentation +- Package XFS-specific tools + +* Mon May 20 2013 Petr Pisar - 1:4.01-6 +- Remove code for migration from systemv-style init script +- Drop useless dependency on initscripts (bug #964440) + +* Thu Mar 14 2013 Petr Pisar - 1:4.01-5 +- Add quotasync(1) manual page +- Fix quota, repquota, and quotasync usage help + +* Tue Feb 05 2013 Petr Pisar - 1:4.01-4 +- Do not fiddle with quota files on XFS and GFS (bug #846296) +- Make sure option -d at quotacheck provides at least as much information as + option -v (SF#3602777) + +* Mon Dec 03 2012 Petr Pisar - 1:4.01-3 +- Define charset in e-mails sent by warnquota (SF#3571589) + +* Tue Sep 25 2012 Petr Pisar - 1:4.01-2 +- Make group warning message more official + +* Fri Sep 07 2012 Petr Pisar - 1:4.01-1 +- 4.01 bump + +* Wed Aug 22 2012 Petr Pisar - 1:4.00-6 +- Modernize systemd scriptlets (bug #850288) + +* Sat Jul 21 2012 Fedora Release Engineering - 1:4.00-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jul 03 2012 Petr Pisar - 1:4.00-4 +- Fix editting more users with edquota +- Report all quotas on XFS (bug #837341) + +* Sat Jan 14 2012 Fedora Release Engineering - 1:4.00-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Sep 1 2011 Petr Pisar - 1:4.00-2 +- Remove unneeded cryptographic library build-time dependencies +- Fortify build-time configuration +- Migrate quota_nld service from sysvinit to systemd +- Document --print-below option in quota_nld service + +* Tue Aug 23 2011 Petr Pisar - 1:4.00-1 +- 4.00 bump +- Remove unneeded LDAP linking patch +- Prevent from stripping by configure option +- Remove unneeded sed scripts on sources +- Remove unneeded file removal + +* Thu Aug 18 2011 Petr Pisar - 1:4.00-0.17.pre1 +- Do not report missing utmp record to syslog (bug #731622) + +* Fri Jul 15 2011 Petr Pisar - 1:4.00-0.16.pre1 +- Report quotacheck failures by return code (bug #717982) +- Improve quotacheck error message (bug #717982) + +* Thu May 12 2011 Petr Pisar - 1:4.00-0.15.pre1 +- Make dirname static to work with nss_db (bug #703567) +- Clean spec file + +* Mon Apr 11 2011 Petr Pisar - 1:4.00-0.14.pre1 +- Initialize v2r1 ddquot padding in dump (bug #695409) +- Do not pass NULL to XGETQSTAT quotactl() + +* Mon Mar 21 2011 Petr Pisar - 1:4.00-0.13.pre1 +- Fix repquota to get latest quota info header (bug #689458) + +* Fri Mar 11 2011 Petr Pisar - 1:4.00-0.12.pre1 +- Fix ddquot buffer leak + +* Thu Mar 10 2011 Petr Pisar - 1:4.00-0.11.pre1 +- Disable grace period/times remote setting + +* Mon Feb 28 2011 Petr Pisar - 1:4.00-0.10.pre1 +- Do not use real domains in warnquota example + +* Thu Feb 17 2011 Petr Pisar - 1:4.00-0.9.pre1 +- Explain meaning of the second column in repquota output +- Make RPC handle properly host names with colons (i.e. IPv6 server host name) + +* Wed Feb 09 2011 Petr Pisar - 1:4.00-0.8.pre1 +- Initialize vfsold block and inode value boundries for new quota file + (bug #668688) + +* Tue Feb 08 2011 Fedora Release Engineering - 1:4.00-0.7.pre1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Feb 04 2011 Petr Pisar - 1:4.00-0.6.pre1 +- Store quota_nld PID into PID file (bug #634137) +- Do not allow non-root to control quota_nld service (bug #634137) +- Add quotasync tool (bug #596794) +- Implement quotacheck for GFS2 (bug #596794) + +* Wed Feb 02 2011 Petr Pisar - 1:4.00-0.5.pre1 +- Correct manual pages + +* Tue Jan 11 2011 Petr Pisar - 1:4.00-0.4.pre1 +- Make RPC block factor dynamic (bug #667757) +- Check whether set limits fit into the range supported by quota format + (bug #668688) +- Check set limits fit into the range supported by RPC transport (bug #668691) + +* Mon Jan 10 2011 Petr Pisar - 1:4.00-0.3.pre1 +- Document --always-resolve option + +* Tue Dec 14 2010 Petr Pisar - 1:4.00-0.2.pre1 +- Comment example quotatab to silent warnquota + +* Tue Nov 16 2010 Petr Pisar - 1:4.00-0.1.pre1 +- 4.00-pre1 bump +- Separate gettext catalogs becuase they are required by all binary sub-packages + +* Mon Nov 15 2010 Petr Pisar - 1:3.17-18 +- Break warnquota dependency on main package + +* Mon Nov 15 2010 Petr Pisar - 1:3.17-17 +- Convert Changelog to UTF-8 + +* Mon Nov 15 2010 Petr Pisar - 1:3.17-16 +- Break dependecies on main package as there are none +- Add plain text documentation to each sub-package +- Package additional documentation into `doc' sub-package + +* Thu Nov 11 2010 Petr Pisar - 1:3.17-15 +- Add quota_nld daemon init script (bug #634169) +- Sub-package quota_nld files to weak dependecies +- Sub-package warnquota files to weak dependecies + +* Wed Oct 06 2010 Petr Pisar - 1:3.17-14 +- Remove quotactl(2) as it's part of `man-pages' package (bug #640590) + +* Tue May 11 2010 Petr Pisar 1:3.17-13 +- Add GFS2 support + +* Mon May 10 2010 Petr Pisar 1:3.17-12 +- Prevent corruptive read/write from/to NULL address in rpc.rquotad + (Resolves #528581, example in #532342) +- Fix spelling in summary + +* Fri Mar 12 2010 Daniel Novotny 1:3.17-11 +- the require from previous fix deleted altogether (it will + be resolved automatically) + +* Fri Mar 12 2010 Daniel Novotny 1:3.17-10 +- Requires: e2fsprogs changed to e2fsprogs-libs (#570005) + +* Tue Feb 23 2010 Daniel Novotny 1:3.17-9 +- fix #565124 - FTBFS quota-3.17-8.fc13: ImplicitDSOLinking + +* Tue Sep 29 2009 Ondrej Vasik 1:3.17-8 +- add buildrequires for quota_nld, enable-netlink to build + quota_nld (#526047) + +* Fri Sep 18 2009 Ondrej Vasik 1:3.17-7 +- Fix headers and structs in quotactl manpage(#524138) + +* Fri Aug 28 2009 Ondrej Vasik 1:3.17-6 +- symlink manpage for rpc.rquotad + +* Sun Jul 26 2009 Fedora Release Engineering - 1:3.17-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Fri Mar 13 2009 Ondrej Vasik 1:3.17-4 +- clarify statements about LDAP in warnquota conf + (related to #490106) +- fix parsing issue in warnquota.c(#490125) +- enable rpcsetquota by default(#159292, #469753) + +* Fri Mar 13 2009 Ondrej Vasik 1:3.17-3 +- add missing buildrequires needed to compile with + enable-ldapmail=try option with LDAP(#490106) + +* Wed Feb 25 2009 Fedora Release Engineering - 1:3.17-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Jan 13 2009 Ondrej Vasik 1:3.17-1 +- new upstream release, remove already applied patches + +* Mon Dec 08 2008 Ondrej Vasik 1:3.16-8 +- fix documentation inconsistency (now rpc(3) instead of + rpc(3N) in rquotad manpage) (#474836) + +* Fri Nov 14 2008 Ondrej Vasik 1:3.16-7 +- fix quotaoff --help output (was same as quotaon output) + +* Thu Oct 30 2008 Ondrej Vasik 1:3.16-6 +- fix implementation of ext4 support + (by Mingming Cao, #469127) + +* Wed Sep 10 2008 Ondrej Vasik 1:3.16-5 +- fix rpmlint warnings - absolute symlink and not using epoch + in version in changelog (#226353) +- rquota headers and manpage now in devel subpackage + +* Wed Aug 27 2008 Ondrej Vasik 3.16-4 +- fix bug in warnquota which could result in bogus hostname + and domainname (upstream) +- remove IMMUTABLE flag from quota file in quotacheck(upstream) + +* Tue Aug 05 2008 Ondrej Vasik 3.16-3 +- Add support for -h option (do not show invalid option + error) at edquota,setquota and quota (#457898) + +* Fri Jun 20 2008 Ondrej Vasik 3.16-2 +- upstream fix of some typos, string formats + 4TB+ fix + for repquota +- some additional stripping removal +- change default mode of binaries from 555 to 755 + (strip error messages in build log) + +* Wed Apr 23 2008 Ondrej Vasik 3.16-1 +- own directory of rpcsvc headers(#442143) +- new upstream release + +* Wed Mar 12 2008 Ondrej Vasik 3.15-6 +- added enable-ldapmail=try option(wonder how #133207 + got closed by FC-4 without it or warnquota.conf change) +- dropped with-ext2direct=no option - this option is + invalid and original bug was fixed in 3.07 + +* Thu Mar 6 2008 Ondrej Vasik 3.15-5 +- added symbolic link for quotaoff man page(#436110) +- don't ship xqmstats.8 man page as we don't ship those + binaries(#436100) + +* Thu Feb 21 2008 Ondrej Vasik 3.15-4 +- added pointers to quota_nld and warnquota to some + manpages(upstream, #83975) + +* Tue Feb 12 2008 Ondrej Vasik 3.15-3 +- allow to build with rpcsetquota enabled(disabled by + default, #159292) +- rebuild for gcc43 + +* Thu Jan 24 2008 Steve Dickson 3.15-2 +- More review comments: + - BuiltPreReq to BuiltReq + - Removed '.' From Summary + - Added 'GPLv2+' to License Tag + - Condensed the _sysconfdir entries in to one line + +* Thu Jan 24 2008 Steve Dickson 3.15-1 +- Upgraded to version 3.15 +- Updated spec file per Merge Review (bz 226353) + +* Thu Feb 15 2007 Steve Dickson 3.14-1 +- Upgraded to version 3.14 (bz# 213641) + +* Mon Dec 4 2006 Thomas Woerner 1:3.13-1.3 +- tcp_wrappers has a new devel and libs sub package, therefore changing build + requirement for tcp_wrappers to tcp_wrappers-devel + +* Wed Nov 1 2006 Steve Dickson 1:3.13-1.2.3.2 +- Added range checking on -p flag (bz 205145) +- Error message prints garbage characters (bz 201226) + +* Wed Jul 12 2006 Jesse Keating - 1:3.13-1.2.3.1 +- rebuild + +* Fri Jun 30 2006 Steve Dickson - 1:3.13-1.2.3 +- fix 192826 - quota config files should not be overwritten + +* Fri Feb 10 2006 Jesse Keating - 1:3.13-1.2.1 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 1:3.13-1.2 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Mon Oct 31 2005 Steve Dickson 3.13-1 +- Upgraded to version 3.13 (bz# 171245) + +* Thu Aug 18 2005 Florian La Roche +- change the "Requires: kernel" into a "Conflicts:" + +* Sun Sep 26 2004 Rik van Riel 3.12-5 +- add URL (bz# 131862) + +* Fri Sep 24 2004 Steve Dickson +- Fixed typos in warnquota.conf patch + (bz# 82250 and bz# 83974) + +* Mon Sep 13 2004 Steve Dickson +- upgraded to 3.12 + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Tue Jan 27 2004 Florian La Roche +- add -pie support +- update to 3.10 + +* Sat Aug 16 2003 Steve Dickson +- upgraded to 3.0.9 +- added quota-3.09-root_sbindir.patch + +* Sun Aug 10 2003 Elliot Lee 3.06-11 +- Rebuild + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Tue May 27 2003 Steve Dickson +- rebuilt for 7.3 errata + +* Tue Feb 25 2003 Elliot Lee +- rebuilt + +* Sun Feb 23 2003 Tim Powers +- add buildprereq on tcp_wrappers + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Mon Nov 18 2002 Tim Powers +- rebuild on all arches + + +* Fri Sep 6 2002 Philip Copeland 3.06-5 +- added --with-ext2direct=no to fix #73244 + without this users with UID's > 65535 will not + be able to exist on a quota enabled FS + +* Wed Aug 7 2002 Philip Copeland 3.06-4 +- Man page change. #60108 + +* Tue Aug 6 2002 Philip Copeland 3.06-3 +- Bah, I'd dropped epoch from the spec file but seems + we need this if you want to upgrade as the epoch + number has precedence over the version/release + numbers. + +* Wed Jul 17 2002 Philip Copeland 3.06-2 +- Lets stop the makefile from stripping the + binaries as thats rpms job (apparently) + +* Mon Jul 01 2002 Philip Copeland 3.06-1 +- Ditched the 3.01-pre9 src base for 3.06 + Rebuilt without any patchs + +============================================================ + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Mon Feb 25 2002 Elliot Lee +- IfArch the badkernelinclude patch for ppc-only. +- Update to 3.03 + +* Wed Dec 12 2001 Guy Streeter +- Make #include of kernel header file work on non-x86 + +* Wed Sep 5 2001 Preston Brown +- require new initscripts + +* Thu Aug 30 2001 Preston Brown +- fixed bug #52075 (problem with ext2 labels) +- backup data files off by default in quotacheck, optional backup flag added +- fix bug where giving a bad directory or device would cause + quotaon/quotacheck to simulate "-a" behaviour +- if a device name (i.e /dev/hda1) is passed, look up the corresponding mount + point + +* Wed Aug 29 2001 Preston Brown +- return an error code in more cases in convertquota + +* Tue Aug 28 2001 Preston Brown +- 3.01pre9 + +* Fri Jul 20 2001 Preston Brown +- more cleanups on 3.01pre8 + +* Mon Jul 2 2001 Preston Brown +- 3.01 version, everything has changed again. :( + +* Sun Jun 24 2001 Elliot Lee +- Bump release + rebuild. + +* Fri Mar 30 2001 Preston Brown +- use rpc.rquotad from here again (#33738) + +* Thu Mar 15 2001 Preston Brown +- enable ALT_FORMAT for edquota + +* Tue Mar 13 2001 Preston Brown +- I broke passing devices on the cmd line. Fixed. + +* Fri Mar 09 2001 Preston Brown +- quota 3.00 is required by recent kernel 2.4 changes +- no warnquota included this time, not yet ported +- quite a bit of work on quotacheck to make is backwards compatible +- we will likely go back to "quota 2.00" as these projects merge... + +* Fri Feb 09 2001 Florian La Roche +- use "rm -f" instead of only "rm" + +* Wed Feb 7 2001 Preston Brown +- fix quotacheck man page for -a option (#26380) + +* Thu Feb 1 2001 Preston Brown +- 2.00 final, rolls in pretty much all our patches. :) +- fix reporting of in use dquot entries from quotastats +- change repquota man page to fix documentation of -v (#10330) +- include warnquota.conf + +* Mon Nov 20 2000 Bill Nottingham +- fix ia64 build + +* Mon Aug 21 2000 Jeff Johnson +- add LABEL=foo support (#16390). + +* Thu Jul 27 2000 Jeff Johnson +- remote NFS quotas with different blocksize converted incorrectly (#11932). + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Thu Jun 15 2000 Jeff Johnson +- FHS packaging. + +* Wed May 10 2000 Jeff Johnson +- apply patch5 (H.J. Lu) + +* Wed Feb 02 2000 Cristian Gafton +- fix description +- man pages are compressed + +* Tue Jan 18 2000 Preston Brown +- quota 2.00 series +- removed unnecessary patches + +* Thu Aug 5 1999 Jeff Johnson +- fix man page FUD (#4369). + +* Thu May 13 1999 Peter Hanecak +- changes to allow non-root users to build too (Makefile patch, %%attr) + +* Tue Apr 13 1999 Jeff Johnson +- fix for sparc64 quotas (#2147) + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 5) + +* Mon Dec 28 1998 Cristian Gafton +- don't install rpc.rquotad - we will use the one from the knfsd package + instead + +* Thu Dec 17 1998 Jeff Johnson +- merge ultrapenguin 1.1.9 changes. + +* Thu May 07 1998 Prospector System +- translations modified for de, fr, tr + +* Thu Apr 30 1998 Cristian Gafton +- removed patch for mntent + +* Fri Mar 27 1998 Jakub Jelinek +- updated to quota 1.66 + +* Tue Jan 13 1998 Erik Troan +- builds rquotad +- installs rpc.rquotad.8 symlink + +* Mon Oct 20 1997 Erik Troan +- removed /usr/include/rpcsvc/* from filelist +- uses a buildroot and %%attr + +* Thu Jun 19 1997 Erik Troan +- built against glibc + +* Tue Mar 25 1997 Erik Troan +- Moved /usr/sbin/quota to /usr/bin/quota