summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/quota
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/quota')
-rw-r--r--meta/recipes-extended/quota/quota/0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch34
-rw-r--r--meta/recipes-extended/quota/quota/fcntl.patch27
-rw-r--r--meta/recipes-extended/quota/quota_4.09.bb (renamed from meta/recipes-extended/quota/quota_4.06.bb)10
3 files changed, 18 insertions, 53 deletions
diff --git a/meta/recipes-extended/quota/quota/0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch b/meta/recipes-extended/quota/quota/0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch
deleted file mode 100644
index 34ded2d857..0000000000
--- a/meta/recipes-extended/quota/quota/0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 02b222a335527f1031cc9495d8c5ebc1bc5b1d4e Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3Date: Wed, 11 Nov 2020 15:00:47 +0100
4Subject: [PATCH] quota: Use realloc(3) instead of reallocarray(3)
5
6reallocarray(3) has been added to glibc relatively recently (version
72.26, from 2017) and apparently not all users run new enough glibc. Just
8use realloc(3) for now since in this case there's no real risk of
9overflow.
10
11Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
12Signed-off-by: Jan Kara <jack@suse.cz>
13Upstream-Status: Backport
14Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
15---
16 quota.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/quota.c b/quota.c
20index a6ed61f..a60de12 100644
21--- a/quota.c
22+++ b/quota.c
23@@ -385,7 +385,7 @@ int main(int argc, char **argv)
24 break;
25 case 259:
26 fscount++;
27- fsnames = reallocarray(fsnames, fscount, sizeof(char *));
28+ fsnames = realloc(fsnames, fscount * sizeof(char *));
29 if (!fsnames)
30 die(1, _("Not enough memory for filesystem names"));
31 fsnames[fscount - 1] = optarg;
32--
332.17.1
34
diff --git a/meta/recipes-extended/quota/quota/fcntl.patch b/meta/recipes-extended/quota/quota/fcntl.patch
index 51a770ce6e..09a0c687b6 100644
--- a/meta/recipes-extended/quota/quota/fcntl.patch
+++ b/meta/recipes-extended/quota/quota/fcntl.patch
@@ -1,3 +1,8 @@
1From 00a456145531d194d3993c9f4cd404d5ca16c9df Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 6 Apr 2015 17:36:44 +0000
4Subject: [PATCH] quota: Fix build with musl
5
1Include fcntl.h to pacify compiler errors on musl 6Include fcntl.h to pacify compiler errors on musl
2like 7like
3 8
@@ -9,20 +14,14 @@ Upstream-Status: Pending
9 14
10Signed-off-by: Khem Raj <raj.khem@gmail.com> 15Signed-off-by: Khem Raj <raj.khem@gmail.com>
11 16
12diff --git a/quota.h b/quota.h 17---
13index 4c21411..d20c217 100644 18 quotacheck.c | 1 +
14--- a/quota.h 19 quotaio.c | 1 +
15+++ b/quota.h 20 rquota_client.c | 4 ++++
16@@ -182,6 +182,6 @@ enum { 21 3 files changed, 6 insertions(+)
17 #endif 22
18 #endif
19
20-long quotactl __P((int, const char *, qid_t, caddr_t));
21+long quotactl (int, const char *, qid_t, caddr_t);
22
23 #endif /* _QUOTA_ */
24diff --git a/quotacheck.c b/quotacheck.c 23diff --git a/quotacheck.c b/quotacheck.c
25index 2cdf475..07c18a7 100644 24index bd62d9a..772a27d 100644
26--- a/quotacheck.c 25--- a/quotacheck.c
27+++ b/quotacheck.c 26+++ b/quotacheck.c
28@@ -19,6 +19,7 @@ 27@@ -19,6 +19,7 @@
@@ -46,7 +45,7 @@ index 94ae458..d57fc1a 100644
46 #include <sys/stat.h> 45 #include <sys/stat.h>
47 #include <sys/file.h> 46 #include <sys/file.h>
48diff --git a/rquota_client.c b/rquota_client.c 47diff --git a/rquota_client.c b/rquota_client.c
49index a3a4ae3..0ffe7a9 100644 48index 7f8e821..d48505a 100644
50--- a/rquota_client.c 49--- a/rquota_client.c
51+++ b/rquota_client.c 50+++ b/rquota_client.c
52@@ -19,7 +19,9 @@ 51@@ -19,7 +19,9 @@
diff --git a/meta/recipes-extended/quota/quota_4.06.bb b/meta/recipes-extended/quota/quota_4.09.bb
index 19ccbd588a..b779657dfc 100644
--- a/meta/recipes-extended/quota/quota_4.06.bb
+++ b/meta/recipes-extended/quota/quota_4.09.bb
@@ -1,16 +1,16 @@
1SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem" 1SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem"
2SECTION = "base" 2SECTION = "base"
3HOMEPAGE = "http://sourceforge.net/projects/linuxquota/" 3HOMEPAGE = "http://sourceforge.net/projects/linuxquota/"
4DESCRIPTION = "Tools and patches for the Linux Diskquota system as part of the Linux kernel"
4BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136" 5BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136"
5LICENSE = "BSD & GPLv2+ & LGPLv2.1+" 6LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
6LIC_FILES_CHKSUM = "file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \ 7LIC_FILES_CHKSUM = "file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \
7 file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb" 8 file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
8 9
9SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \ 10SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \
10 file://fcntl.patch \ 11 file://fcntl.patch \
11 file://0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch \ 12 "
12 " 13SRC_URI[sha256sum] = "9cdaca154bc92afc3117f0e5f5b3208dd5f84583af1cf061c39baa0a2bb142f9"
13SRC_URI[sha256sum] = "2f3e03039f378d4f0d97acdb49daf581dcaad64d2e1ddf129495fd579fbd268d"
14 14
15CVE_PRODUCT = "linux_diskquota" 15CVE_PRODUCT = "linux_diskquota"
16 16
@@ -26,7 +26,7 @@ LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-ltirpc', '', d)}"
26ASNEEDED = "" 26ASNEEDED = ""
27 27
28PACKAGECONFIG ??= "tcp-wrappers rpc bsd" 28PACKAGECONFIG ??= "tcp-wrappers rpc bsd"
29PACKAGECONFIG_libc-musl = "tcp-wrappers rpc" 29PACKAGECONFIG:libc-musl = "tcp-wrappers rpc"
30 30
31PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" 31PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
32PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc" 32PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc"