diff options
Diffstat (limited to 'meta/recipes-extended/quota')
-rw-r--r-- | meta/recipes-extended/quota/quota/0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch | 34 | ||||
-rw-r--r-- | meta/recipes-extended/quota/quota/fcntl.patch | 27 | ||||
-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 @@ | |||
1 | From 02b222a335527f1031cc9495d8c5ebc1bc5b1d4e Mon Sep 17 00:00:00 2001 | ||
2 | From: Fabrice Fontaine <fontaine.fabrice@gmail.com> | ||
3 | Date: Wed, 11 Nov 2020 15:00:47 +0100 | ||
4 | Subject: [PATCH] quota: Use realloc(3) instead of reallocarray(3) | ||
5 | |||
6 | reallocarray(3) has been added to glibc relatively recently (version | ||
7 | 2.26, from 2017) and apparently not all users run new enough glibc. Just | ||
8 | use realloc(3) for now since in this case there's no real risk of | ||
9 | overflow. | ||
10 | |||
11 | Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> | ||
12 | Signed-off-by: Jan Kara <jack@suse.cz> | ||
13 | Upstream-Status: Backport | ||
14 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
15 | --- | ||
16 | quota.c | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/quota.c b/quota.c | ||
20 | index 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 | -- | ||
33 | 2.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 @@ | |||
1 | From 00a456145531d194d3993c9f4cd404d5ca16c9df Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 6 Apr 2015 17:36:44 +0000 | ||
4 | Subject: [PATCH] quota: Fix build with musl | ||
5 | |||
1 | Include fcntl.h to pacify compiler errors on musl | 6 | Include fcntl.h to pacify compiler errors on musl |
2 | like | 7 | like |
3 | 8 | ||
@@ -9,20 +14,14 @@ Upstream-Status: Pending | |||
9 | 14 | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
11 | 16 | ||
12 | diff --git a/quota.h b/quota.h | 17 | --- |
13 | index 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_ */ | ||
24 | diff --git a/quotacheck.c b/quotacheck.c | 23 | diff --git a/quotacheck.c b/quotacheck.c |
25 | index 2cdf475..07c18a7 100644 | 24 | index 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> |
48 | diff --git a/rquota_client.c b/rquota_client.c | 47 | diff --git a/rquota_client.c b/rquota_client.c |
49 | index a3a4ae3..0ffe7a9 100644 | 48 | index 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 @@ | |||
1 | SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem" | 1 | SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem" |
2 | SECTION = "base" | 2 | SECTION = "base" |
3 | HOMEPAGE = "http://sourceforge.net/projects/linuxquota/" | 3 | HOMEPAGE = "http://sourceforge.net/projects/linuxquota/" |
4 | DESCRIPTION = "Tools and patches for the Linux Diskquota system as part of the Linux kernel" | ||
4 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136" | 5 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136" |
5 | LICENSE = "BSD & GPLv2+ & LGPLv2.1+" | 6 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" |
6 | LIC_FILES_CHKSUM = "file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \ | 7 | LIC_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 | ||
9 | SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \ | 10 | SRC_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 | " | 13 | SRC_URI[sha256sum] = "9cdaca154bc92afc3117f0e5f5b3208dd5f84583af1cf061c39baa0a2bb142f9" |
13 | SRC_URI[sha256sum] = "2f3e03039f378d4f0d97acdb49daf581dcaad64d2e1ddf129495fd579fbd268d" | ||
14 | 14 | ||
15 | CVE_PRODUCT = "linux_diskquota" | 15 | CVE_PRODUCT = "linux_diskquota" |
16 | 16 | ||
@@ -26,7 +26,7 @@ LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-ltirpc', '', d)}" | |||
26 | ASNEEDED = "" | 26 | ASNEEDED = "" |
27 | 27 | ||
28 | PACKAGECONFIG ??= "tcp-wrappers rpc bsd" | 28 | PACKAGECONFIG ??= "tcp-wrappers rpc bsd" |
29 | PACKAGECONFIG_libc-musl = "tcp-wrappers rpc" | 29 | PACKAGECONFIG:libc-musl = "tcp-wrappers rpc" |
30 | 30 | ||
31 | PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" | 31 | PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" |
32 | PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc" | 32 | PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc" |