forked from pool/libtirpc
Accepting request 315658 from home:kukuk:NIS
- Add 012-xp_sock.patch: add sunrpc compatibility define - Update 009-authdes_pk_create.patch (fix syncaddr handling) - Add 011-authdes_create.patch (fix syncaddr handling) - Add 010-xdr_sizeof.patch (enable xdr_sizeof) - Add 009-authdes_pk_create.patch (missing SunRPC compat function) OBS-URL: https://build.opensuse.org/request/show/315658 OBS-URL: https://build.opensuse.org/package/show/Base:System/libtirpc?expand=0&rev=51
This commit is contained in:
parent
95f5f1cbd5
commit
25987c29d1
84
009-authdes_pk_create.patch
Normal file
84
009-authdes_pk_create.patch
Normal file
@ -0,0 +1,84 @@
|
||||
diff --git a/src/libtirpc.map b/src/libtirpc.map
|
||||
index 449b769..13bc20a 100644
|
||||
--- a/src/libtirpc.map
|
||||
+++ b/src/libtirpc.map
|
||||
@@ -321,6 +321,7 @@ TIRPC_0.3.3 {
|
||||
__key_decryptsession_pk_LOCAL;
|
||||
__key_encryptsession_pk_LOCAL;
|
||||
__key_gendes_LOCAL;
|
||||
+ authdes_pk_create;
|
||||
} TIRPC_0.3.2;
|
||||
|
||||
TIRPC_PRIVATE {
|
||||
diff --git a/src/rpc_soc.c b/src/rpc_soc.c
|
||||
index e146ed4..03bc0d4 100644
|
||||
--- a/src/rpc_soc.c
|
||||
+++ b/src/rpc_soc.c
|
||||
@@ -61,6 +61,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
+#include <rpcsvc/nis.h>
|
||||
|
||||
#include "rpc_com.h"
|
||||
|
||||
@@ -553,6 +554,46 @@ fallback:
|
||||
}
|
||||
|
||||
/*
|
||||
+ * Create the client des authentication object. Obsoleted by
|
||||
+ * authdes_pk_seccreate().
|
||||
+ */
|
||||
+extern AUTH *authdes_pk_seccreate(const char *, netobj *, u_int, const char *,
|
||||
+ const des_block *, nis_server *);
|
||||
+
|
||||
+AUTH *
|
||||
+authdes_pk_create(servername, pkey, window, syncaddr, ckey)
|
||||
+ char *servername; /* network name of server */
|
||||
+ netobj *pkey; /* public key */
|
||||
+ u_int window; /* time to live */
|
||||
+ struct sockaddr *syncaddr; /* optional hostaddr to sync with */
|
||||
+ des_block *ckey; /* optional conversation key to use */
|
||||
+{
|
||||
+ AUTH *nauth;
|
||||
+ char hostname[NI_MAXHOST];
|
||||
+
|
||||
+ if (syncaddr) {
|
||||
+ /*
|
||||
+ * Change addr to hostname, because that is the way
|
||||
+ * new interface takes it.
|
||||
+ */
|
||||
+ switch (syncaddr->sa_family) {
|
||||
+ case AF_INET:
|
||||
+ if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
|
||||
+ sizeof hostname, NULL, 0, 0) != 0)
|
||||
+ goto fallback;
|
||||
+ break;
|
||||
+ default:
|
||||
+ goto fallback;
|
||||
+ }
|
||||
+ nauth = authdes_pk_seccreate(servername, pkey, window, hostname, ckey, NULL);
|
||||
+ return (nauth);
|
||||
+ }
|
||||
+fallback:
|
||||
+ return authdes_pk_seccreate(servername, pkey, window, NULL, ckey, NULL);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/*
|
||||
* Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
|
||||
*/
|
||||
CLIENT *
|
||||
diff --git a/tirpc/rpc/auth.h b/tirpc/rpc/auth.h
|
||||
index 3e44863..e67779c 100644
|
||||
--- a/tirpc/rpc/auth.h
|
||||
+++ b/tirpc/rpc/auth.h
|
||||
@@ -313,6 +313,8 @@ extern AUTH *authnone_create(void); /* takes no parameters */
|
||||
extern "C" {
|
||||
#endif
|
||||
extern AUTH *authdes_create (char *, u_int, struct sockaddr *, des_block *);
|
||||
+extern AUTH *authdes_pk_create (char *, netobj *, u_int,
|
||||
+ struct sockaddr *, des_block *);
|
||||
extern AUTH *authdes_seccreate (const char *, const u_int, const char *,
|
||||
const des_block *);
|
||||
#ifdef __cplusplus
|
59
010-xdr_sizeof.patch
Normal file
59
010-xdr_sizeof.patch
Normal file
@ -0,0 +1,59 @@
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 18b1cec..a29f607 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -54,7 +54,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln
|
||||
auth_time.c auth_des.c authdes_prot.c debug.c
|
||||
|
||||
## XDR
|
||||
-libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c
|
||||
+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
|
||||
|
||||
if SYMVERS
|
||||
libtirpc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libtirpc.map
|
||||
diff --git a/src/libtirpc.map b/src/libtirpc.map
|
||||
index 449b769..855d6b3 100644
|
||||
--- a/src/libtirpc.map
|
||||
+++ b/src/libtirpc.map
|
||||
@@ -321,6 +321,7 @@ TIRPC_0.3.3 {
|
||||
__key_encryptsession_pk_LOCAL;
|
||||
__key_gendes_LOCAL;
|
||||
authdes_pk_create;
|
||||
+ xdr_sizeof;
|
||||
} TIRPC_0.3.2;
|
||||
|
||||
TIRPC_PRIVATE {
|
||||
diff --git a/src/xdr_sizeof.c b/src/xdr_sizeof.c
|
||||
index cc5414b..4ecc977 100644
|
||||
--- a/src/xdr_sizeof.c
|
||||
+++ b/src/xdr_sizeof.c
|
||||
@@ -90,7 +90,7 @@ x_inline(xdrs, len)
|
||||
if (xdrs->x_op != XDR_ENCODE) {
|
||||
return (NULL);
|
||||
}
|
||||
- if (len < (u_int)xdrs->x_base) {
|
||||
+ if (len < (u_int) (long int) xdrs->x_base) {
|
||||
/* x_private was already allocated */
|
||||
xdrs->x_handy += len;
|
||||
return ((int32_t *) xdrs->x_private);
|
||||
@@ -102,7 +102,7 @@ x_inline(xdrs, len)
|
||||
xdrs->x_base = 0;
|
||||
return (NULL);
|
||||
}
|
||||
- xdrs->x_base = (caddr_t) len;
|
||||
+ xdrs->x_base = (void *) (long) len;
|
||||
xdrs->x_handy += len;
|
||||
return ((int32_t *) xdrs->x_private);
|
||||
}
|
||||
diff --git a/tirpc/rpc/xdr.h b/tirpc/rpc/xdr.h
|
||||
index 64069ab..904e5bb 100644
|
||||
--- a/tirpc/rpc/xdr.h
|
||||
+++ b/tirpc/rpc/xdr.h
|
||||
@@ -327,6 +327,7 @@ extern bool_t xdr_hyper(XDR *, quad_t *);
|
||||
extern bool_t xdr_u_hyper(XDR *, u_quad_t *);
|
||||
extern bool_t xdr_longlong_t(XDR *, quad_t *);
|
||||
extern bool_t xdr_u_longlong_t(XDR *, u_quad_t *);
|
||||
+extern u_long xdr_sizeof(xdrproc_t, void *);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
39
011-authdes_create.patch
Normal file
39
011-authdes_create.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff --git a/src/rpc_soc.c b/src/rpc_soc.c
|
||||
index e146ed4..9d555d3 100644
|
||||
--- a/src/rpc_soc.c
|
||||
+++ b/src/rpc_soc.c
|
||||
@@ -531,7 +531,6 @@ authdes_create(servername, window, syncaddr, ckey)
|
||||
struct sockaddr *syncaddr; /* optional hostaddr to sync with */
|
||||
des_block *ckey; /* optional conversation key to use */
|
||||
{
|
||||
- AUTH *dummy;
|
||||
AUTH *nauth;
|
||||
char hostname[NI_MAXHOST];
|
||||
|
||||
@@ -540,16 +539,20 @@ authdes_create(servername, window, syncaddr, ckey)
|
||||
* Change addr to hostname, because that is the way
|
||||
* new interface takes it.
|
||||
*/
|
||||
- if (getnameinfo(syncaddr, sizeof(syncaddr), hostname,
|
||||
- sizeof hostname, NULL, 0, 0) != 0)
|
||||
- goto fallback;
|
||||
-
|
||||
+ switch (syncaddr->sa_family) {
|
||||
+ case AF_INET:
|
||||
+ if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
|
||||
+ sizeof hostname, NULL, 0, 0) != 0)
|
||||
+ goto fallback;
|
||||
+ break;
|
||||
+ default:
|
||||
+ goto fallback;
|
||||
+ }
|
||||
nauth = authdes_seccreate(servername, window, hostname, ckey);
|
||||
return (nauth);
|
||||
}
|
||||
fallback:
|
||||
- dummy = authdes_seccreate(servername, window, NULL, ckey);
|
||||
- return (dummy);
|
||||
+ return authdes_seccreate(servername, window, NULL, ckey);
|
||||
}
|
||||
|
||||
/*
|
12
012-xp_sock.patch
Normal file
12
012-xp_sock.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/tirpc/rpc/svc.h b/tirpc/rpc/svc.h
|
||||
index 8273c95..f647095 100644
|
||||
--- a/tirpc/rpc/svc.h
|
||||
+++ b/tirpc/rpc/svc.h
|
||||
@@ -88,6 +88,7 @@ enum xprt_stat {
|
||||
*/
|
||||
typedef struct __rpc_svcxprt {
|
||||
int xp_fd;
|
||||
+#define xp_sock xp_fd
|
||||
u_short xp_port; /* associated port number */
|
||||
const struct xp_ops {
|
||||
/* receive incoming requests */
|
@ -1,3 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 9 10:47:08 CEST 2015 - kukuk@suse.de
|
||||
|
||||
- Add 012-xp_sock.patch: add sunrpc compatibility define
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 2 15:51:07 CEST 2015 - kukuk@suse.de
|
||||
|
||||
- Update 009-authdes_pk_create.patch (fix syncaddr handling)
|
||||
- Add 011-authdes_create.patch (fix syncaddr handling)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jun 27 06:46:14 UTC 2015 - kukuk@suse.com
|
||||
|
||||
- Add 010-xdr_sizeof.patch (enable xdr_sizeof)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 26 22:15:28 UTC 2015 - kukuk@suse.com
|
||||
|
||||
- Add 009-authdes_pk_create.patch (missing SunRPC compat function)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 24 16:44:06 CEST 2015 - kukuk@suse.de
|
||||
|
||||
|
@ -44,6 +44,10 @@ Patch5: 005-missing-symvers.patch
|
||||
Patch6: 006-memleak1.patch
|
||||
Patch7: 007-memleak2.patch
|
||||
Patch8: 008-fix-undef-ref.patch
|
||||
Patch9: 009-authdes_pk_create.patch
|
||||
Patch10: 010-xdr_sizeof.patch
|
||||
Patch11: 011-authdes_create.patch
|
||||
Patch12: 012-xp_sock.patch
|
||||
Patch25: patch6_7.diff
|
||||
# Patch37 is only needed on openSUSE >= 13.1, SLE >= 12
|
||||
Patch37: libtirpc-new-path-rpcbindsock.patch
|
||||
@ -89,6 +93,10 @@ TCP over IPv4
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch25 -p1
|
||||
%if 0%{suse_version} >= 1310
|
||||
%patch37 -p1
|
||||
|
Loading…
Reference in New Issue
Block a user