1 |
commit: 8f87452d0bb35730435a53864a58e6332912ec50 |
2 |
Author: Rasmus Thomsen <rasmus.thomsen <AT> live <DOT> de> |
3 |
AuthorDate: Wed Mar 29 14:23:46 2017 +0000 |
4 |
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
5 |
CommitDate: Wed Mar 29 16:37:57 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=8f87452d |
7 |
|
8 |
net-libs/libtirpc: version bump to 1.0.1 |
9 |
|
10 |
net-libs/libtirpc/Manifest | 5 +- |
11 |
net-libs/libtirpc/files/git.patch | 842 +++++++++++++++++++++ |
12 |
...irpc-0.2.5-r99.ebuild => libtirpc-0.2.5.ebuild} | 7 +- |
13 |
...irpc-0.2.5-r99.ebuild => libtirpc-1.0.1.ebuild} | 31 +- |
14 |
4 files changed, 858 insertions(+), 27 deletions(-) |
15 |
|
16 |
diff --git a/net-libs/libtirpc/Manifest b/net-libs/libtirpc/Manifest |
17 |
index dd38c56..f6b2a02 100644 |
18 |
--- a/net-libs/libtirpc/Manifest |
19 |
+++ b/net-libs/libtirpc/Manifest |
20 |
@@ -5,8 +5,11 @@ AUX 0004-fix_DECLS.patch 29124 SHA256 bdc844c56cfe2d5b060d59fee009576895504e2df4 |
21 |
AUX 0005-fix_remaining_issues.patch 373 SHA256 db061da4e22c4ed9192587a622454e69c6999b5ccfdafa5588957440051277e2 SHA512 db70a64424904a669534e25c70b13dffb0ddd3437e81f6fee69ac2399e00bdd4e83ee9c65bc0bb789e28c1ac8e030a22461642e699fd371a4f147782a5845912 WHIRLPOOL 06e9f643c66867ddf965427e5c874eaa3c4275b961634d3fc669120275e3db8613a9bd997d612976c078584e016234f34e5a4abfeef20eb655997c7825e8cb56 |
22 |
AUX 0006-fix_queue_h_include.patch 1788 SHA256 3b8f296eb375052210874ebc3caeadd0cdf689a27e279761e16d76b411e89f8f SHA512 f5a419d883dc6fc0bc6ebb02c3b1f7ce95aeb2b261eb5a49498b600844a27041b32f146fd8bba3d1769c32a67a15b9e40d9ffe3598d9448ebfc4fde6446e69aa WHIRLPOOL 1e7b71255a11abd45dc88b74d8d8146f60c0a621ebe42f437e45e01f791a0ca020c27f841091f556d33fd284336b2e8cc8fa91fa9ca9ed5dd5904c1a5fe82212 |
23 |
AUX 0007-no-des.patch 960 SHA256 12823f030b803045108df782018d04ca253d4439b0e92015ddb140dcd33c1be3 SHA512 95ad086657d008a01a4072ba7141391cbbe8ac35372b2f063a3f9774eb5dfa12b97bcff0c1b6da2d887001beaa60a8524823df93a8de2fdb73ad2a30340770ba WHIRLPOOL bd075834fddeff5ae86b90273f5c7b820f88649045e65b63d09dc26c35ada0fd1162dcf8aeb1cd82ad59b9092eceb92e154fa58c9beca540dc31ead7cc96b72e |
24 |
+AUX git.patch 24736 SHA256 0a62de190d38660efff0ddbb73b5b6315fdc015c20cf9c235e35c0cf7eeb0e85 SHA512 4dd540470e9a25b5df0ea2c883dd647f26b71ed82e880c7efa4eed51dd98b898e18964a3ee998ceeadf39caed0a661f110f72157ec70584e33131d0a0f375a00 WHIRLPOOL 3b7fe2207ea84b56ce889778c4ef31669afe7dd340270063c1ac09accc3459e4d53bd5d084bfa090ec041fb188cd8bac6aad55d7fd60f43e485c89d53e06b14e |
25 |
AUX libtirpc-0.2.5-stdarg.patch 667 SHA256 2b31b1148af9d96c9a9e6f609c0b5b03424954d6251c18d64b6119afd8afa6f7 SHA512 2197f8c2ed3b4dbfc54ee37e973a6e275d19c6dde5d066b9ce45beecdbb17c9e620d7c6f0997b7ebfeb2bd1741327028a793b34edd94d59a89c8b36ac102b025 WHIRLPOOL 90d4e88c18f0d93ab8dfef4981377c2a6df42ff90b70049d07e203e7b66a5087910fe501cf9e1b93782eb25a8b3a8680c03287ccc563b838f517e5d1524b12c5 |
26 |
DIST libtirpc-0.2.5.tar.bz2 459094 SHA256 62f9de7c2c8686c568757730e1fef66502a0e00d6cacf33546d0267984e002db SHA512 9f8afa1acb04a2c2c558018f2528f8caaa79994a2af2abeed947f914145872ef72988b241e11925c799db0de9ec51fd9baecd2b08150240b22f91e2e55a45194 WHIRLPOOL a2b4f1c4825f2b774c2290cccd9d552bb7566ec9eb5988d3ab619d7870a907600f67e7af39fbc3e245606db8534f114c990145789c383206d3a9cf96cf043d8c |
27 |
+DIST libtirpc-1.0.1.tar.bz2 495125 SHA256 5156974f31be7ccbc8ab1de37c4739af6d9d42c87b1d5caf4835dda75fcbb89e SHA512 c9b449e737bc2bd3d56e31e8352f312e89a7ec2a11b73b5ac314e7d82d3b644c611e422b623912453b67b668f86a6de7bb7f18c9495dd15de8e2798ec2ff41c8 WHIRLPOOL cce6a4e69bd634b40d66594a81c23d2044b63eec16d6c96d6fcfaa7f2ca41fb9af99c8e2b964ec12be82682afa4090b218d7e14399fdfc9b32df6c2234bc3c9e |
28 |
DIST libtirpc-glibc-nfs.tar.xz 8948 SHA256 2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83 SHA512 90255bf0a27af16164e0710dd940778609925d473f4343093ff19d98cc4f23023788bf4edf0178eae1961afc0ba8b69b273de95b7d7e2afdb706701d8ba6f7ba WHIRLPOOL 06bcf3fd4e424a86071e5c4ddeb89aa571c862e765aae9382d9f9a55ab72cd1c623490555c1a9bd3380a2d04ecb10fb47a75a7dddf449d4368a1a01617226858 |
29 |
-EBUILD libtirpc-0.2.5-r99.ebuild 1911 SHA256 bde412b1d481fa28be314a0a4403c013b80dda526fba92bb80cdffd9208512f1 SHA512 c33059986e47d2b90e0544807ef26203346aeb4ccd22d3d680e423a7e5eb20b1d101e0dbb8ecce91b7c4d85ebe2ccc37e7be87dd4a4de3ba99f85a8d6838f43b WHIRLPOOL 523fed87584a6a76e21f4ad1e18ae9f7f0cf392729f927bf80d02ab6c9b6080747e4c4daa42cf4903026c9b91330a8b0577baa9961a4fac65edb376f12f50b38 |
30 |
+EBUILD libtirpc-0.2.5.ebuild 1920 SHA256 787410d5dfb2794a29c607fd47db15230d42050eabd9ddc57efe86486e31c64b SHA512 b9fbd63c6356a0d3e5f3a7d3b40727baa5039175d664cb14f49601c845d70767bd2bbd848b50541275e645cf7eb64b4ddab98475c0cf327d41992f92cd588b88 WHIRLPOOL 523e39ae954a6477a84382df171cab339e4be5b5dcb8db21150691b0b0cff13484e69d45256c7a15947a09d7f1b7fab9a37b58a8a22857fe3c53115e091af596 |
31 |
+EBUILD libtirpc-1.0.1.ebuild 1406 SHA256 c2a3172d3c56d7a52c9482e2e49c0ab12689d1902fca8841610f5627dfe8b0d9 SHA512 9ebd926c82f52d979758be194afeb62c12e36bbd5ab33c92616c1488f27860bce65a93a30513f6ad6ecddd3e2c328e482696c4b7e9884dff6f3802ba904f7388 WHIRLPOOL 6acebb4842b8a23397b74ebfa2c470bcca1ef8152f9306f50f3efbda52de97ba157144253b2b3f894010b24a9eab221fa4cc78108bba580cb2365cdeb232d1cf |
32 |
MISC metadata.xml 335 SHA256 02e9487e791e2d6aa99e74025dd90a6c54d86c73d530c96316e93f7552e1439a SHA512 d6dd857293827907e545dc6e8631d06682d20e13442f8ce6cbd2e2a789d885c8a788f4ed1d062a8c54c4165d22eb096279d4c2f598e462a57faaf8bec1e9777b WHIRLPOOL 6a802fc6b1fdd5bc815c4d2d41de0cba5cff351cdd1fa80021c02233b3facf21674d94ec7b822c2d514e5e1c721cf3ae2b88c885afdce8a7b60d2e63da71183c |
33 |
|
34 |
diff --git a/net-libs/libtirpc/files/git.patch b/net-libs/libtirpc/files/git.patch |
35 |
new file mode 100644 |
36 |
index 0000000..e458563 |
37 |
--- /dev/null |
38 |
+++ b/net-libs/libtirpc/files/git.patch |
39 |
@@ -0,0 +1,842 @@ |
40 |
+diff --git a/.gitignore b/.gitignore |
41 |
+index b7814a3..ef97e01 100644 |
42 |
+--- a/.gitignore |
43 |
++++ b/.gitignore |
44 |
+@@ -34,6 +34,9 @@ libtirpc.pc |
45 |
+ lib*.a |
46 |
+ src/libtirpc.la |
47 |
+ src/libtirpc_la-*.lo |
48 |
++tirpc/stamp-h2 |
49 |
++tirpc/tirpc-features.h |
50 |
++ |
51 |
+ # generic editor backup et al |
52 |
+ *~ |
53 |
+ .stgitmail.txt |
54 |
+diff --git a/src/Makefile.am b/src/Makefile.am |
55 |
+index e4ed8aa..fba2aa4 100644 |
56 |
+--- a/src/Makefile.am |
57 |
++++ b/src/Makefile.am |
58 |
+@@ -24,7 +24,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln |
59 |
+ rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \ |
60 |
+ svc_auth_des.c \ |
61 |
+ svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \ |
62 |
+- auth_time.c auth_des.c authdes_prot.c debug.c |
63 |
++ auth_time.c auth_des.c authdes_prot.c debug.c des_crypt.c des_impl.c |
64 |
+ |
65 |
+ ## XDR |
66 |
+ libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c xdr_sizeof.c |
67 |
+diff --git a/src/auth_des.c b/src/auth_des.c |
68 |
+index 4d3639e..af2f61f 100644 |
69 |
+--- a/src/auth_des.c |
70 |
++++ b/src/auth_des.c |
71 |
+@@ -46,8 +46,8 @@ |
72 |
+ #include <rpc/clnt.h> |
73 |
+ #include <rpc/xdr.h> |
74 |
+ #include <sys/socket.h> |
75 |
+-#undef NIS |
76 |
+-#include <rpcsvc/nis.h> |
77 |
++ |
78 |
++#include "nis.h" |
79 |
+ |
80 |
+ #if defined(LIBC_SCCS) && !defined(lint) |
81 |
+ #endif |
82 |
+diff --git a/src/auth_gss.c b/src/auth_gss.c |
83 |
+index 9b88c38..5959893 100644 |
84 |
+--- a/src/auth_gss.c |
85 |
++++ b/src/auth_gss.c |
86 |
+@@ -526,6 +526,14 @@ _rpc_gss_refresh(AUTH *auth, rpc_gss_options_ret_t *options_ret) |
87 |
+ gr.gr_major != GSS_S_CONTINUE_NEEDED)) { |
88 |
+ options_ret->major_status = gr.gr_major; |
89 |
+ options_ret->minor_status = gr.gr_minor; |
90 |
++ if (call_stat != RPC_SUCCESS) { |
91 |
++ struct rpc_err err; |
92 |
++ clnt_geterr(gd->clnt, &err); |
93 |
++ LIBTIRPC_DEBUG(1, ("authgss_refresh: %s errno: %s", |
94 |
++ clnt_sperrno(call_stat), strerror(err.re_errno))); |
95 |
++ } else |
96 |
++ gss_log_status("authgss_refresh:", |
97 |
++ gr.gr_major, gr.gr_minor); |
98 |
+ return FALSE; |
99 |
+ } |
100 |
+ |
101 |
+diff --git a/src/auth_time.c b/src/auth_time.c |
102 |
+index 10e58eb..7f83ab4 100644 |
103 |
+--- a/src/auth_time.c |
104 |
++++ b/src/auth_time.c |
105 |
+@@ -44,8 +44,8 @@ |
106 |
+ #include <rpc/rpcb_prot.h> |
107 |
+ //#include <clnt_soc.h> |
108 |
+ #include <sys/select.h> |
109 |
+-#undef NIS |
110 |
+-#include <rpcsvc/nis.h> |
111 |
++ |
112 |
++#include "nis.h" |
113 |
+ |
114 |
+ |
115 |
+ #ifdef TESTING |
116 |
+diff --git a/src/clnt_vc.c b/src/clnt_vc.c |
117 |
+index a72f9f7..a5fbe2f 100644 |
118 |
+--- a/src/clnt_vc.c |
119 |
++++ b/src/clnt_vc.c |
120 |
+@@ -72,6 +72,8 @@ |
121 |
+ #define CMGROUP_MAX 16 |
122 |
+ #define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */ |
123 |
+ |
124 |
++#undef rpc_createerr /* make it clear it is a thread safe variable */ |
125 |
++ |
126 |
+ /* |
127 |
+ * Credentials structure, used to verify the identity of a peer |
128 |
+ * process that has sent us a message. This is allocated by the |
129 |
+@@ -188,10 +190,11 @@ clnt_vc_create(fd, raddr, prog, vers, sendsz, recvsz) |
130 |
+ cl = (CLIENT *)mem_alloc(sizeof (*cl)); |
131 |
+ ct = (struct ct_data *)mem_alloc(sizeof (*ct)); |
132 |
+ if ((cl == (CLIENT *)NULL) || (ct == (struct ct_data *)NULL)) { |
133 |
++ struct rpc_createerr *ce = &get_rpc_createerr(); |
134 |
++ ce->cf_stat = RPC_SYSTEMERROR; |
135 |
++ ce->cf_error.re_errno = errno; |
136 |
+ (void) syslog(LOG_ERR, clnt_vc_errstr, |
137 |
+ clnt_vc_str, __no_mem_str); |
138 |
+- rpc_createerr.cf_stat = RPC_SYSTEMERROR; |
139 |
+- rpc_createerr.cf_error.re_errno = errno; |
140 |
+ goto err; |
141 |
+ } |
142 |
+ ct->ct_addr.buf = NULL; |
143 |
+@@ -230,26 +233,29 @@ clnt_vc_create(fd, raddr, prog, vers, sendsz, recvsz) |
144 |
+ assert(vc_cv != (cond_t *) NULL); |
145 |
+ |
146 |
+ /* |
147 |
+- * XXX - fvdl connecting while holding a mutex? |
148 |
++ * Do not hold mutex during connect |
149 |
+ */ |
150 |
++ mutex_unlock(&clnt_fd_lock); |
151 |
++ |
152 |
+ slen = sizeof ss; |
153 |
+ if (getpeername(fd, (struct sockaddr *)&ss, &slen) < 0) { |
154 |
+ if (errno != ENOTCONN) { |
155 |
+- rpc_createerr.cf_stat = RPC_SYSTEMERROR; |
156 |
+- rpc_createerr.cf_error.re_errno = errno; |
157 |
+- mutex_unlock(&clnt_fd_lock); |
158 |
++ struct rpc_createerr *ce = &get_rpc_createerr(); |
159 |
++ ce->cf_stat = RPC_SYSTEMERROR; |
160 |
++ ce->cf_error.re_errno = errno; |
161 |
+ thr_sigsetmask(SIG_SETMASK, &(mask), NULL); |
162 |
+ goto err; |
163 |
+ } |
164 |
+ if (connect(fd, (struct sockaddr *)raddr->buf, raddr->len) < 0){ |
165 |
+- rpc_createerr.cf_stat = RPC_SYSTEMERROR; |
166 |
+- rpc_createerr.cf_error.re_errno = errno; |
167 |
+- mutex_unlock(&clnt_fd_lock); |
168 |
+- thr_sigsetmask(SIG_SETMASK, &(mask), NULL); |
169 |
+- goto err; |
170 |
++ if (errno != EISCONN) { |
171 |
++ struct rpc_createerr *ce = &get_rpc_createerr(); |
172 |
++ ce->cf_stat = RPC_SYSTEMERROR; |
173 |
++ ce->cf_error.re_errno = errno; |
174 |
++ thr_sigsetmask(SIG_SETMASK, &(mask), NULL); |
175 |
++ goto err; |
176 |
++ } |
177 |
+ } |
178 |
+ } |
179 |
+- mutex_unlock(&clnt_fd_lock); |
180 |
+ if (!__rpc_fd2sockinfo(fd, &si)) |
181 |
+ goto err; |
182 |
+ thr_sigsetmask(SIG_SETMASK, &(mask), NULL); |
183 |
+diff --git a/src/des_impl.c b/src/des_impl.c |
184 |
+index c5b7ed6..15bec2a 100644 |
185 |
+--- a/src/des_impl.c |
186 |
++++ b/src/des_impl.c |
187 |
+@@ -6,7 +6,8 @@ |
188 |
+ /* see <http://www.gnu.org/licenses/> to obtain a copy. */ |
189 |
+ #include <string.h> |
190 |
+ #include <stdint.h> |
191 |
+-#include <rpc/rpc_des.h> |
192 |
++#include <sys/types.h> |
193 |
++#include <rpc/des.h> |
194 |
+ |
195 |
+ |
196 |
+ static const uint32_t des_SPtrans[8][64] = |
197 |
+@@ -587,7 +588,7 @@ _des_crypt (char *buf, unsigned len, struct desparams *desp) |
198 |
+ } |
199 |
+ tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0; |
200 |
+ tbuf[0] = tbuf[1] = 0; |
201 |
+- __bzero (schedule, sizeof (schedule)); |
202 |
++ memset (schedule, 0, sizeof (schedule)); |
203 |
+ |
204 |
+ return (1); |
205 |
+ } |
206 |
+diff --git a/src/getpublickey.c b/src/getpublickey.c |
207 |
+index 764a5f9..8cf4dc2 100644 |
208 |
+--- a/src/getpublickey.c |
209 |
++++ b/src/getpublickey.c |
210 |
+@@ -38,8 +38,10 @@ |
211 |
+ #include <pwd.h> |
212 |
+ #include <rpc/rpc.h> |
213 |
+ #include <rpc/key_prot.h> |
214 |
++#ifdef YP |
215 |
+ #include <rpcsvc/yp_prot.h> |
216 |
+ #include <rpcsvc/ypclnt.h> |
217 |
++#endif |
218 |
+ #include <string.h> |
219 |
+ #include <stdlib.h> |
220 |
+ |
221 |
+diff --git a/src/getrpcport.c b/src/getrpcport.c |
222 |
+index b452c99..c28cd61 100644 |
223 |
+--- a/src/getrpcport.c |
224 |
++++ b/src/getrpcport.c |
225 |
+@@ -57,8 +57,8 @@ getrpcport(host, prognum, versnum, proto) |
226 |
+ memset(&addr, 0, sizeof(addr)); |
227 |
+ addr.sin_family = AF_INET; |
228 |
+ addr.sin_port = 0; |
229 |
+- if (hp->h_length > sizeof(addr)) |
230 |
+- hp->h_length = sizeof(addr); |
231 |
++ if (hp->h_length > sizeof(addr.sin_addr.s_addr)) |
232 |
++ hp->h_length = sizeof(addr.sin_addr.s_addr); |
233 |
+ memcpy(&addr.sin_addr.s_addr, hp->h_addr, (size_t)hp->h_length); |
234 |
+ /* Inconsistent interfaces need casts! :-( */ |
235 |
+ return (pmap_getport(&addr, (u_long)prognum, (u_long)versnum, |
236 |
+diff --git a/src/nis.h b/src/nis.h |
237 |
+new file mode 100644 |
238 |
+index 0000000..588c041 |
239 |
+--- /dev/null |
240 |
++++ b/src/nis.h |
241 |
+@@ -0,0 +1,70 @@ |
242 |
++/* |
243 |
++ * Copyright (c) 2010, Oracle America, Inc. |
244 |
++ * |
245 |
++ * Redistribution and use in source and binary forms, with or without |
246 |
++ * modification, are permitted provided that the following conditions are |
247 |
++ * met: |
248 |
++ * |
249 |
++ * * Redistributions of source code must retain the above copyright |
250 |
++ * notice, this list of conditions and the following disclaimer. |
251 |
++ * * Redistributions in binary form must reproduce the above |
252 |
++ * copyright notice, this list of conditions and the following |
253 |
++ * disclaimer in the documentation and/or other materials |
254 |
++ * provided with the distribution. |
255 |
++ * * Neither the name of the "Oracle America, Inc." nor the names of its |
256 |
++ * contributors may be used to endorse or promote products derived |
257 |
++ * from this software without specific prior written permission. |
258 |
++ * |
259 |
++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
260 |
++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
261 |
++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
262 |
++ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
263 |
++ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
264 |
++ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
265 |
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
266 |
++ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
267 |
++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
268 |
++ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
269 |
++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
270 |
++ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
271 |
++ */ |
272 |
++ |
273 |
++#ifndef _INTERNAL_NIS_H |
274 |
++#define _INTERNAL_NIS_H 1 |
275 |
++ |
276 |
++/* This file only contains the definition of nis_server, to be |
277 |
++ able to compile libtirpc without the need to have a glibc |
278 |
++ with sunrpc or a libnsl already installed. */ |
279 |
++ |
280 |
++#define NIS_PK_NONE 0 |
281 |
++ |
282 |
++struct nis_attr { |
283 |
++ char *zattr_ndx; |
284 |
++ struct { |
285 |
++ u_int zattr_val_len; |
286 |
++ char *zattr_val_val; |
287 |
++ } zattr_val; |
288 |
++}; |
289 |
++typedef struct nis_attr nis_attr; |
290 |
++ |
291 |
++typedef char *nis_name; |
292 |
++ |
293 |
++struct endpoint { |
294 |
++ char *uaddr; |
295 |
++ char *family; |
296 |
++ char *proto; |
297 |
++}; |
298 |
++typedef struct endpoint endpoint; |
299 |
++ |
300 |
++struct nis_server { |
301 |
++ nis_name name; |
302 |
++ struct { |
303 |
++ u_int ep_len; |
304 |
++ endpoint *ep_val; |
305 |
++ } ep; |
306 |
++ uint32_t key_type; |
307 |
++ netobj pkey; |
308 |
++}; |
309 |
++typedef struct nis_server nis_server; |
310 |
++ |
311 |
++#endif /* ! _INTERNAL_NIS_H */ |
312 |
+diff --git a/src/rpc_dtablesize.c b/src/rpc_dtablesize.c |
313 |
+index 13d320c..3fe503a 100644 |
314 |
+--- a/src/rpc_dtablesize.c |
315 |
++++ b/src/rpc_dtablesize.c |
316 |
+@@ -27,22 +27,14 @@ |
317 |
+ */ |
318 |
+ |
319 |
+ #include <unistd.h> |
320 |
+- |
321 |
+ #include <sys/select.h> |
322 |
+- |
323 |
+-int _rpc_dtablesize(void); /* XXX */ |
324 |
++#include <rpc/clnt.h> |
325 |
++#include <rpc/rpc_com.h> |
326 |
+ |
327 |
+ /* |
328 |
+ * Cache the result of getdtablesize(), so we don't have to do an |
329 |
+ * expensive system call every time. |
330 |
+ */ |
331 |
+-/* |
332 |
+- * XXX In FreeBSD 2.x, you can have the maximum number of open file |
333 |
+- * descriptors be greater than FD_SETSIZE (which us 256 by default). |
334 |
+- * |
335 |
+- * Since old programs tend to use this call to determine the first arg |
336 |
+- * for _select(), having this return > FD_SETSIZE is a Bad Idea(TM)! |
337 |
+- */ |
338 |
+ int |
339 |
+ _rpc_dtablesize(void) |
340 |
+ { |
341 |
+diff --git a/src/rpc_soc.c b/src/rpc_soc.c |
342 |
+index 1ec7b3f..ed0892a 100644 |
343 |
+--- a/src/rpc_soc.c |
344 |
++++ b/src/rpc_soc.c |
345 |
+@@ -61,8 +61,8 @@ |
346 |
+ #include <string.h> |
347 |
+ #include <unistd.h> |
348 |
+ #include <fcntl.h> |
349 |
+-#include <rpcsvc/nis.h> |
350 |
+ |
351 |
++#include "nis.h" |
352 |
+ #include "rpc_com.h" |
353 |
+ |
354 |
+ extern mutex_t rpcsoc_lock; |
355 |
+diff --git a/src/rtime.c b/src/rtime.c |
356 |
+index c34e0af..b642840 100644 |
357 |
+--- a/src/rtime.c |
358 |
++++ b/src/rtime.c |
359 |
+@@ -46,6 +46,7 @@ |
360 |
+ #include <unistd.h> |
361 |
+ #include <errno.h> |
362 |
+ #include <sys/types.h> |
363 |
++#include <sys/poll.h> |
364 |
+ #include <sys/socket.h> |
365 |
+ #include <sys/time.h> |
366 |
+ #include <netinet/in.h> |
367 |
+@@ -67,7 +68,8 @@ rtime(addrp, timep, timeout) |
368 |
+ struct timeval *timeout; |
369 |
+ { |
370 |
+ int s; |
371 |
+- fd_set readfds; |
372 |
++ struct pollfd fd; |
373 |
++ int milliseconds; |
374 |
+ int res; |
375 |
+ unsigned long thetime; |
376 |
+ struct sockaddr_in from; |
377 |
+@@ -94,31 +96,32 @@ rtime(addrp, timep, timeout) |
378 |
+ addrp->sin_port = serv->s_port; |
379 |
+ |
380 |
+ if (type == SOCK_DGRAM) { |
381 |
+- res = sendto(s, (char *)&thetime, sizeof(thetime), 0, |
382 |
++ res = sendto(s, (char *)&thetime, sizeof(thetime), 0, |
383 |
+ (struct sockaddr *)addrp, sizeof(*addrp)); |
384 |
+ if (res < 0) { |
385 |
+ do_close(s); |
386 |
+- return(-1); |
387 |
++ return(-1); |
388 |
+ } |
389 |
+- do { |
390 |
+- FD_ZERO(&readfds); |
391 |
+- FD_SET(s, &readfds); |
392 |
+- res = select(_rpc_dtablesize(), &readfds, |
393 |
+- (fd_set *)NULL, (fd_set *)NULL, timeout); |
394 |
+- } while (res < 0 && errno == EINTR); |
395 |
++ |
396 |
++ milliseconds = (timeout->tv_sec * 1000) + (timeout->tv_usec / 1000); |
397 |
++ fd.fd = s; |
398 |
++ fd.events = POLLIN; |
399 |
++ do |
400 |
++ res = poll (&fd, 1, milliseconds); |
401 |
++ while (res < 0 && errno == EINTR); |
402 |
+ if (res <= 0) { |
403 |
+ if (res == 0) { |
404 |
+ errno = ETIMEDOUT; |
405 |
+ } |
406 |
+ do_close(s); |
407 |
+- return(-1); |
408 |
++ return(-1); |
409 |
+ } |
410 |
+ fromlen = sizeof(from); |
411 |
+- res = recvfrom(s, (char *)&thetime, sizeof(thetime), 0, |
412 |
++ res = recvfrom(s, (char *)&thetime, sizeof(thetime), 0, |
413 |
+ (struct sockaddr *)&from, &fromlen); |
414 |
+ do_close(s); |
415 |
+ if (res < 0) { |
416 |
+- return(-1); |
417 |
++ return(-1); |
418 |
+ } |
419 |
+ } else { |
420 |
+ if (connect(s, (struct sockaddr *)addrp, sizeof(*addrp)) < 0) { |
421 |
+diff --git a/src/svc.c b/src/svc.c |
422 |
+index 9c41445..b59467b 100644 |
423 |
+--- a/src/svc.c |
424 |
++++ b/src/svc.c |
425 |
+@@ -99,7 +99,7 @@ xprt_register (xprt) |
426 |
+ { |
427 |
+ __svc_xports = (SVCXPRT **) calloc (_rpc_dtablesize(), sizeof (SVCXPRT *)); |
428 |
+ if (__svc_xports == NULL) |
429 |
+- return; |
430 |
++ goto unlock; |
431 |
+ } |
432 |
+ if (sock < _rpc_dtablesize()) |
433 |
+ { |
434 |
+@@ -120,14 +120,14 @@ xprt_register (xprt) |
435 |
+ svc_pollfd[i].fd = sock; |
436 |
+ svc_pollfd[i].events = (POLLIN | POLLPRI | |
437 |
+ POLLRDNORM | POLLRDBAND); |
438 |
+- return; |
439 |
++ goto unlock; |
440 |
+ } |
441 |
+ |
442 |
+ new_svc_pollfd = (struct pollfd *) realloc (svc_pollfd, |
443 |
+ sizeof (struct pollfd) |
444 |
+ * (svc_max_pollfd + 1)); |
445 |
+ if (new_svc_pollfd == NULL) /* Out of memory */ |
446 |
+- return; |
447 |
++ goto unlock; |
448 |
+ svc_pollfd = new_svc_pollfd; |
449 |
+ ++svc_max_pollfd; |
450 |
+ |
451 |
+@@ -135,6 +135,7 @@ xprt_register (xprt) |
452 |
+ svc_pollfd[svc_max_pollfd - 1].events = (POLLIN | POLLPRI | |
453 |
+ POLLRDNORM | POLLRDBAND); |
454 |
+ } |
455 |
++unlock: |
456 |
+ rwlock_unlock (&svc_fd_lock); |
457 |
+ } |
458 |
+ |
459 |
+diff --git a/src/svc_auth_des.c b/src/svc_auth_des.c |
460 |
+index 5bc264c..2e90146 100644 |
461 |
+--- a/src/svc_auth_des.c |
462 |
++++ b/src/svc_auth_des.c |
463 |
+@@ -86,13 +86,13 @@ static struct cache_entry *authdes_cache/* [AUTHDES_CACHESZ] */; |
464 |
+ static short *authdes_lru/* [AUTHDES_CACHESZ] */; |
465 |
+ |
466 |
+ static void cache_init(); /* initialize the cache */ |
467 |
+-static short cache_spot(); /* find an entry in the cache */ |
468 |
+-static void cache_ref(/*short sid*/); /* note that sid was ref'd */ |
469 |
++static short cache_spot(des_block *key, char *name, struct timeval *timestamp); /* find an entry in the cache */ |
470 |
++static void cache_ref(short sid); /* note that sid was ref'd */ |
471 |
+ |
472 |
+-static void invalidate(); /* invalidate entry in cache */ |
473 |
++static void invalidate(char *cred); /* invalidate entry in cache */ |
474 |
+ |
475 |
+ /* |
476 |
+- * cache statistics |
477 |
++ * cache statistics |
478 |
+ */ |
479 |
+ static struct { |
480 |
+ u_long ncachehits; /* times cache hit, and is not replay */ |
481 |
+diff --git a/src/svc_auth_gss.c b/src/svc_auth_gss.c |
482 |
+index b6aa407..bece46a 100644 |
483 |
+--- a/src/svc_auth_gss.c |
484 |
++++ b/src/svc_auth_gss.c |
485 |
+@@ -129,6 +129,8 @@ struct svc_rpc_gss_data { |
486 |
+ ((struct svc_rpc_gss_data *)(auth)->svc_ah_private) |
487 |
+ |
488 |
+ /* Global server credentials. */ |
489 |
++static u_int _svcauth_req_time = 0; |
490 |
++static gss_OID_set_desc _svcauth_oid_set = {1, GSS_C_NULL_OID }; |
491 |
+ static gss_cred_id_t _svcauth_gss_creds; |
492 |
+ static gss_name_t _svcauth_gss_name = GSS_C_NO_NAME; |
493 |
+ static char * _svcauth_svc_name = NULL; |
494 |
+@@ -167,6 +169,7 @@ svcauth_gss_import_name(char *service) |
495 |
+ gss_name_t name; |
496 |
+ gss_buffer_desc namebuf; |
497 |
+ OM_uint32 maj_stat, min_stat; |
498 |
++ bool_t result; |
499 |
+ |
500 |
+ gss_log_debug("in svcauth_gss_import_name()"); |
501 |
+ |
502 |
+@@ -181,22 +184,21 @@ svcauth_gss_import_name(char *service) |
503 |
+ maj_stat, min_stat); |
504 |
+ return (FALSE); |
505 |
+ } |
506 |
+- if (svcauth_gss_set_svc_name(name) != TRUE) { |
507 |
+- gss_release_name(&min_stat, &name); |
508 |
+- return (FALSE); |
509 |
+- } |
510 |
+- return (TRUE); |
511 |
++ result = svcauth_gss_set_svc_name(name); |
512 |
++ gss_release_name(&min_stat, &name); |
513 |
++ return result; |
514 |
+ } |
515 |
+ |
516 |
+ static bool_t |
517 |
+-svcauth_gss_acquire_cred(u_int req_time, gss_OID_set_desc *oid_set) |
518 |
++svcauth_gss_acquire_cred(void) |
519 |
+ { |
520 |
+ OM_uint32 maj_stat, min_stat; |
521 |
+ |
522 |
+ gss_log_debug("in svcauth_gss_acquire_cred()"); |
523 |
+ |
524 |
+- maj_stat = gss_acquire_cred(&min_stat, _svcauth_gss_name, req_time, |
525 |
+- oid_set, GSS_C_ACCEPT, |
526 |
++ maj_stat = gss_acquire_cred(&min_stat, _svcauth_gss_name, |
527 |
++ _svcauth_req_time, &_svcauth_oid_set, |
528 |
++ GSS_C_ACCEPT, |
529 |
+ &_svcauth_gss_creds, NULL, NULL); |
530 |
+ |
531 |
+ if (maj_stat != GSS_S_COMPLETE) { |
532 |
+@@ -300,6 +302,8 @@ svcauth_gss_accept_sec_context(struct svc_req *rqst, |
533 |
+ NULL, |
534 |
+ &gd->deleg); |
535 |
+ |
536 |
++ xdr_free((xdrproc_t)xdr_rpc_gss_init_args, (caddr_t)&recv_tok); |
537 |
++ |
538 |
+ if (gr->gr_major != GSS_S_COMPLETE && |
539 |
+ gr->gr_major != GSS_S_CONTINUE_NEEDED) { |
540 |
+ gss_log_status("svcauth_gss_accept_sec_context: accept_sec_context", |
541 |
+@@ -352,8 +356,11 @@ svcauth_gss_accept_sec_context(struct svc_req *rqst, |
542 |
+ return (FALSE); |
543 |
+ |
544 |
+ rqst->rq_xprt->xp_verf.oa_flavor = RPCSEC_GSS; |
545 |
+- rqst->rq_xprt->xp_verf.oa_base = checksum.value; |
546 |
++ memcpy(rqst->rq_xprt->xp_verf.oa_base, checksum.value, |
547 |
++ checksum.length); |
548 |
+ rqst->rq_xprt->xp_verf.oa_length = checksum.length; |
549 |
++ |
550 |
++ gss_release_buffer(&min_stat, &checksum); |
551 |
+ } |
552 |
+ return (TRUE); |
553 |
+ } |
554 |
+@@ -435,10 +442,13 @@ svcauth_gss_nextverf(struct svc_req *rqst, u_int num) |
555 |
+ maj_stat, min_stat); |
556 |
+ return (FALSE); |
557 |
+ } |
558 |
++ |
559 |
+ rqst->rq_xprt->xp_verf.oa_flavor = RPCSEC_GSS; |
560 |
+- rqst->rq_xprt->xp_verf.oa_base = (caddr_t)checksum.value; |
561 |
++ memcpy(rqst->rq_xprt->xp_verf.oa_base, checksum.value, checksum.length); |
562 |
+ rqst->rq_xprt->xp_verf.oa_length = (u_int)checksum.length; |
563 |
+ |
564 |
++ gss_release_buffer(&min_stat, &checksum); |
565 |
++ |
566 |
+ return (TRUE); |
567 |
+ } |
568 |
+ |
569 |
+@@ -568,6 +578,8 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch) |
570 |
+ gss_qop_t qop; |
571 |
+ struct svcauth_gss_cache_entry **ce; |
572 |
+ time_t now; |
573 |
++ enum auth_stat result = AUTH_OK; |
574 |
++ OM_uint32 min_stat; |
575 |
+ |
576 |
+ gss_log_debug("in svcauth_gss()"); |
577 |
+ |
578 |
+@@ -621,19 +633,25 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch) |
579 |
+ XDR_DESTROY(&xdrs); |
580 |
+ |
581 |
+ /* Check version. */ |
582 |
+- if (gc->gc_v != RPCSEC_GSS_VERSION) |
583 |
+- return (AUTH_BADCRED); |
584 |
++ if (gc->gc_v != RPCSEC_GSS_VERSION) { |
585 |
++ result = AUTH_BADCRED; |
586 |
++ goto out; |
587 |
++ } |
588 |
+ |
589 |
+ /* Check RPCSEC_GSS service. */ |
590 |
+ if (gc->gc_svc != RPCSEC_GSS_SVC_NONE && |
591 |
+ gc->gc_svc != RPCSEC_GSS_SVC_INTEGRITY && |
592 |
+- gc->gc_svc != RPCSEC_GSS_SVC_PRIVACY) |
593 |
+- return (AUTH_BADCRED); |
594 |
++ gc->gc_svc != RPCSEC_GSS_SVC_PRIVACY) { |
595 |
++ result = AUTH_BADCRED; |
596 |
++ goto out; |
597 |
++ } |
598 |
+ |
599 |
+ /* Check sequence number. */ |
600 |
+ if (gd->established) { |
601 |
+- if (gc->gc_seq > MAXSEQ) |
602 |
+- return (RPCSEC_GSS_CTXPROBLEM); |
603 |
++ if (gc->gc_seq > MAXSEQ) { |
604 |
++ result = RPCSEC_GSS_CTXPROBLEM; |
605 |
++ goto out; |
606 |
++ } |
607 |
+ |
608 |
+ if ((offset = gd->seqlast - gc->gc_seq) < 0) { |
609 |
+ gd->seqlast = gc->gc_seq; |
610 |
+@@ -643,7 +661,8 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch) |
611 |
+ } |
612 |
+ else if (offset >= gd->win || (gd->seqmask & (1 << offset))) { |
613 |
+ *no_dispatch = 1; |
614 |
+- return (RPCSEC_GSS_CTXPROBLEM); |
615 |
++ result = RPCSEC_GSS_CTXPROBLEM; |
616 |
++ goto out; |
617 |
+ } |
618 |
+ gd->seq = gc->gc_seq; |
619 |
+ gd->seqmask |= (1 << offset); |
620 |
+@@ -654,35 +673,52 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch) |
621 |
+ rqst->rq_svcname = (char *)gd->ctx; |
622 |
+ } |
623 |
+ |
624 |
++ rqst->rq_xprt->xp_verf.oa_base = msg->rm_call.cb_verf.oa_base; |
625 |
++ |
626 |
+ /* Handle RPCSEC_GSS control procedure. */ |
627 |
+ switch (gc->gc_proc) { |
628 |
+ |
629 |
+ case RPCSEC_GSS_INIT: |
630 |
+ case RPCSEC_GSS_CONTINUE_INIT: |
631 |
+- if (rqst->rq_proc != NULLPROC) |
632 |
+- return (AUTH_FAILED); /* XXX ? */ |
633 |
++ if (rqst->rq_proc != NULLPROC) { |
634 |
++ result = AUTH_FAILED; /* XXX ? */ |
635 |
++ break; |
636 |
++ } |
637 |
+ |
638 |
+ if (_svcauth_gss_name == GSS_C_NO_NAME) { |
639 |
+- if (!svcauth_gss_import_name("nfs")) |
640 |
+- return (AUTH_FAILED); |
641 |
++ if (!svcauth_gss_import_name("nfs")) { |
642 |
++ result = AUTH_FAILED; |
643 |
++ break; |
644 |
++ } |
645 |
+ } |
646 |
+ |
647 |
+- if (!svcauth_gss_acquire_cred(0, GSS_C_NULL_OID_SET)) |
648 |
+- return (AUTH_FAILED); |
649 |
++ if (!svcauth_gss_acquire_cred()) { |
650 |
++ result = AUTH_FAILED; |
651 |
++ break; |
652 |
++ } |
653 |
+ |
654 |
+- if (!svcauth_gss_accept_sec_context(rqst, &gr)) |
655 |
+- return (AUTH_REJECTEDCRED); |
656 |
++ if (!svcauth_gss_accept_sec_context(rqst, &gr)) { |
657 |
++ result = AUTH_REJECTEDCRED; |
658 |
++ break; |
659 |
++ } |
660 |
+ |
661 |
+- if (!svcauth_gss_nextverf(rqst, htonl(gr.gr_win))) |
662 |
+- return (AUTH_FAILED); |
663 |
++ if (!svcauth_gss_nextverf(rqst, htonl(gr.gr_win))) { |
664 |
++ result = AUTH_FAILED; |
665 |
++ break; |
666 |
++ } |
667 |
+ |
668 |
+ *no_dispatch = TRUE; |
669 |
+ |
670 |
+ call_stat = svc_sendreply(rqst->rq_xprt, |
671 |
+ (xdrproc_t)xdr_rpc_gss_init_res, (caddr_t)&gr); |
672 |
+ |
673 |
+- if (!call_stat) |
674 |
+- return (AUTH_FAILED); |
675 |
++ gss_release_buffer(&min_stat, &gr.gr_token); |
676 |
++ free(gr.gr_ctx.value); |
677 |
++ |
678 |
++ if (!call_stat) { |
679 |
++ result = AUTH_FAILED; |
680 |
++ break; |
681 |
++ } |
682 |
+ |
683 |
+ if (gr.gr_major == GSS_S_COMPLETE) |
684 |
+ gd->established = TRUE; |
685 |
+@@ -690,27 +726,37 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch) |
686 |
+ break; |
687 |
+ |
688 |
+ case RPCSEC_GSS_DATA: |
689 |
+- if (!svcauth_gss_validate(gd, msg, &qop)) |
690 |
+- return (RPCSEC_GSS_CREDPROBLEM); |
691 |
++ if (!svcauth_gss_validate(gd, msg, &qop)) { |
692 |
++ result = RPCSEC_GSS_CREDPROBLEM; |
693 |
++ break; |
694 |
++ } |
695 |
+ |
696 |
+- if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq))) |
697 |
+- return (AUTH_FAILED); |
698 |
++ if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq))) { |
699 |
++ result = AUTH_FAILED; |
700 |
++ break; |
701 |
++ } |
702 |
+ |
703 |
+ if (!gd->callback_done) { |
704 |
+ gd->callback_done = TRUE; |
705 |
+ gd->sec.qop = qop; |
706 |
+ (void)rpc_gss_num_to_qop(gd->rcred.mechanism, |
707 |
+ gd->sec.qop, &gd->rcred.qop); |
708 |
+- if (!svcauth_gss_callback(rqst, gd)) |
709 |
+- return (AUTH_REJECTEDCRED); |
710 |
++ if (!svcauth_gss_callback(rqst, gd)) { |
711 |
++ result = AUTH_REJECTEDCRED; |
712 |
++ break; |
713 |
++ } |
714 |
+ } |
715 |
+ |
716 |
+ if (gd->locked) { |
717 |
+ if (gd->rcred.service != |
718 |
+- _rpc_gss_svc_to_service(gc->gc_svc)) |
719 |
+- return (AUTH_FAILED); |
720 |
+- if (gd->sec.qop != qop) |
721 |
+- return (AUTH_BADVERF); |
722 |
++ _rpc_gss_svc_to_service(gc->gc_svc)) { |
723 |
++ result = AUTH_FAILED; |
724 |
++ break; |
725 |
++ } |
726 |
++ if (gd->sec.qop != qop) { |
727 |
++ result = AUTH_BADVERF; |
728 |
++ break; |
729 |
++ } |
730 |
+ } |
731 |
+ |
732 |
+ if (gd->sec.qop != qop) { |
733 |
+@@ -724,17 +770,25 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch) |
734 |
+ break; |
735 |
+ |
736 |
+ case RPCSEC_GSS_DESTROY: |
737 |
+- if (rqst->rq_proc != NULLPROC) |
738 |
+- return (AUTH_FAILED); /* XXX ? */ |
739 |
++ if (rqst->rq_proc != NULLPROC) { |
740 |
++ result = AUTH_FAILED; /* XXX ? */ |
741 |
++ break; |
742 |
++ } |
743 |
+ |
744 |
+- if (!svcauth_gss_validate(gd, msg, &qop)) |
745 |
+- return (RPCSEC_GSS_CREDPROBLEM); |
746 |
++ if (!svcauth_gss_validate(gd, msg, &qop)) { |
747 |
++ result = RPCSEC_GSS_CREDPROBLEM; |
748 |
++ break; |
749 |
++ } |
750 |
+ |
751 |
+- if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq))) |
752 |
+- return (AUTH_FAILED); |
753 |
++ if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq))) { |
754 |
++ result = AUTH_FAILED; |
755 |
++ break; |
756 |
++ } |
757 |
+ |
758 |
+- if (!svcauth_gss_release_cred()) |
759 |
+- return (AUTH_FAILED); |
760 |
++ if (!svcauth_gss_release_cred()) { |
761 |
++ result = AUTH_FAILED; |
762 |
++ break; |
763 |
++ } |
764 |
+ |
765 |
+ SVCAUTH_DESTROY(&SVC_XP_AUTH(rqst->rq_xprt)); |
766 |
+ SVC_XP_AUTH(rqst->rq_xprt).svc_ah_ops = svc_auth_none.svc_ah_ops; |
767 |
+@@ -743,10 +797,12 @@ _svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch) |
768 |
+ break; |
769 |
+ |
770 |
+ default: |
771 |
+- return (AUTH_REJECTEDCRED); |
772 |
++ result = AUTH_REJECTEDCRED; |
773 |
+ break; |
774 |
+ } |
775 |
+- return (AUTH_OK); |
776 |
++out: |
777 |
++ xdr_free((xdrproc_t)xdr_rpc_gss_cred, (caddr_t)gc); |
778 |
++ return result; |
779 |
+ } |
780 |
+ |
781 |
+ static bool_t |
782 |
+@@ -890,7 +946,6 @@ bool_t |
783 |
+ rpc_gss_set_svc_name(char *principal, char *mechanism, u_int req_time, |
784 |
+ u_int UNUSED(program), u_int UNUSED(version)) |
785 |
+ { |
786 |
+- gss_OID_set_desc oid_set; |
787 |
+ rpc_gss_OID oid; |
788 |
+ char *save; |
789 |
+ |
790 |
+@@ -902,14 +957,13 @@ rpc_gss_set_svc_name(char *principal, char *mechanism, u_int req_time, |
791 |
+ |
792 |
+ if (!rpc_gss_mech_to_oid(mechanism, &oid)) |
793 |
+ goto out_err; |
794 |
+- oid_set.count = 1; |
795 |
+- oid_set.elements = (gss_OID)oid; |
796 |
+ |
797 |
+ if (!svcauth_gss_import_name(principal)) |
798 |
+ goto out_err; |
799 |
+- if (!svcauth_gss_acquire_cred(req_time, &oid_set)) |
800 |
+- goto out_err; |
801 |
+ |
802 |
++ _svcauth_req_time = req_time; |
803 |
++ _svcauth_oid_set.count = 1; |
804 |
++ _svcauth_oid_set.elements = (gss_OID)oid; |
805 |
+ free(_svcauth_svc_name); |
806 |
+ _svcauth_svc_name = save; |
807 |
+ return TRUE; |
808 |
+diff --git a/src/svc_vc.c b/src/svc_vc.c |
809 |
+index 6ae613d..97a76a3 100644 |
810 |
+--- a/src/svc_vc.c |
811 |
++++ b/src/svc_vc.c |
812 |
+@@ -270,14 +270,8 @@ makefd_xprt(fd, sendsize, recvsize) |
813 |
+ struct cf_conn *cd; |
814 |
+ const char *netid; |
815 |
+ struct __rpc_sockinfo si; |
816 |
+- |
817 |
+- assert(fd != -1); |
818 |
+ |
819 |
+- if (fd >= FD_SETSIZE) { |
820 |
+- warnx("svc_vc: makefd_xprt: fd too high\n"); |
821 |
+- xprt = NULL; |
822 |
+- goto done; |
823 |
+- } |
824 |
++ assert(fd != -1); |
825 |
+ |
826 |
+ xprt = mem_alloc(sizeof(SVCXPRT)); |
827 |
+ if (xprt == NULL) { |
828 |
+@@ -338,22 +332,10 @@ rendezvous_request(xprt, msg) |
829 |
+ r = (struct cf_rendezvous *)xprt->xp_p1; |
830 |
+ again: |
831 |
+ len = sizeof addr; |
832 |
+- if ((sock = accept(xprt->xp_fd, (struct sockaddr *)(void *)&addr, |
833 |
+- &len)) < 0) { |
834 |
++ sock = accept(xprt->xp_fd, (struct sockaddr *)(void *)&addr, &len); |
835 |
++ if (sock < 0) { |
836 |
+ if (errno == EINTR) |
837 |
+ goto again; |
838 |
+- |
839 |
+- if (errno == EMFILE || errno == ENFILE) { |
840 |
+- /* If there are no file descriptors available, then accept will fail. |
841 |
+- We want to delay here so the connection request can be dequeued; |
842 |
+- otherwise we can bounce between polling and accepting, never |
843 |
+- giving the request a chance to dequeue and eating an enormous |
844 |
+- amount of cpu time in svc_run if we're polling on many file |
845 |
+- descriptors. */ |
846 |
+- struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 }; |
847 |
+- nanosleep (&ts, NULL); |
848 |
+- goto again; |
849 |
+- } |
850 |
+ return (FALSE); |
851 |
+ } |
852 |
+ /* |
853 |
+diff --git a/tirpc/rpc/des.h b/tirpc/rpc/des.h |
854 |
+index d2881ad..018aa48 100644 |
855 |
+--- a/tirpc/rpc/des.h |
856 |
++++ b/tirpc/rpc/des.h |
857 |
+@@ -82,6 +82,6 @@ struct desparams { |
858 |
+ /* |
859 |
+ * Software DES. |
860 |
+ */ |
861 |
+-extern int _des_crypt( char *, int, struct desparams * ); |
862 |
++extern int _des_crypt( char *, unsigned, struct desparams * ); |
863 |
+ |
864 |
+ #endif |
865 |
+diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h |
866 |
+index 147f909..e07503c 100644 |
867 |
+--- a/tirpc/rpc/rpcent.h |
868 |
++++ b/tirpc/rpc/rpcent.h |
869 |
+@@ -60,10 +60,11 @@ struct rpcent { |
870 |
+ extern struct rpcent *getrpcbyname(const char *); |
871 |
+ extern struct rpcent *getrpcbynumber(int); |
872 |
+ extern struct rpcent *getrpcent(void); |
873 |
+-#endif |
874 |
+ |
875 |
+ extern void setrpcent(int); |
876 |
+ extern void endrpcent(void); |
877 |
++#endif |
878 |
++ |
879 |
+ #ifdef __cplusplus |
880 |
+ } |
881 |
+ #endif |
882 |
|
883 |
diff --git a/net-libs/libtirpc/libtirpc-0.2.5-r99.ebuild b/net-libs/libtirpc/libtirpc-0.2.5.ebuild |
884 |
similarity index 92% |
885 |
copy from net-libs/libtirpc/libtirpc-0.2.5-r99.ebuild |
886 |
copy to net-libs/libtirpc/libtirpc-0.2.5.ebuild |
887 |
index c053676..2e825c4 100644 |
888 |
--- a/net-libs/libtirpc/libtirpc-0.2.5-r99.ebuild |
889 |
+++ b/net-libs/libtirpc/libtirpc-0.2.5.ebuild |
890 |
@@ -1,6 +1,5 @@ |
891 |
-# Copyright 1999-2016 Gentoo Foundation |
892 |
+# Copyright 1999-2015 Gentoo Foundation |
893 |
# Distributed under the terms of the GNU General Public License v2 |
894 |
-# $Id$ |
895 |
|
896 |
EAPI="4" |
897 |
|
898 |
@@ -13,7 +12,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2 |
899 |
|
900 |
LICENSE="GPL-2" |
901 |
SLOT="0" |
902 |
-KEYWORDS="amd64 arm ~mips ppc x86" |
903 |
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86" |
904 |
IUSE="ipv6 kerberos static-libs" |
905 |
|
906 |
RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )" |
907 |
@@ -56,7 +55,7 @@ multilib_src_install() { |
908 |
default |
909 |
|
910 |
# libtirpc replaces rpc support in glibc, so we need it in / |
911 |
- multilib_is_native_abi && gen_usr_ldscript -a tirpc |
912 |
+ gen_usr_ldscript -a tirpc |
913 |
} |
914 |
|
915 |
multilib_src_install_all() { |
916 |
|
917 |
diff --git a/net-libs/libtirpc/libtirpc-0.2.5-r99.ebuild b/net-libs/libtirpc/libtirpc-1.0.1.ebuild |
918 |
similarity index 58% |
919 |
rename from net-libs/libtirpc/libtirpc-0.2.5-r99.ebuild |
920 |
rename to net-libs/libtirpc/libtirpc-1.0.1.ebuild |
921 |
index c053676..ea2fc47 100644 |
922 |
--- a/net-libs/libtirpc/libtirpc-0.2.5-r99.ebuild |
923 |
+++ b/net-libs/libtirpc/libtirpc-1.0.1.ebuild |
924 |
@@ -1,10 +1,9 @@ |
925 |
-# Copyright 1999-2016 Gentoo Foundation |
926 |
+# Copyright 1999-2017 Gentoo Foundation |
927 |
# Distributed under the terms of the GNU General Public License v2 |
928 |
-# $Id$ |
929 |
|
930 |
-EAPI="4" |
931 |
+EAPI="5" |
932 |
|
933 |
-inherit multilib-minimal toolchain-funcs autotools |
934 |
+inherit multilib-minimal toolchain-funcs |
935 |
|
936 |
DESCRIPTION="Transport Independent RPC library (SunRPC replacement)" |
937 |
HOMEPAGE="http://libtirpc.sourceforge.net/" |
938 |
@@ -12,19 +11,14 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2 |
939 |
mirror://gentoo/${PN}-glibc-nfs.tar.xz" |
940 |
|
941 |
LICENSE="GPL-2" |
942 |
-SLOT="0" |
943 |
-KEYWORDS="amd64 arm ~mips ppc x86" |
944 |
+SLOT="0/3" # subslot matches SONAME major |
945 |
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86" |
946 |
IUSE="ipv6 kerberos static-libs" |
947 |
|
948 |
RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )" |
949 |
DEPEND="${RDEPEND} |
950 |
app-arch/xz-utils |
951 |
>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]" |
952 |
-RDEPEND="${RDEPEND} |
953 |
- abi_x86_32? ( |
954 |
- !<=app-emulation/emul-linux-x86-baselibs-20140508-r7 |
955 |
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
956 |
- )" |
957 |
|
958 |
src_unpack() { |
959 |
unpack ${A} |
960 |
@@ -32,16 +26,9 @@ src_unpack() { |
961 |
} |
962 |
|
963 |
src_prepare() { |
964 |
- epatch "${FILESDIR}"/${P}-stdarg.patch |
965 |
- epatch "${FILESDIR}"/0001-Provide-getrpcbynumber-and-getrpcbyname-if-those-are.patch |
966 |
- epatch "${FILESDIR}"/0002-Misc-header-fixes.patch |
967 |
- epatch "${FILESDIR}"/0003-fix_cdefs_h_include.patch |
968 |
- epatch "${FILESDIR}"/0004-fix_DECLS.patch |
969 |
- epatch "${FILESDIR}"/0005-fix_remaining_issues.patch |
970 |
- epatch "${FILESDIR}"/0006-fix_queue_h_include.patch |
971 |
- epatch "${FILESDIR}"/0007-no-des.patch |
972 |
- eautoconf |
973 |
- eautoreconf |
974 |
+ default |
975 |
+ # Musl fixes |
976 |
+ epatch "${FILESDIR}"/git.patch |
977 |
} |
978 |
|
979 |
multilib_src_configure() { |
980 |
@@ -56,7 +43,7 @@ multilib_src_install() { |
981 |
default |
982 |
|
983 |
# libtirpc replaces rpc support in glibc, so we need it in / |
984 |
- multilib_is_native_abi && gen_usr_ldscript -a tirpc |
985 |
+ gen_usr_ldscript -a tirpc |
986 |
} |
987 |
|
988 |
multilib_src_install_all() { |