From fc641e6c56337e562400f143485992bd5c425320 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 4 Dec 2020 21:07:19 +0100 Subject: quota: upgrade 4.05 -> 4.06 (From OE-Core rev: e638788ddeaaf19203c08ee5d36ec0f126271704) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- ...a-Use-realloc-3-instead-of-reallocarray-3.patch | 34 ++++++++++++++++++++++ meta/recipes-extended/quota/quota_4.05.bb | 34 ---------------------- meta/recipes-extended/quota/quota_4.06.bb | 34 ++++++++++++++++++++++ 3 files changed, 68 insertions(+), 34 deletions(-) create mode 100644 meta/recipes-extended/quota/quota/0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch delete mode 100644 meta/recipes-extended/quota/quota_4.05.bb create mode 100644 meta/recipes-extended/quota/quota_4.06.bb (limited to 'meta/recipes-extended/quota') 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 new file mode 100644 index 0000000000..34ded2d857 --- /dev/null +++ b/meta/recipes-extended/quota/quota/0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch @@ -0,0 +1,34 @@ +From 02b222a335527f1031cc9495d8c5ebc1bc5b1d4e Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Wed, 11 Nov 2020 15:00:47 +0100 +Subject: [PATCH] quota: Use realloc(3) instead of reallocarray(3) + +reallocarray(3) has been added to glibc relatively recently (version +2.26, from 2017) and apparently not all users run new enough glibc. Just +use realloc(3) for now since in this case there's no real risk of +overflow. + +Signed-off-by: Fabrice Fontaine +Signed-off-by: Jan Kara +Upstream-Status: Backport +Signed-off-by: Alexander Kanavin +--- + quota.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/quota.c b/quota.c +index a6ed61f..a60de12 100644 +--- a/quota.c ++++ b/quota.c +@@ -385,7 +385,7 @@ int main(int argc, char **argv) + break; + case 259: + fscount++; +- fsnames = reallocarray(fsnames, fscount, sizeof(char *)); ++ fsnames = realloc(fsnames, fscount * sizeof(char *)); + if (!fsnames) + die(1, _("Not enough memory for filesystem names")); + fsnames[fscount - 1] = optarg; +-- +2.17.1 + diff --git a/meta/recipes-extended/quota/quota_4.05.bb b/meta/recipes-extended/quota/quota_4.05.bb deleted file mode 100644 index c5da1e71ed..0000000000 --- a/meta/recipes-extended/quota/quota_4.05.bb +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem" -SECTION = "base" -HOMEPAGE = "http://sourceforge.net/projects/linuxquota/" -BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136" -LICENSE = "BSD & GPLv2+ & LGPLv2.1+" -LIC_FILES_CHKSUM = "file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \ - file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb" - -SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \ - file://fcntl.patch \ - " -SRC_URI[md5sum] = "1c1dbd2cd3d680ccac661239b067e147" -SRC_URI[sha256sum] = "ef3b5b5d1014ed1344b46c1826145e20cbef8db967b522403c9a060761cf7ab9" - -CVE_PRODUCT = "linux_diskquota" - -UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/linuxquota/files/quota-tools/" -UPSTREAM_CHECK_REGEX = "/quota-tools/(?P(\d+[\.\-_]*)+)/" - -DEPENDS = "gettext-native e2fsprogs libnl dbus" - -inherit autotools-brokensep gettext pkgconfig - -CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-I${STAGING_INCDIR}/tirpc', '', d)}" -LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-ltirpc', '', d)}" -ASNEEDED = "" - -PACKAGECONFIG ??= "tcp-wrappers rpc bsd" -PACKAGECONFIG_libc-musl = "tcp-wrappers rpc" - -PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" -PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc" -PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no," -PACKAGECONFIG[ldapmail] = "--enable-ldapmail,--disable-ldapmail,openldap" diff --git a/meta/recipes-extended/quota/quota_4.06.bb b/meta/recipes-extended/quota/quota_4.06.bb new file mode 100644 index 0000000000..19ccbd588a --- /dev/null +++ b/meta/recipes-extended/quota/quota_4.06.bb @@ -0,0 +1,34 @@ +SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem" +SECTION = "base" +HOMEPAGE = "http://sourceforge.net/projects/linuxquota/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136" +LICENSE = "BSD & GPLv2+ & LGPLv2.1+" +LIC_FILES_CHKSUM = "file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \ + file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb" + +SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \ + file://fcntl.patch \ + file://0001-quota-Use-realloc-3-instead-of-reallocarray-3.patch \ + " +SRC_URI[sha256sum] = "2f3e03039f378d4f0d97acdb49daf581dcaad64d2e1ddf129495fd579fbd268d" + +CVE_PRODUCT = "linux_diskquota" + +UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/linuxquota/files/quota-tools/" +UPSTREAM_CHECK_REGEX = "/quota-tools/(?P(\d+[\.\-_]*)+)/" + +DEPENDS = "gettext-native e2fsprogs libnl dbus" + +inherit autotools-brokensep gettext pkgconfig + +CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-I${STAGING_INCDIR}/tirpc', '', d)}" +LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-ltirpc', '', d)}" +ASNEEDED = "" + +PACKAGECONFIG ??= "tcp-wrappers rpc bsd" +PACKAGECONFIG_libc-musl = "tcp-wrappers rpc" + +PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" +PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc" +PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no," +PACKAGECONFIG[ldapmail] = "--enable-ldapmail,--disable-ldapmail,openldap" -- cgit v1.2.3-54-g00ecf