summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/quota
diff options
context:
space:
mode:
authorMaxin B. John <maxin.john@intel.com>2017-11-10 14:00:24 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-21 13:06:11 +0000
commit811c07db35354bf97e765942f701896a7433f5b7 (patch)
treeef99cbafce2f56415ba38b768a632441baafa90c /meta/recipes-extended/quota
parent7902adefa00b3534ec9f38f8578dd3f4efee6018 (diff)
downloadpoky-811c07db35354bf97e765942f701896a7433f5b7.tar.gz
quota: upgrade to 4.04
4.03 -> 4.04 Removed the following backported patches: 1. 0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch 2. 0001-Fix-build-with-disabled-ldap.patch 3. 0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch 4. 0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch 5. 0004-Fix-warnings-due-to-missing-stdlib.h.patch Refreshed the following patch: 1. replace_getrpcbynumber_r.patch (From OE-Core rev: 0fb3d1fa1af5a2ff7bbc4ef1c84e4135f119d701) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/quota')
-rw-r--r--meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch33
-rw-r--r--meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch93
-rw-r--r--meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch83
-rw-r--r--meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch153
-rw-r--r--meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch62
-rw-r--r--meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch46
-rw-r--r--meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch40
-rw-r--r--meta/recipes-extended/quota/quota_4.04.bb (renamed from meta/recipes-extended/quota/quota_4.03.bb)10
8 files changed, 28 insertions, 492 deletions
diff --git a/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch b/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch
deleted file mode 100644
index 6add4708ae..0000000000
--- a/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From 776757a23e9930588950c7fcbc7827ec7a3e51c4 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
3Date: Mon, 4 Jan 2016 15:48:19 +0100
4Subject: [PATCH] Do not accidentaly override commandline passed CFLAGS.
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Upstream-Status: Backport
10
11Signed-off-by: Tomáš Chvátal <tchvatal@suse.com>
12Signed-off-by: Jan Kara <jack@suse.cz>
13Signed-off-by: Maxin B. John <maxin.john@intel.com>
14---
15 configure.ac | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/configure.ac b/configure.ac
19index 3ba1386..1552c15 100644
20--- a/configure.ac
21+++ b/configure.ac
22@@ -53,7 +53,7 @@ AS_IF([test "x${prefix}" = "xNONE"], [
23 # ================
24 # Check for cflags
25 # ================
26-CFLAGS="-D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
27+CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
28 AC_ARG_ENABLE([werror],
29 [AS_HELP_STRING([--enable-werror], [Treat all warnings as errors, useful for development])],
30 [enable_werror="$enableval"],
31--
322.4.0
33
diff --git a/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch b/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch
deleted file mode 100644
index a79e477968..0000000000
--- a/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch
+++ /dev/null
@@ -1,93 +0,0 @@
1From 39fd30ce57e3c34c3649866bf9345a71f0b78667 Mon Sep 17 00:00:00 2001
2From: Jan Kara <jack@suse.cz>
3Date: Mon, 4 Jan 2016 15:10:53 +0100
4Subject: [PATCH] Fix build with disabled ldap
5
6Upstream-Status: Backport
7
8Reported-by: Tomas Chvatal <tchvatal@suse.com>
9Signed-off-by: Jan Kara <jack@suse.cz>
10Signed-off-by: Maxin B. John <maxin.john@intel.com>
11---
12 warnquota.c | 36 ++++++++++++++++++------------------
13 1 file changed, 18 insertions(+), 18 deletions(-)
14
15diff --git a/warnquota.c b/warnquota.c
16index 3734f0e..e9868c1 100644
17--- a/warnquota.c
18+++ b/warnquota.c
19@@ -109,13 +109,13 @@ struct configparams {
20 char *user_signature;
21 char *group_message;
22 char *group_signature;
23+ time_t cc_before;
24+#ifdef USE_LDAP_MAIL_LOOKUP
25 int use_ldap_mail; /* 0 */
26+ int ldap_is_setup; /* 0 */
27 int ldap_starttls; /* 0 */
28 int ldap_tls; /* LDAP_OPT_X_TLS_NEVER */
29 int ldap_vers; /* LDAP_VERSION3 */
30- time_t cc_before;
31-#ifdef USE_LDAP_MAIL_LOOKUP
32- int ldap_is_setup; /* 0 */
33 char ldap_host[CNF_BUFFER];
34 int ldap_port;
35 char ldap_uri[CNF_BUFFER];
36@@ -729,13 +729,13 @@ static int readconfigfile(const char *filename, struct configparams *config)
37 }
38 maildev[0] = 0;
39 config->user_signature = config->user_message = config->group_signature = config->group_message = NULL;
40+ config->cc_before = -1;
41+
42+#ifdef USE_LDAP_MAIL_LOOKUP
43 config->use_ldap_mail = 0;
44 config->ldap_starttls = 0;
45 config->ldap_tls = LDAP_OPT_X_TLS_NEVER;
46 config->ldap_vers = LDAP_VERSION3;
47- config->cc_before = -1;
48-
49-#ifdef USE_LDAP_MAIL_LOOKUP
50 config->ldap_port = config->ldap_is_setup = 0;
51 config->ldap_host[0] = 0;
52 config->ldap_uri[0] = 0;
53@@ -820,6 +820,18 @@ static int readconfigfile(const char *filename, struct configparams *config)
54 create_eoln(config->group_signature);
55 verify_format(config->group_signature, "GROUP_SIGNATURE");
56 }
57+ else if (!strcmp(var, "CC_BEFORE")) {
58+ int num;
59+ char unit[10];
60+
61+ if (sscanf(value, "%d%s", &num, unit) != 2)
62+ goto cc_parse_err;
63+ if (str2timeunits(num, unit, &config->cc_before) < 0) {
64+cc_parse_err:
65+ die(1, _("Cannot parse time at CC_BEFORE variable (line %d).\n"), line);
66+ }
67+ }
68+#ifdef USE_LDAP_MAIL_LOOKUP
69 else if (!strcmp(var, "LDAP_MAIL")) {
70 if(strcasecmp(value, "true") == 0)
71 config->use_ldap_mail = 1;
72@@ -846,18 +858,6 @@ static int readconfigfile(const char *filename, struct configparams *config)
73 else
74 config->ldap_starttls = 0;
75 }
76- else if (!strcmp(var, "CC_BEFORE")) {
77- int num;
78- char unit[10];
79-
80- if (sscanf(value, "%d%s", &num, unit) != 2)
81- goto cc_parse_err;
82- if (str2timeunits(num, unit, &config->cc_before) < 0) {
83-cc_parse_err:
84- die(1, _("Cannot parse time at CC_BEFORE variable (line %d).\n"), line);
85- }
86- }
87-#ifdef USE_LDAP_MAIL_LOOKUP
88 else if (!strcmp(var, "LDAP_HOST"))
89 sstrncpy(config->ldap_host, value, CNF_BUFFER);
90 else if (!strcmp(var, "LDAP_PORT"))
91--
922.4.0
93
diff --git a/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch b/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch
deleted file mode 100644
index 6fb2daf532..0000000000
--- a/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch
+++ /dev/null
@@ -1,83 +0,0 @@
1Upstream-Status: Backport
2
3Signed-off-by: Kai Kang <kai.kang@windriver.com>
4---
5From feca6d2e55d992bbe176ee8faa734c105eb1b2e1 Mon Sep 17 00:00:00 2001
6From: Theodore Ts'o <tytso@mit.edu>
7Date: Tue, 29 Mar 2016 20:48:05 -0400
8Subject: [PATCH] Use NGROUPS_MAX instead of NGROUPS
9
10NGRROUPS_MAX is what is defined by SuSv3; NGROUPS is not guaranteed by
11any standard, but is just an ancient BSD'ism. Since Android's bionic
12libc has the former but not the latter, let's use NGROUPS_MAX instead.
13
14Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15Signed-off-by: Jan Kara <jack@suse.cz>
16---
17 quota.c | 5 +++--
18 quotaops.c | 5 +++--
19 2 files changed, 6 insertions(+), 4 deletions(-)
20
21diff --git a/quota.c b/quota.c
22index 049dac4..e195ead 100644
23--- a/quota.c
24+++ b/quota.c
25@@ -48,6 +48,7 @@
26 #include <errno.h>
27 #include <string.h>
28 #include <unistd.h>
29+#include <limits.h>
30 #ifdef RPC
31 #include <rpc/rpc.h>
32 #include "rquota.h"
33@@ -296,7 +297,7 @@ static int showquotas(int type, qid_t id, int mntcnt, char **mnt)
34 int main(int argc, char **argv)
35 {
36 int ngroups;
37- gid_t gidset[NGROUPS], *gidsetp;
38+ gid_t gidset[NGROUPS_MAX], *gidsetp;
39 int i, ret;
40 struct option long_opts[] = {
41 { "help", 0, NULL, 'h' },
42@@ -405,7 +406,7 @@ int main(int argc, char **argv)
43 ret |= showquotas(USRQUOTA, getuid(), argc, argv);
44 if (flags & FL_GROUP) {
45 ngroups = sysconf(_SC_NGROUPS_MAX);
46- if (ngroups > NGROUPS) {
47+ if (ngroups > NGROUPS_MAX) {
48 gidsetp = malloc(ngroups * sizeof(gid_t));
49 if (!gidsetp)
50 die(1, _("Gid set allocation (%d): %s\n"), ngroups, strerror(errno));
51diff --git a/quotaops.c b/quotaops.c
52index 136aec3..590dc1b 100644
53--- a/quotaops.c
54+++ b/quotaops.c
55@@ -51,6 +51,7 @@
56 #include <unistd.h>
57 #include <time.h>
58 #include <ctype.h>
59+#include <limits.h>
60
61 #if defined(RPC)
62 #include "rquota.h"
63@@ -97,7 +98,7 @@ struct dquot *getprivs(qid_t id, struct quota_handle **handles, int quiet)
64 #if defined(BSD_BEHAVIOUR)
65 int j, ngroups;
66 uid_t euid;
67- gid_t gidset[NGROUPS], *gidsetp;
68+ gid_t gidset[NGROUPS_MAX], *gidsetp;
69 #endif
70
71 for (i = 0; handles[i]; i++) {
72@@ -115,7 +116,7 @@ struct dquot *getprivs(qid_t id, struct quota_handle **handles, int quiet)
73 if (geteuid() == 0)
74 break;
75 ngroups = sysconf(_SC_NGROUPS_MAX);
76- if (ngroups > NGROUPS) {
77+ if (ngroups > NGROUPS_MAX) {
78 gidsetp = malloc(ngroups * sizeof(gid_t));
79 if (!gidsetp) {
80 gid2group(id, name);
81--
822.6.1
83
diff --git a/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch b/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch
deleted file mode 100644
index 6cea548edc..0000000000
--- a/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch
+++ /dev/null
@@ -1,153 +0,0 @@
1Upstream-Status: Backport
2
3Signed-off-by: Kai Kang <kai.kang@windriver.com>
4---
5From f30e1ada8326463cc0af048afa058bc2f1dc9370 Mon Sep 17 00:00:00 2001
6From: Theodore Ts'o <tytso@mit.edu>
7Date: Tue, 29 Mar 2016 20:48:04 -0400
8Subject: [PATCH] Allow building on systems that do not have rpc header files
9
10Android's bionic C library doesn't have Sun RPC support.
11
12Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13Signed-off-by: Jan Kara <jack@suse.cz>
14---
15 Makefile.am | 30 ++++++++++++++++--------------
16 quotaops.c | 2 ++
17 setquota.c | 2 ++
18 3 files changed, 20 insertions(+), 14 deletions(-)
19
20diff --git a/Makefile.am b/Makefile.am
21index 6d7ea0e..82db99f 100644
22--- a/Makefile.am
23+++ b/Makefile.am
24@@ -1,7 +1,5 @@
25 ACLOCAL_AMFLAGS = -I m4
26
27-BUILT_SOURCES = rquota.h rquota.c rquota_clnt.c
28-
29 docdir = $(datadir)/doc/@PACKAGE@
30 doc_DATA = \
31 README.mailserver \
32@@ -12,11 +10,6 @@ doc_DATA = \
33 doc/quotas.preformated \
34 doc/quotas-1.eps
35
36-rpcsvcdir = $(includedir)/rpcsvc
37-rpcsvc_DATA = \
38- rquota.h \
39- rquota.x
40-
41 sysconf_DATA = \
42 warnquota.conf \
43 quotatab \
44@@ -35,15 +28,12 @@ man_MANS = \
45 quota.1 \
46 quot.8 \
47 repquota.8 \
48- rpc.rquotad.8 \
49 rquota.3 \
50 setquota.8 \
51 warnquota.conf.5 \
52 warnquota.8 \
53 xqmstats.8
54
55-CLEANFILES = rquota.c rquota.h rquota_clnt.c
56-
57 SUBDIRS = po
58
59 EXTRA_DIST = \
60@@ -55,9 +45,15 @@ EXTRA_DIST = \
61 Changelog \
62 ldap-scripts
63
64-noinst_LIBRARIES = \
65- libquota.a \
66- librpcclient.a
67+noinst_LIBRARIES = libquota.a
68+
69+if WITH_RPC
70+rpcsvcdir = $(includedir)/rpcsvc
71+rpcsvc_DATA = \
72+ rquota.h \
73+ rquota.x
74+
75+noinst_LIBRARIES += librpcclient.a
76
77 librpcclient_a_SOURCES = \
78 rquota.c \
79@@ -67,8 +63,10 @@ librpcclient_a_SOURCES = \
80 rquota_clnt.c
81 librpcclient_a_CFLAGS = -Wno-unused
82
83-if WITH_RPC
84 RPCLIBS = librpcclient.a
85+BUILT_SOURCES = rquota.h rquota.c rquota_clnt.c
86+CLEANFILES = rquota.c rquota.h rquota_clnt.c
87+man_MANS += rpc.rquotad.8
88 endif
89
90 libquota_a_SOURCES = \
91@@ -217,6 +215,7 @@ convertquota_LDADD = \
92 libquota.a \
93 $(RPCLIBS)
94
95+if WITH_RPC
96 rpc_rquotad_SOURCES = \
97 rquota_server.c \
98 rquota_svc.c \
99@@ -225,6 +224,7 @@ rpc_rquotad_LDADD = \
100 libquota.a \
101 $(WRAP_LIBS) \
102 $(RPCLIBS)
103+endif
104
105 quota_nld_SOURCES = quota_nld.c
106 quota_nld_CFLAGS = \
107@@ -236,6 +236,7 @@ quota_nld_LDADD = \
108 $(DBUS_LIBS) \
109 $(LIBNL3_LIBS)
110
111+if WITH_RPC
112 # ------------------
113 # Rpcgen conversions
114 # ------------------
115@@ -250,6 +251,7 @@ quota_nld_LDADD = \
116 rquota_clnt.c: rquota.x
117 @rm -f $@
118 @$(RPCGEN) -l -o $@ $<
119+endif
120
121 # --------
122 # Quotaoff
123diff --git a/quotaops.c b/quotaops.c
124index 47ef9a7..136aec3 100644
125--- a/quotaops.c
126+++ b/quotaops.c
127@@ -34,7 +34,9 @@
128
129 #include "config.h"
130
131+#if defined(RPC)
132 #include <rpc/rpc.h>
133+#endif
134 #include <sys/types.h>
135 #include <sys/stat.h>
136 #include <sys/file.h>
137diff --git a/setquota.c b/setquota.c
138index 51d7b3c..8ecd9c3 100644
139--- a/setquota.c
140+++ b/setquota.c
141@@ -7,7 +7,9 @@
142
143 #include "config.h"
144
145+#if defined(RPC)
146 #include <rpc/rpc.h>
147+#endif
148 #include <sys/types.h>
149 #include <errno.h>
150 #include <stdio.h>
151--
1522.6.1
153
diff --git a/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch b/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch
deleted file mode 100644
index 1455384129..0000000000
--- a/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1Upstream-Status: Backport
2
3Signed-off-by: Kai Kang <kai.kang@windriver.com>
4---
5From c7a76237e7a51a69d0236ebfc191e462f805cf4e Mon Sep 17 00:00:00 2001
6From: Lars Wendler <polynomial-c@gentoo.org>
7Date: Mon, 15 Feb 2016 14:42:14 +0100
8Subject: [PATCH] Don't build rpc.rquotad when --disable-rpc was requested.
9
10This fixes a buch of undefined references:
11
12x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O2 -pipe -D_GNU_SOURCE -Wa
13ll -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -pie -Wl,-O1 -Wl,--hash-st
14yle=gnu -Wl,--sort-common -Wl,--as-needed -o rpc.rquotad rquota_server.o rquota_
15svc.o svc_socket.o libquota.a
16rquota_svc.o: In function `rquotaprog_2':
17rquota_svc.c:(.text+0x1d3): undefined reference to `xdr_setquota_rslt'
18rquota_svc.c:(.text+0x1da): undefined reference to `xdr_ext_setquota_args'
19rquota_svc.c:(.text+0x2b2): undefined reference to `xdr_setquota_rslt'
20rquota_svc.c:(.text+0x2b9): undefined reference to `xdr_ext_setquota_args'
21rquota_svc.c:(.text+0x2ff): undefined reference to `xdr_getquota_rslt'
22rquota_svc.c:(.text+0x306): undefined reference to `xdr_ext_getquota_args'
23rquota_svc.c:(.text+0x31a): undefined reference to `xdr_getquota_rslt'
24rquota_svc.c:(.text+0x321): undefined reference to `xdr_ext_getquota_args'
25rquota_svc.o: In function `rquotaprog_1':
26rquota_svc.c:(.text+0x3f3): undefined reference to `xdr_setquota_rslt'
27rquota_svc.c:(.text+0x3fa): undefined reference to `xdr_setquota_args'
28rquota_svc.c:(.text+0x4d2): undefined reference to `xdr_setquota_rslt'
29rquota_svc.c:(.text+0x4d9): undefined reference to `xdr_setquota_args'
30rquota_svc.c:(.text+0x51f): undefined reference to `xdr_getquota_rslt'
31rquota_svc.c:(.text+0x526): undefined reference to `xdr_getquota_args'
32rquota_svc.c:(.text+0x53a): undefined reference to `xdr_getquota_rslt'
33rquota_svc.c:(.text+0x541): undefined reference to `xdr_getquota_args'
34collect2: error: ld returned 1 exit status
35Makefile:901: recipe for target 'rpc.rquotad' failed
36
37Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
38Signed-off-by: Jan Kara <jack@suse.cz>
39---
40 Makefile.am | 5 ++++-
41 1 file changed, 4 insertions(+), 1 deletion(-)
42
43diff --git a/Makefile.am b/Makefile.am
44index 77f8400..6d7ea0e 100644
45--- a/Makefile.am
46+++ b/Makefile.am
47@@ -116,8 +116,11 @@ sbin_PROGRAMS = \
48 xqmstats \
49 edquota \
50 setquota \
51- convertquota \
52+ convertquota
53+if WITH_RPC
54+sbin_PROGRAMS += \
55 rpc.rquotad
56+endif
57 if WITH_NETLINK
58 sbin_PROGRAMS += \
59 quota_nld
60--
612.6.1
62
diff --git a/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch b/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch
deleted file mode 100644
index bdb4ceaadd..0000000000
--- a/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1Upstream-Status: Backport
2
3Signed-off-by: Kai Kang <kai.kang@windriver.com>
4---
5From c4b56ee58b9b76d2598535cf6109a27b22e60abe Mon Sep 17 00:00:00 2001
6From: Jan Kara <jack@suse.cz>
7Date: Wed, 30 Mar 2016 10:21:13 +0200
8Subject: [PATCH] Fix warnings due to missing stdlib.h
9
10When compiling without RPC, we do not get stdlib.h automatically
11included via other includes and thus miss some function definitions.
12Include stdlib.h explicitely.
13
14Signed-off-by: Jan Kara <jack@suse.cz>
15---
16 quotaops.c | 1 +
17 setquota.c | 1 +
18 2 files changed, 2 insertions(+)
19
20diff --git a/quotaops.c b/quotaops.c
21index 590dc1b..56cf622 100644
22--- a/quotaops.c
23+++ b/quotaops.c
24@@ -52,6 +52,7 @@
25 #include <time.h>
26 #include <ctype.h>
27 #include <limits.h>
28+#include <stdlib.h>
29
30 #if defined(RPC)
31 #include "rquota.h"
32diff --git a/setquota.c b/setquota.c
33index 8ecd9c3..421631e 100644
34--- a/setquota.c
35+++ b/setquota.c
36@@ -17,6 +17,7 @@
37 #include <getopt.h>
38 #include <time.h>
39 #include <ctype.h>
40+#include <stdlib.h>
41
42 #if defined(RPC)
43 #include "rquota.h"
44--
452.6.1
46
diff --git a/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch b/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch
index 9ca2ffc0d4..4687ca06f5 100644
--- a/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch
+++ b/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch
@@ -1,20 +1,32 @@
1Replace getrpcbynumber_r with getrpcbynumber 1From a3808fd165847298d025971eb3c7be7d11caba9d Mon Sep 17 00:00:00 2001
2From: "Maxin B. John" <maxin.john@intel.com>
3Date: Wed, 8 Nov 2017 11:56:55 +0200
4Subject: [PATCH] Replace getrpcbynumber_r with getrpcbynumber
5
2musl and uclibc dont implement it 6musl and uclibc dont implement it
3 7
4Upstream-Status: Pending 8Upstream-Status: Pending
5 9
6Signed-off-by: Khem Raj <raj.khem@gmail.com> 10Signed-off-by: Khem Raj <raj.khem@gmail.com>
7Index: quota-tools/svc_socket.c 11Signed-off-by: Maxin B. John <maxin.john@intel.com>
8=================================================================== 12---
9--- quota-tools.orig/svc_socket.c 13 svc_socket.c | 3 ++-
10+++ quota-tools/svc_socket.c 14 1 file changed, 2 insertions(+), 1 deletion(-)
11@@ -55,7 +55,8 @@ static int svc_socket (u_long number, in 15
12 addr.sin_family = AF_INET; 16diff --git a/svc_socket.c b/svc_socket.c
17index 8a44604..5bdaaa0 100644
18--- a/svc_socket.c
19+++ b/svc_socket.c
20@@ -36,7 +36,8 @@ static int get_service_port(u_long number, const char *proto)
21 struct servent servbuf, *servp = NULL;
22 int ret;
13 23
14 if (!port) { 24- ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof(rpcdata), &rpcp);
15- ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof(rpcdata), &rpcp); 25+ rpcp = getrpcbynumber(number);
16+ rpcp = getrpcbynumber(number); 26+ ret = 0;
17+ ret = 0; 27 if (ret == 0 && rpcp != NULL) {
18 if (ret == 0 && rpcp != NULL) { 28 /* First try name */
19 /* First try name */ 29 ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,
20 ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata, 30--
312.4.0
32
diff --git a/meta/recipes-extended/quota/quota_4.03.bb b/meta/recipes-extended/quota/quota_4.04.bb
index 28b3854a14..93f376286a 100644
--- a/meta/recipes-extended/quota/quota_4.03.bb
+++ b/meta/recipes-extended/quota/quota_4.04.bb
@@ -8,19 +8,13 @@ LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad2
8 file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb" 8 file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
9 9
10SRC_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 \
11 file://0001-Fix-build-with-disabled-ldap.patch \
12 file://0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch \
13 file://fcntl.patch \ 11 file://fcntl.patch \
14 file://remove_non_posix_types.patch \ 12 file://remove_non_posix_types.patch \
15 file://0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch \
16 file://0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch \
17 file://0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch \
18 file://0004-Fix-warnings-due-to-missing-stdlib.h.patch \
19 " 13 "
20SRC_URI_append_libc-musl = " file://replace_getrpcbynumber_r.patch" 14SRC_URI_append_libc-musl = " file://replace_getrpcbynumber_r.patch"
21 15
22SRC_URI[md5sum] = "6b09f9c93515c25a528be5754cdfb6f5" 16SRC_URI[md5sum] = "f46f3b0b5141f032f25684005dac49d3"
23SRC_URI[sha256sum] = "9c6c4d9ae7bf30506dd2aa3d8056c4ff2f8d087930d7c721616f5c093bdc674b" 17SRC_URI[sha256sum] = "735be1887e7f51f54165e778ae43fc859c04e44d88834ecb2f470e91d4ef8edf"
24 18
25CVE_PRODUCT = "linux_diskquota" 19CVE_PRODUCT = "linux_diskquota"
26 20