]> git.pld-linux.org Git - packages/ippool.git/blob - ippool-tirpc.patch
- added opt,tirpc patches, build with libtirpc; release 5
[packages/ippool.git] / ippool-tirpc.patch
1 --- ippool-1.3/ippool_api.c.orig        2020-08-30 22:11:47.358711538 +0200
2 +++ ippool-1.3/ippool_api.c     2020-08-30 22:11:51.015358395 +0200
3 @@ -24,6 +24,7 @@
4   */
5  
6  #include <net/ethernet.h>
7 +#include <netinet/in.h>
8  
9  #include "usl.h"
10  
11 @@ -181,10 +182,12 @@
12          * non-loopback interface, reject the request.
13          */
14         if ((!ippool_opt_remote_rpc) &&
15 -           ((xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_LOOPBACK)) &&
16 -            (xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_ANY)))) {
17 +           memcmp(&xprt->xp_raddr.sin6_addr.s6_addr, &in6addr_loopback, 16) &&
18 +           memcmp(&xprt->xp_raddr.sin6_addr.s6_addr, &in6addr_any, 16)) {
19                 if (ippool_opt_debug) {
20 -                       ippool_log(LOG_ERR, "Rejecting RPC request from %s", inet_ntoa(xprt->xp_raddr.sin_addr));
21 +                       char straddr[INET6_ADDRSTRLEN];
22 +                       inet_ntop(AF_INET6, &xprt->xp_raddr.sin6_addr, straddr, sizeof(straddr));
23 +                       ippool_log(LOG_ERR, "Rejecting RPC request from %s", straddr);
24                 }
25                 svcerr_auth(xprt, AUTH_TOOWEAK);
26                 return -EPERM;
27 --- ippool-1.3/Makefile.orig    2008-02-24 17:22:25.000000000 +0100
28 +++ ippool-1.3/Makefile 2020-08-30 22:20:33.769193061 +0200
29 @@ -83,8 +83,8 @@
30  
31  CPPFLAGS=              $(CPPFLAGS.ippooltest)
32  CFLAGS=                        -I. -Iusl -Icli -MMD -Wall -g $(CPPFLAGS) $(CPPFLAGS.dmalloc)
33 -LDFLAGS.ippoold=       -Wl,-E -L. -Lusl -lusl -lnsl -ldl $(LIBS.dmalloc) -lc
34 -LDFLAGS.ippoolconfig=  -Lcli -lcli -lreadline -lcurses -lnsl $(LIBS.dmalloc) -lc
35 +LDFLAGS.ippoold=       -Wl,-E -L. -Lusl -lusl -ltirpc -ldl $(LIBS.dmalloc) -lc
36 +LDFLAGS.ippoolconfig=  -Lcli -lcli -lreadline -lcurses -ltirpc $(LIBS.dmalloc) -lc
37  
38  OPT_CFLAGS?=           -O
39  
This page took 0.096939 seconds and 3 git commands to generate.