Updated to latest upstream version: 0.2.2
Signed-off-by: Steve Dickson <steved@redhat.com>
This commit is contained in:
parent
10b3a48eb1
commit
272a5ae76e
9
.gitignore
vendored
9
.gitignore
vendored
@ -1,7 +1,2 @@
|
|||||||
libtirpc-0.1.7.tar.bz2
|
cscope*
|
||||||
libtirpc-0.1.8.tar.bz2
|
/libtirpc-0.2.2.tar.bz2
|
||||||
libtirpc-0.1.9.tar.bz2
|
|
||||||
libtirpc-0.1.10.tar.bz2
|
|
||||||
libtirpc-0.1.11.tar.bz2
|
|
||||||
libtirpc-0.2.0.tar.bz2
|
|
||||||
libtirpc-0.2.1.tar.bz2
|
|
||||||
|
@ -1,692 +0,0 @@
|
|||||||
diff --git a/.gitignore b/.gitignore
|
|
||||||
index f4a325a..a5a8f11 100644
|
|
||||||
--- a/.gitignore
|
|
||||||
+++ b/.gitignore
|
|
||||||
@@ -13,6 +13,7 @@ ltmain.sh
|
|
||||||
Makefile.in
|
|
||||||
missing
|
|
||||||
config.h.in
|
|
||||||
+m4/*
|
|
||||||
# files generated by configure
|
|
||||||
confdefs.h
|
|
||||||
config.status
|
|
||||||
diff --git a/Makefile.am b/Makefile.am
|
|
||||||
index 7f5f37b..1a7596b 100644
|
|
||||||
--- a/Makefile.am
|
|
||||||
+++ b/Makefile.am
|
|
||||||
@@ -1,4 +1,5 @@
|
|
||||||
SUBDIRS = src man doc
|
|
||||||
+ACLOCAL_AMFLAGS = -I m4
|
|
||||||
|
|
||||||
nobase_include_HEADERS = tirpc/netconfig.h \
|
|
||||||
tirpc/rpcsvc/crypt.x \
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index 0f3ce42..34dc080 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -2,6 +2,7 @@ AC_INIT(libtirpc, 0.2.1)
|
|
||||||
AM_INIT_AUTOMAKE(libtirpc, 0.2.1)
|
|
||||||
AM_MAINTAINER_MODE
|
|
||||||
AC_CONFIG_SRCDIR([src/auth_des.c])
|
|
||||||
+AC_CONFIG_MACRO_DIR([m4])
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(gss,[ --enable-gss Turn on gss api], [case "${enableval}" in
|
|
||||||
yes) gss=true ; AC_CHECK_LIB([gssapi],[gss_init_sec_context]) ;;
|
|
||||||
@@ -18,7 +19,6 @@ fi
|
|
||||||
AC_PROG_CC
|
|
||||||
AM_CONFIG_HEADER(config.h)
|
|
||||||
AC_PROG_LIBTOOL
|
|
||||||
-##AC_PROG_RANLIB
|
|
||||||
AC_HEADER_DIRENT
|
|
||||||
AC_PREFIX_DEFAULT(/usr)
|
|
||||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h])
|
|
||||||
diff --git a/src/auth_unix.c b/src/auth_unix.c
|
|
||||||
index 71ca15d..ddd89cc 100644
|
|
||||||
--- a/src/auth_unix.c
|
|
||||||
+++ b/src/auth_unix.c
|
|
||||||
@@ -49,7 +49,9 @@
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <string.h>
|
|
||||||
+#include <errno.h>
|
|
||||||
|
|
||||||
+#include <rpc/clnt.h>
|
|
||||||
#include <rpc/types.h>
|
|
||||||
#include <rpc/xdr.h>
|
|
||||||
#include <rpc/auth.h>
|
|
||||||
@@ -95,6 +97,8 @@ authunix_create(machname, uid, gid, len, aup_gids)
|
|
||||||
AUTH *auth;
|
|
||||||
struct audata *au;
|
|
||||||
|
|
||||||
+ memset(&rpc_createerr, 0, sizeof(rpc_createerr));
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* Allocate and set up auth handle
|
|
||||||
*/
|
|
||||||
@@ -102,14 +106,16 @@ authunix_create(machname, uid, gid, len, aup_gids)
|
|
||||||
auth = mem_alloc(sizeof(*auth));
|
|
||||||
#ifndef _KERNEL
|
|
||||||
if (auth == NULL) {
|
|
||||||
- warnx("authunix_create: out of memory");
|
|
||||||
+ rpc_createerr.cf_stat = RPC_SYSTEMERROR;
|
|
||||||
+ rpc_createerr.cf_error.re_errno = ENOMEM;
|
|
||||||
goto cleanup_authunix_create;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
au = mem_alloc(sizeof(*au));
|
|
||||||
#ifndef _KERNEL
|
|
||||||
if (au == NULL) {
|
|
||||||
- warnx("authunix_create: out of memory");
|
|
||||||
+ rpc_createerr.cf_stat = RPC_SYSTEMERROR;
|
|
||||||
+ rpc_createerr.cf_error.re_errno = ENOMEM;
|
|
||||||
goto cleanup_authunix_create;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -134,15 +140,18 @@ authunix_create(machname, uid, gid, len, aup_gids)
|
|
||||||
* Serialize the parameters into origcred
|
|
||||||
*/
|
|
||||||
xdrmem_create(&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE);
|
|
||||||
- if (! xdr_authunix_parms(&xdrs, &aup))
|
|
||||||
- abort();
|
|
||||||
+ if (!xdr_authunix_parms(&xdrs, &aup)) {
|
|
||||||
+ rpc_createerr.cf_stat = RPC_CANTENCODEARGS;
|
|
||||||
+ goto cleanup_authunix_create;
|
|
||||||
+ }
|
|
||||||
au->au_origcred.oa_length = len = XDR_GETPOS(&xdrs);
|
|
||||||
au->au_origcred.oa_flavor = AUTH_UNIX;
|
|
||||||
#ifdef _KERNEL
|
|
||||||
au->au_origcred.oa_base = mem_alloc((u_int) len);
|
|
||||||
#else
|
|
||||||
if ((au->au_origcred.oa_base = mem_alloc((u_int) len)) == NULL) {
|
|
||||||
- warnx("authunix_create: out of memory");
|
|
||||||
+ rpc_createerr.cf_stat = RPC_SYSTEMERROR;
|
|
||||||
+ rpc_createerr.cf_error.re_errno = ENOMEM;
|
|
||||||
goto cleanup_authunix_create;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -180,13 +189,22 @@ authunix_create_default()
|
|
||||||
gid_t gid;
|
|
||||||
gid_t gids[NGRPS];
|
|
||||||
|
|
||||||
- if (gethostname(machname, sizeof machname) == -1)
|
|
||||||
- abort();
|
|
||||||
+ memset(&rpc_createerr, 0, sizeof(rpc_createerr));
|
|
||||||
+
|
|
||||||
+ if (gethostname(machname, sizeof machname) == -1) {
|
|
||||||
+ rpc_createerr.cf_stat = RPC_SYSTEMERROR;
|
|
||||||
+ rpc_createerr.cf_error.re_errno = errno;
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
machname[sizeof(machname) - 1] = 0;
|
|
||||||
uid = geteuid();
|
|
||||||
gid = getegid();
|
|
||||||
- if ((len = getgroups(NGRPS, gids)) < 0)
|
|
||||||
- abort();
|
|
||||||
+ len = getgroups(NGRPS, gids);
|
|
||||||
+ if (len < 0) {
|
|
||||||
+ rpc_createerr.cf_stat = RPC_SYSTEMERROR;
|
|
||||||
+ rpc_createerr.cf_error.re_errno = errno;
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
/* XXX: interface problem; those should all have been unsigned */
|
|
||||||
return (authunix_create(machname, uid, gid, len, gids));
|
|
||||||
}
|
|
||||||
diff --git a/src/authgss_prot.c b/src/authgss_prot.c
|
|
||||||
index ab72d91..9d7fa09 100644
|
|
||||||
--- a/src/authgss_prot.c
|
|
||||||
+++ b/src/authgss_prot.c
|
|
||||||
@@ -44,6 +44,34 @@
|
|
||||||
#include <rpc/rpc.h>
|
|
||||||
#include <gssapi/gssapi.h>
|
|
||||||
|
|
||||||
+/* additional space needed for encoding */
|
|
||||||
+#define RPC_SLACK_SPACE 1024
|
|
||||||
+
|
|
||||||
+bool_t
|
|
||||||
+xdr_rpc_gss_buf(XDR *xdrs, gss_buffer_t buf, u_int maxsize)
|
|
||||||
+{
|
|
||||||
+ bool_t xdr_stat;
|
|
||||||
+ u_int tmplen;
|
|
||||||
+
|
|
||||||
+ if (xdrs->x_op != XDR_DECODE) {
|
|
||||||
+ if (buf->length > UINT_MAX)
|
|
||||||
+ return FALSE;
|
|
||||||
+ else
|
|
||||||
+ tmplen = buf->length;
|
|
||||||
+ }
|
|
||||||
+ xdr_stat = xdr_bytes(xdrs, (char **)&buf->value, &tmplen, maxsize);
|
|
||||||
+
|
|
||||||
+ if (xdr_stat && xdrs->x_op == XDR_DECODE)
|
|
||||||
+ buf->length = tmplen;
|
|
||||||
+
|
|
||||||
+ log_debug("xdr_rpc_gss_buf: %s %s (%p:%d)",
|
|
||||||
+ (xdrs->x_op == XDR_ENCODE) ? "encode" : "decode",
|
|
||||||
+ (xdr_stat == TRUE) ? "success" : "failure",
|
|
||||||
+ buf->value, buf->length);
|
|
||||||
+
|
|
||||||
+ return xdr_stat;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
bool_t
|
|
||||||
xdr_rpc_gss_cred(XDR *xdrs, struct rpc_gss_cred *p)
|
|
||||||
{
|
|
||||||
@@ -53,8 +81,7 @@ xdr_rpc_gss_cred(XDR *xdrs, struct rpc_gss_cred *p)
|
|
||||||
xdr_enum(xdrs, (enum_t *)&p->gc_proc) &&
|
|
||||||
xdr_u_int(xdrs, &p->gc_seq) &&
|
|
||||||
xdr_enum(xdrs, (enum_t *)&p->gc_svc) &&
|
|
||||||
- xdr_bytes(xdrs, (char **)&p->gc_ctx.value,
|
|
||||||
- (u_int *)&p->gc_ctx.length, MAX_AUTH_BYTES));
|
|
||||||
+ xdr_rpc_gss_buf(xdrs, &p->gc_ctx, MAX_AUTH_BYTES));
|
|
||||||
|
|
||||||
log_debug("xdr_rpc_gss_cred: %s %s "
|
|
||||||
"(v %d, proc %d, seq %d, svc %d, ctx %p:%d)",
|
|
||||||
@@ -70,9 +97,9 @@ bool_t
|
|
||||||
xdr_rpc_gss_init_args(XDR *xdrs, gss_buffer_desc *p)
|
|
||||||
{
|
|
||||||
bool_t xdr_stat;
|
|
||||||
+ u_int maxlen = (u_int)(p->length + RPC_SLACK_SPACE);
|
|
||||||
|
|
||||||
- xdr_stat = xdr_bytes(xdrs, (char **)&p->value,
|
|
||||||
- (u_int *)&p->length, MAX_NETOBJ_SZ);
|
|
||||||
+ xdr_stat = xdr_rpc_gss_buf(xdrs, p, maxlen);
|
|
||||||
|
|
||||||
log_debug("xdr_rpc_gss_init_args: %s %s (token %p:%d)",
|
|
||||||
(xdrs->x_op == XDR_ENCODE) ? "encode" : "decode",
|
|
||||||
@@ -87,13 +114,14 @@ xdr_rpc_gss_init_res(XDR *xdrs, struct rpc_gss_init_res *p)
|
|
||||||
{
|
|
||||||
bool_t xdr_stat;
|
|
||||||
|
|
||||||
- xdr_stat = (xdr_bytes(xdrs, (char **)&p->gr_ctx.value,
|
|
||||||
- (u_int *)&p->gr_ctx.length, MAX_NETOBJ_SZ) &&
|
|
||||||
+ u_int ctx_maxlen = (u_int)(p->gr_ctx.length + RPC_SLACK_SPACE);
|
|
||||||
+ u_int tok_maxlen = (u_int)(p->gr_token.length + RPC_SLACK_SPACE);
|
|
||||||
+
|
|
||||||
+ xdr_stat = (xdr_rpc_gss_buf(xdrs, &p->gr_ctx, ctx_maxlen) &&
|
|
||||||
xdr_u_int(xdrs, &p->gr_major) &&
|
|
||||||
xdr_u_int(xdrs, &p->gr_minor) &&
|
|
||||||
xdr_u_int(xdrs, &p->gr_win) &&
|
|
||||||
- xdr_bytes(xdrs, (char **)&p->gr_token.value,
|
|
||||||
- (u_int *)&p->gr_token.length, MAX_NETOBJ_SZ));
|
|
||||||
+ xdr_rpc_gss_buf(xdrs, &p->gr_token, tok_maxlen));
|
|
||||||
|
|
||||||
log_debug("xdr_rpc_gss_init_res %s %s "
|
|
||||||
"(ctx %p:%d, maj %d, min %d, win %d, token %p:%d)",
|
|
||||||
@@ -115,28 +143,33 @@ xdr_rpc_gss_wrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
|
|
||||||
OM_uint32 maj_stat, min_stat;
|
|
||||||
int start, end, conf_state;
|
|
||||||
bool_t xdr_stat;
|
|
||||||
+ u_int databuflen, maxwrapsz;
|
|
||||||
|
|
||||||
/* Skip databody length. */
|
|
||||||
start = XDR_GETPOS(xdrs);
|
|
||||||
XDR_SETPOS(xdrs, start + 4);
|
|
||||||
|
|
||||||
+ memset(&databuf, 0, sizeof(databuf));
|
|
||||||
+ memset(&wrapbuf, 0, sizeof(wrapbuf));
|
|
||||||
+
|
|
||||||
/* Marshal rpc_gss_data_t (sequence number + arguments). */
|
|
||||||
if (!xdr_u_int(xdrs, &seq) || !(*xdr_func)(xdrs, xdr_ptr))
|
|
||||||
return (FALSE);
|
|
||||||
end = XDR_GETPOS(xdrs);
|
|
||||||
|
|
||||||
/* Set databuf to marshalled rpc_gss_data_t. */
|
|
||||||
- databuf.length = end - start - 4;
|
|
||||||
+ databuflen = end - start - 4;
|
|
||||||
XDR_SETPOS(xdrs, start + 4);
|
|
||||||
- databuf.value = XDR_INLINE(xdrs, databuf.length);
|
|
||||||
+ databuf.value = XDR_INLINE(xdrs, databuflen);
|
|
||||||
|
|
||||||
xdr_stat = FALSE;
|
|
||||||
|
|
||||||
if (svc == RPCSEC_GSS_SVC_INTEGRITY) {
|
|
||||||
/* Marshal databody_integ length. */
|
|
||||||
XDR_SETPOS(xdrs, start);
|
|
||||||
- if (!xdr_u_int(xdrs, (u_int *)&databuf.length))
|
|
||||||
+ if (!xdr_u_int(xdrs, (u_int *)&databuflen))
|
|
||||||
return (FALSE);
|
|
||||||
+ databuf.length = databuflen;
|
|
||||||
|
|
||||||
/* Checksum rpc_gss_data_t. */
|
|
||||||
maj_stat = gss_get_mic(&min_stat, ctx, qop,
|
|
||||||
@@ -147,8 +180,8 @@ xdr_rpc_gss_wrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
|
|
||||||
}
|
|
||||||
/* Marshal checksum. */
|
|
||||||
XDR_SETPOS(xdrs, end);
|
|
||||||
- xdr_stat = xdr_bytes(xdrs, (char **)&wrapbuf.value,
|
|
||||||
- (u_int *)&wrapbuf.length, MAX_NETOBJ_SZ);
|
|
||||||
+ maxwrapsz = (u_int)(wrapbuf.length + RPC_SLACK_SPACE);
|
|
||||||
+ xdr_stat = xdr_rpc_gss_buf(xdrs, &wrapbuf, maxwrapsz);
|
|
||||||
gss_release_buffer(&min_stat, &wrapbuf);
|
|
||||||
}
|
|
||||||
else if (svc == RPCSEC_GSS_SVC_PRIVACY) {
|
|
||||||
@@ -161,8 +194,8 @@ xdr_rpc_gss_wrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
|
|
||||||
}
|
|
||||||
/* Marshal databody_priv. */
|
|
||||||
XDR_SETPOS(xdrs, start);
|
|
||||||
- xdr_stat = xdr_bytes(xdrs, (char **)&wrapbuf.value,
|
|
||||||
- (u_int *)&wrapbuf.length, MAX_NETOBJ_SZ);
|
|
||||||
+ maxwrapsz = (u_int)(wrapbuf.length + RPC_SLACK_SPACE);
|
|
||||||
+ xdr_stat = xdr_rpc_gss_buf(xdrs, &wrapbuf, maxwrapsz);
|
|
||||||
gss_release_buffer(&min_stat, &wrapbuf);
|
|
||||||
}
|
|
||||||
return (xdr_stat);
|
|
||||||
@@ -188,14 +221,12 @@ xdr_rpc_gss_unwrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
|
|
||||||
|
|
||||||
if (svc == RPCSEC_GSS_SVC_INTEGRITY) {
|
|
||||||
/* Decode databody_integ. */
|
|
||||||
- if (!xdr_bytes(xdrs, (char **)&databuf.value, (u_int *)&databuf.length,
|
|
||||||
- MAX_NETOBJ_SZ)) {
|
|
||||||
+ if (!xdr_rpc_gss_buf(xdrs, &databuf, (u_int)-1)) {
|
|
||||||
log_debug("xdr decode databody_integ failed");
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
/* Decode checksum. */
|
|
||||||
- if (!xdr_bytes(xdrs, (char **)&wrapbuf.value, (u_int *)&wrapbuf.length,
|
|
||||||
- MAX_NETOBJ_SZ)) {
|
|
||||||
+ if (!xdr_rpc_gss_buf(xdrs, &wrapbuf, (u_int)-1)) {
|
|
||||||
gss_release_buffer(&min_stat, &databuf);
|
|
||||||
log_debug("xdr decode checksum failed");
|
|
||||||
return (FALSE);
|
|
||||||
@@ -213,8 +244,7 @@ xdr_rpc_gss_unwrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
|
|
||||||
}
|
|
||||||
else if (svc == RPCSEC_GSS_SVC_PRIVACY) {
|
|
||||||
/* Decode databody_priv. */
|
|
||||||
- if (!xdr_bytes(xdrs, (char **)&wrapbuf.value, (u_int *)&wrapbuf.length,
|
|
||||||
- MAX_NETOBJ_SZ)) {
|
|
||||||
+ if (!xdr_rpc_gss_buf(xdrs, &wrapbuf, (u_int)-1)) {
|
|
||||||
log_debug("xdr decode databody_priv failed");
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
diff --git a/src/rpc_generic.c b/src/rpc_generic.c
|
|
||||||
index 541275c..509fb36 100644
|
|
||||||
--- a/src/rpc_generic.c
|
|
||||||
+++ b/src/rpc_generic.c
|
|
||||||
@@ -523,7 +523,7 @@ __rpc_nconf2sockinfo(const struct netconfig *nconf, struct __rpc_sockinfo *sip)
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
-__rpc_nconf2fd(const struct netconfig *nconf)
|
|
||||||
+__rpc_nconf2fd_flags(const struct netconfig *nconf, int flags)
|
|
||||||
{
|
|
||||||
struct __rpc_sockinfo si;
|
|
||||||
int fd;
|
|
||||||
@@ -531,7 +531,7 @@ __rpc_nconf2fd(const struct netconfig *nconf)
|
|
||||||
if (!__rpc_nconf2sockinfo(nconf, &si))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
- if ((fd = socket(si.si_af, si.si_socktype, si.si_proto)) >= 0 &&
|
|
||||||
+ if ((fd = socket(si.si_af, si.si_socktype | flags, si.si_proto)) >= 0 &&
|
|
||||||
si.si_af == AF_INET6) {
|
|
||||||
int val = 1;
|
|
||||||
|
|
||||||
@@ -541,6 +541,12 @@ __rpc_nconf2fd(const struct netconfig *nconf)
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
+__rpc_nconf2fd(const struct netconfig *nconf)
|
|
||||||
+{
|
|
||||||
+ return __rpc_nconf2fd_flags(nconf, 0);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int
|
|
||||||
__rpc_sockinfo2netid(struct __rpc_sockinfo *sip, const char **netid)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
diff --git a/src/rpc_soc.c b/src/rpc_soc.c
|
|
||||||
index 709a8a8..c678429 100644
|
|
||||||
--- a/src/rpc_soc.c
|
|
||||||
+++ b/src/rpc_soc.c
|
|
||||||
@@ -60,13 +60,14 @@
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
+#include <fcntl.h>
|
|
||||||
|
|
||||||
#include "rpc_com.h"
|
|
||||||
|
|
||||||
extern mutex_t rpcsoc_lock;
|
|
||||||
|
|
||||||
static CLIENT *clnt_com_create(struct sockaddr_in *, rpcprog_t, rpcvers_t,
|
|
||||||
- int *, u_int, u_int, char *);
|
|
||||||
+ int *, u_int, u_int, char *, int);
|
|
||||||
static SVCXPRT *svc_com_create(int, u_int, u_int, char *);
|
|
||||||
static bool_t rpc_wrap_bcast(char *, struct netbuf *, struct netconfig *);
|
|
||||||
|
|
||||||
@@ -78,7 +79,7 @@ static bool_t rpc_wrap_bcast(char *, struct netbuf *, struct netconfig *);
|
|
||||||
* A common clnt create routine
|
|
||||||
*/
|
|
||||||
static CLIENT *
|
|
||||||
-clnt_com_create(raddr, prog, vers, sockp, sendsz, recvsz, tp)
|
|
||||||
+clnt_com_create(raddr, prog, vers, sockp, sendsz, recvsz, tp, flags)
|
|
||||||
struct sockaddr_in *raddr;
|
|
||||||
rpcprog_t prog;
|
|
||||||
rpcvers_t vers;
|
|
||||||
@@ -86,6 +87,7 @@ clnt_com_create(raddr, prog, vers, sockp, sendsz, recvsz, tp)
|
|
||||||
u_int sendsz;
|
|
||||||
u_int recvsz;
|
|
||||||
char *tp;
|
|
||||||
+ int flags;
|
|
||||||
{
|
|
||||||
CLIENT *cl;
|
|
||||||
int madefd = FALSE;
|
|
||||||
@@ -100,9 +102,21 @@ clnt_com_create(raddr, prog, vers, sockp, sendsz, recvsz, tp)
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
if (fd == RPC_ANYSOCK) {
|
|
||||||
- fd = __rpc_nconf2fd(nconf);
|
|
||||||
- if (fd == -1)
|
|
||||||
- goto syserror;
|
|
||||||
+ static int have_cloexec;
|
|
||||||
+ fd = __rpc_nconf2fd_flags(nconf, flags);
|
|
||||||
+ if (fd == -1) {
|
|
||||||
+ if ((flags & SOCK_CLOEXEC) && have_cloexec <= 0) {
|
|
||||||
+ fd = __rpc_nconf2fd(nconf);
|
|
||||||
+ if (fd == -1)
|
|
||||||
+ goto syserror;
|
|
||||||
+ if (flags & SOCK_CLOEXEC) {
|
|
||||||
+ have_cloexec = -1;
|
|
||||||
+ fcntl(fd, F_SETFD, FD_CLOEXEC);
|
|
||||||
+ }
|
|
||||||
+ } else
|
|
||||||
+ goto syserror;
|
|
||||||
+ } else if (flags & SOCK_CLOEXEC)
|
|
||||||
+ have_cloexec = 1;
|
|
||||||
madefd = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -154,6 +168,28 @@ err: if (madefd == TRUE)
|
|
||||||
}
|
|
||||||
|
|
||||||
CLIENT *
|
|
||||||
+__libc_clntudp_bufcreate(raddr, prog, vers, wait, sockp, sendsz, recvsz, flags)
|
|
||||||
+ struct sockaddr_in *raddr;
|
|
||||||
+ u_long prog;
|
|
||||||
+ u_long vers;
|
|
||||||
+ struct timeval wait;
|
|
||||||
+ int *sockp;
|
|
||||||
+ u_int sendsz;
|
|
||||||
+ u_int recvsz;
|
|
||||||
+ int flags;
|
|
||||||
+{
|
|
||||||
+ CLIENT *cl;
|
|
||||||
+
|
|
||||||
+ cl = clnt_com_create(raddr, (rpcprog_t)prog, (rpcvers_t)vers, sockp,
|
|
||||||
+ sendsz, recvsz, "udp", flags);
|
|
||||||
+ if (cl == NULL) {
|
|
||||||
+ return (NULL);
|
|
||||||
+ }
|
|
||||||
+ (void) CLNT_CONTROL(cl, CLSET_RETRY_TIMEOUT, &wait);
|
|
||||||
+ return (cl);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+CLIENT *
|
|
||||||
clntudp_bufcreate(raddr, prog, vers, wait, sockp, sendsz, recvsz)
|
|
||||||
struct sockaddr_in *raddr;
|
|
||||||
u_long prog;
|
|
||||||
@@ -166,7 +202,7 @@ clntudp_bufcreate(raddr, prog, vers, wait, sockp, sendsz, recvsz)
|
|
||||||
CLIENT *cl;
|
|
||||||
|
|
||||||
cl = clnt_com_create(raddr, (rpcprog_t)prog, (rpcvers_t)vers, sockp,
|
|
||||||
- sendsz, recvsz, "udp");
|
|
||||||
+ sendsz, recvsz, "udp", 0);
|
|
||||||
if (cl == NULL) {
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
@@ -195,7 +231,7 @@ clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
|
|
||||||
u_int recvsz;
|
|
||||||
{
|
|
||||||
return clnt_com_create(raddr, (rpcprog_t)prog, (rpcvers_t)vers, sockp,
|
|
||||||
- sendsz, recvsz, "tcp");
|
|
||||||
+ sendsz, recvsz, "tcp", 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* IPv6 version of clnt*_*create */
|
|
||||||
@@ -215,7 +251,7 @@ clntudp6_bufcreate(raddr, prog, vers, wait, sockp, sendsz, recvsz)
|
|
||||||
CLIENT *cl;
|
|
||||||
|
|
||||||
cl = clnt_com_create(raddr, (rpcprog_t)prog, (rpcvers_t)vers, sockp,
|
|
||||||
- sendsz, recvsz, "udp6");
|
|
||||||
+ sendsz, recvsz, "udp6", 0);
|
|
||||||
if (cl == NULL) {
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
@@ -244,7 +280,7 @@ clnttcp6_create(raddr, prog, vers, sockp, sendsz, recvsz)
|
|
||||||
u_int recvsz;
|
|
||||||
{
|
|
||||||
return clnt_com_create(raddr, (rpcprog_t)prog, (rpcvers_t)vers, sockp,
|
|
||||||
- sendsz, recvsz, "tcp6");
|
|
||||||
+ sendsz, recvsz, "tcp6", 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
diff --git a/src/rpcb_clnt.c b/src/rpcb_clnt.c
|
|
||||||
index 4a3e96c..218ff7c 100644
|
|
||||||
--- a/src/rpcb_clnt.c
|
|
||||||
+++ b/src/rpcb_clnt.c
|
|
||||||
@@ -56,6 +56,7 @@
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <netdb.h>
|
|
||||||
#include <syslog.h>
|
|
||||||
+#include <assert.h>
|
|
||||||
|
|
||||||
#include "rpc_com.h"
|
|
||||||
|
|
||||||
@@ -211,14 +212,12 @@ add_cache(host, netid, taddr, uaddr)
|
|
||||||
ad_cache->ac_uaddr = uaddr ? strdup(uaddr) : NULL;
|
|
||||||
ad_cache->ac_taddr = (struct netbuf *)malloc(sizeof (struct netbuf));
|
|
||||||
if (!ad_cache->ac_host || !ad_cache->ac_netid || !ad_cache->ac_taddr ||
|
|
||||||
- (uaddr && !ad_cache->ac_uaddr)) {
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
+ (uaddr && !ad_cache->ac_uaddr))
|
|
||||||
+ goto out_free;
|
|
||||||
ad_cache->ac_taddr->len = ad_cache->ac_taddr->maxlen = taddr->len;
|
|
||||||
ad_cache->ac_taddr->buf = (char *) malloc(taddr->len);
|
|
||||||
- if (ad_cache->ac_taddr->buf == NULL) {
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
+ if (ad_cache->ac_taddr->buf == NULL)
|
|
||||||
+ goto out_free;
|
|
||||||
memcpy(ad_cache->ac_taddr->buf, taddr->buf, taddr->len);
|
|
||||||
#ifdef ND_DEBUG
|
|
||||||
fprintf(stderr, "Added to cache: %s : %s\n", host, netid);
|
|
||||||
@@ -262,6 +261,14 @@ add_cache(host, netid, taddr, uaddr)
|
|
||||||
free(cptr);
|
|
||||||
}
|
|
||||||
rwlock_unlock(&rpcbaddr_cache_lock);
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+out_free:
|
|
||||||
+ free(ad_cache->ac_host);
|
|
||||||
+ free(ad_cache->ac_netid);
|
|
||||||
+ free(ad_cache->ac_uaddr);
|
|
||||||
+ free(ad_cache->ac_taddr);
|
|
||||||
+ free(ad_cache);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -289,6 +296,8 @@ getclnthandle(host, nconf, targaddr)
|
|
||||||
|
|
||||||
/* Get the address of the rpcbind. Check cache first */
|
|
||||||
client = NULL;
|
|
||||||
+ if (targaddr)
|
|
||||||
+ *targaddr = NULL;
|
|
||||||
addr_to_delete.len = 0;
|
|
||||||
rwlock_rdlock(&rpcbaddr_cache_lock);
|
|
||||||
ad_cache = NULL;
|
|
||||||
@@ -325,7 +334,8 @@ getclnthandle(host, nconf, targaddr)
|
|
||||||
}
|
|
||||||
if (!__rpc_nconf2sockinfo(nconf, &si)) {
|
|
||||||
rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
|
|
||||||
- return NULL;
|
|
||||||
+ assert(client == NULL);
|
|
||||||
+ goto out_err;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&hints, 0, sizeof hints);
|
|
||||||
@@ -344,7 +354,7 @@ getclnthandle(host, nconf, targaddr)
|
|
||||||
#ifdef ND_DEBUG
|
|
||||||
clnt_pcreateerror("rpcbind clnt interface");
|
|
||||||
#endif
|
|
||||||
- return (NULL);
|
|
||||||
+ goto out_err;
|
|
||||||
} else {
|
|
||||||
struct sockaddr_un sun;
|
|
||||||
|
|
||||||
@@ -356,7 +366,8 @@ getclnthandle(host, nconf, targaddr)
|
|
||||||
} else {
|
|
||||||
if (getaddrinfo(host, "sunrpc", &hints, &res) != 0) {
|
|
||||||
rpc_createerr.cf_stat = RPC_UNKNOWNHOST;
|
|
||||||
- return NULL;
|
|
||||||
+ assert(client == NULL);
|
|
||||||
+ goto out_err;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -404,6 +415,9 @@ getclnthandle(host, nconf, targaddr)
|
|
||||||
}
|
|
||||||
if (res)
|
|
||||||
freeaddrinfo(res);
|
|
||||||
+out_err:
|
|
||||||
+ if (!client && targaddr)
|
|
||||||
+ free(*targaddr);
|
|
||||||
return (client);
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/svc.c b/src/svc.c
|
|
||||||
index cc65e6a..b4a63d0 100644
|
|
||||||
--- a/src/svc.c
|
|
||||||
+++ b/src/svc.c
|
|
||||||
@@ -615,7 +615,7 @@ svc_getreqset (readfds)
|
|
||||||
maskp = readfds->fds_bits;
|
|
||||||
for (sock = 0; sock < FD_SETSIZE; sock += NFDBITS)
|
|
||||||
{
|
|
||||||
- for (mask = *maskp++; (bit = ffs (mask)) != 0; mask ^= (1 << (bit - 1)))
|
|
||||||
+ for (mask = *maskp++; (bit = ffsl(mask)) != 0; mask ^= (1L << (bit - 1)))
|
|
||||||
{
|
|
||||||
/* sock has input waiting */
|
|
||||||
fd = sock + bit - 1;
|
|
||||||
diff --git a/src/svc_vc.c b/src/svc_vc.c
|
|
||||||
index 8e39597..aaaf2d7 100644
|
|
||||||
--- a/src/svc_vc.c
|
|
||||||
+++ b/src/svc_vc.c
|
|
||||||
@@ -748,6 +748,10 @@ __rpc_get_local_uid(SVCXPRT *transp, uid_t *uid) {
|
|
||||||
* Destroy xprts that have not have had any activity in 'timeout' seconds.
|
|
||||||
* If 'cleanblock' is true, blocking connections (the default) are also
|
|
||||||
* cleaned. If timeout is 0, the least active connection is picked.
|
|
||||||
+ *
|
|
||||||
+ * Though this is not a publicly documented interface, some versions of
|
|
||||||
+ * rpcbind are known to call this function. Do not alter or remove this
|
|
||||||
+ * API without changing the library's sonum.
|
|
||||||
*/
|
|
||||||
bool_t
|
|
||||||
__svc_clean_idle(fd_set *fds, int timeout, bool_t cleanblock)
|
|
||||||
diff --git a/tirpc/rpc/auth_des.h b/tirpc/rpc/auth_des.h
|
|
||||||
index f3f9f31..39b5332 100644
|
|
||||||
--- a/tirpc/rpc/auth_des.h
|
|
||||||
+++ b/tirpc/rpc/auth_des.h
|
|
||||||
@@ -84,7 +84,7 @@ struct authdes_verf {
|
|
||||||
struct timeval adv_ctime; /* clear time */
|
|
||||||
des_block adv_xtime; /* crypt time */
|
|
||||||
} adv_time_u;
|
|
||||||
- //u_long adv_int_u;
|
|
||||||
+ /*u_long adv_int_u;*/
|
|
||||||
u_int32_t adv_int_u;
|
|
||||||
};
|
|
||||||
|
|
||||||
diff --git a/tirpc/rpc/clnt.h b/tirpc/rpc/clnt.h
|
|
||||||
index 0b26189..e7bb43f 100644
|
|
||||||
--- a/tirpc/rpc/clnt.h
|
|
||||||
+++ b/tirpc/rpc/clnt.h
|
|
||||||
@@ -42,8 +42,7 @@
|
|
||||||
#ifndef _TIRPC_CLNT_H_
|
|
||||||
#define _TIRPC_CLNT_H_
|
|
||||||
|
|
||||||
-//#include <rpc/clnt_stat.h>
|
|
||||||
-#include "clnt_stat.h"
|
|
||||||
+#include <rpc/clnt_stat.h>
|
|
||||||
#include <rpc/auth.h>
|
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
|
||||||
diff --git a/tirpc/rpc/rpc.h b/tirpc/rpc/rpc.h
|
|
||||||
index 29e29e9..6c0222e 100644
|
|
||||||
--- a/tirpc/rpc/rpc.h
|
|
||||||
+++ b/tirpc/rpc/rpc.h
|
|
||||||
@@ -101,6 +101,7 @@ __END_DECLS
|
|
||||||
*/
|
|
||||||
__BEGIN_DECLS
|
|
||||||
int __rpc_nconf2fd(const struct netconfig *);
|
|
||||||
+int __rpc_nconf2fd_flags(const struct netconfig *, int);
|
|
||||||
int __rpc_nconf2sockinfo(const struct netconfig *, struct __rpc_sockinfo *);
|
|
||||||
int __rpc_fd2sockinfo(int, struct __rpc_sockinfo *);
|
|
||||||
u_int __rpc_get_t_size(int, int, int);
|
|
||||||
diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h
|
|
||||||
index 1d83550..7fd93d9 100644
|
|
||||||
--- a/tirpc/rpc/rpcent.h
|
|
||||||
+++ b/tirpc/rpc/rpcent.h
|
|
||||||
@@ -44,23 +44,27 @@
|
|
||||||
/* #pragma ident "@(#)rpcent.h 1.13 94/04/25 SMI" */
|
|
||||||
/* @(#)rpcent.h 1.1 88/12/06 SMI */
|
|
||||||
|
|
||||||
+__BEGIN_DECLS
|
|
||||||
|
|
||||||
-//struct rpcent {
|
|
||||||
-// char *r_name; /* name of server for this rpc program */
|
|
||||||
-// char **r_aliases; /* alias list */
|
|
||||||
-// int r_number; /* rpc program number */
|
|
||||||
-//};
|
|
||||||
+/* These are defined in /usr/include/rpc/netdb.h */
|
|
||||||
+#if 0
|
|
||||||
+struct rpcent {
|
|
||||||
+ char *r_name; /* name of server for this rpc program */
|
|
||||||
+ char **r_aliases; /* alias list */
|
|
||||||
+ int r_number; /* rpc program number */
|
|
||||||
+};
|
|
||||||
|
|
||||||
-__BEGIN_DECLS
|
|
||||||
-//extern struct rpcent *getrpcbyname_r(const char *, struct rpcent *,
|
|
||||||
-// char *, int);
|
|
||||||
-//extern struct rpcent *getrpcbynumber_r(int, struct rpcent *, char *, int);
|
|
||||||
-//extern struct rpcent *getrpcent_r(struct rpcent *, char *, int);
|
|
||||||
+extern struct rpcent *getrpcbyname_r(const char *, struct rpcent *,
|
|
||||||
+ char *, int);
|
|
||||||
+extern struct rpcent *getrpcbynumber_r(int, struct rpcent *, char *, int);
|
|
||||||
+extern struct rpcent *getrpcent_r(struct rpcent *, char *, int);
|
|
||||||
|
|
||||||
/* Old interfaces that return a pointer to a static area; MT-unsafe */
|
|
||||||
-//extern struct rpcent *getrpcbyname(char *);
|
|
||||||
-//extern struct rpcent *getrpcbynumber(int);
|
|
||||||
-//extern struct rpcent *getrpcent(void);
|
|
||||||
+extern struct rpcent *getrpcbyname(char *);
|
|
||||||
+extern struct rpcent *getrpcbynumber(int);
|
|
||||||
+extern struct rpcent *getrpcent(void);
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
extern void setrpcent(int) __THROW;
|
|
||||||
extern void endrpcent(void) __THROW;
|
|
||||||
__END_DECLS
|
|
||||||
diff --git a/tirpc/rpc/types.h b/tirpc/rpc/types.h
|
|
||||||
index d99a57b..52c30a2 100644
|
|
||||||
--- a/tirpc/rpc/types.h
|
|
||||||
+++ b/tirpc/rpc/types.h
|
|
||||||
@@ -39,7 +39,6 @@
|
|
||||||
#define _TIRPC_TYPES_H
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
-//#include <sys/_null.h>
|
|
||||||
|
|
||||||
typedef int32_t bool_t;
|
|
||||||
typedef int32_t enum_t;
|
|
||||||
diff --git a/tirpc/rpc/xdr.h b/tirpc/rpc/xdr.h
|
|
||||||
index 3a6bc96..2c2a860 100644
|
|
||||||
--- a/tirpc/rpc/xdr.h
|
|
||||||
+++ b/tirpc/rpc/xdr.h
|
|
||||||
@@ -43,7 +43,7 @@
|
|
||||||
#include <sys/cdefs.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
-// Rajout pour la définition des types
|
|
||||||
+
|
|
||||||
#include <rpc/types.h>
|
|
||||||
|
|
||||||
/*
|
|
@ -1,508 +0,0 @@
|
|||||||
commit ba3945e2c7828be7926fd55d50f03db97dc7e022
|
|
||||||
Author: Tom 'spot' Callaway <tcallawa@redhat.com>
|
|
||||||
Date: Tue Aug 31 13:38:21 2010 -0400
|
|
||||||
|
|
||||||
Fixed last remaining license issues
|
|
||||||
|
|
||||||
Three files in libtirpc have the "BSD with advertising" or "BSD 4
|
|
||||||
clause" license on them (Free, but GPL incompatible). Thankfully, two of
|
|
||||||
the three files (tirpc/libc_private.h and tirpc/nss_tls.h) aren't
|
|
||||||
necessary on Linux at all. They were copied from FreeBSD, but FreeBSD
|
|
||||||
(and NetBSD) include those headers, so they can be conditionalized out
|
|
||||||
in the code. The third header, tirpc/reentrant.h originally came from
|
|
||||||
FreeBSD, but had been modified to point to the Linux pthread equivalent
|
|
||||||
functions. I'm pretty sure that would cause the code to break on
|
|
||||||
FreeBSD/NetBSD.
|
|
||||||
|
|
||||||
This patch does the following:
|
|
||||||
|
|
||||||
- Zeros out tirpc/libc_private.h (This file should be deleted from the
|
|
||||||
source control)
|
|
||||||
- Zeros out tirpc/nss_tls.h (This file should be deleted from the source
|
|
||||||
control)
|
|
||||||
- Takes a fresh copy of tirpc/reentrant.h from FreeBSD CVS to inherit
|
|
||||||
the new license (the advertising clause has been dropped in FreeBSD)
|
|
||||||
- Updates tirpc/reentrant.h so that it contains the correct definition
|
|
||||||
mappings for Linux, conditionalized only for Linux.
|
|
||||||
- Updates all source files which #include libc_private.h so that the
|
|
||||||
include is conditionalized on FreeBSD or NetBSD. I honestly don't think
|
|
||||||
these files even need to be included on those platforms, but I'd rather
|
|
||||||
be safe than sorry here.
|
|
||||||
|
|
||||||
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
||||||
|
|
||||||
diff --git a/src/getrpcent.c b/src/getrpcent.c
|
|
||||||
index d7d7ddc..645f18f 100644
|
|
||||||
--- a/src/getrpcent.c
|
|
||||||
+++ b/src/getrpcent.c
|
|
||||||
@@ -46,7 +46,9 @@
|
|
||||||
#include <rpcsvc/yp_prot.h>
|
|
||||||
#include <rpcsvc/ypclnt.h>
|
|
||||||
#endif
|
|
||||||
+#if defined(__FreeBSD__) || defined(__NetBSD__)
|
|
||||||
#include <libc_private.h>
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Internet version.
|
|
||||||
diff --git a/src/mt_misc.c b/src/mt_misc.c
|
|
||||||
index 4cba143..fe12c31 100644
|
|
||||||
--- a/src/mt_misc.c
|
|
||||||
+++ b/src/mt_misc.c
|
|
||||||
@@ -123,17 +123,17 @@ __rpc_createerr()
|
|
||||||
void tsd_key_delete(void)
|
|
||||||
{
|
|
||||||
if (clnt_broadcast_key != -1)
|
|
||||||
- thr_keydelete(clnt_broadcast_key);
|
|
||||||
+ pthread_key_delete(clnt_broadcast_key);
|
|
||||||
if (rpc_call_key != -1)
|
|
||||||
- thr_keydelete(rpc_call_key);
|
|
||||||
+ pthread_key_delete(rpc_call_key);
|
|
||||||
if (tcp_key != -1)
|
|
||||||
- thr_keydelete(tcp_key);
|
|
||||||
+ pthread_key_delete(tcp_key);
|
|
||||||
if (udp_key != -1)
|
|
||||||
- thr_keydelete(udp_key);
|
|
||||||
+ pthread_key_delete(udp_key);
|
|
||||||
if (nc_key != -1)
|
|
||||||
- thr_keydelete(nc_key);
|
|
||||||
+ pthread_key_delete(nc_key);
|
|
||||||
if (rce_key != -1)
|
|
||||||
- thr_keydelete(rce_key);
|
|
||||||
+ pthread_key_delete(rce_key);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/svc_auth_des.c b/src/svc_auth_des.c
|
|
||||||
index 479334f..e0ff6cb 100644
|
|
||||||
--- a/src/svc_auth_des.c
|
|
||||||
+++ b/src/svc_auth_des.c
|
|
||||||
@@ -60,7 +60,9 @@
|
|
||||||
#include <rpc/svc.h>
|
|
||||||
#include <rpc/rpc_msg.h>
|
|
||||||
#include <rpc/svc_auth.h>
|
|
||||||
+#if defined(__FreeBSD__) || defined(__NetBSD__)
|
|
||||||
#include <libc_private.h>
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
extern int key_decryptsession_pk(const char *, netobj *, des_block *);
|
|
||||||
|
|
||||||
diff --git a/src/xdr_reference.c b/src/xdr_reference.c
|
|
||||||
index 821dc8e..1da2c14 100644
|
|
||||||
--- a/src/xdr_reference.c
|
|
||||||
+++ b/src/xdr_reference.c
|
|
||||||
@@ -46,7 +46,10 @@
|
|
||||||
|
|
||||||
#include <rpc/types.h>
|
|
||||||
#include <rpc/xdr.h>
|
|
||||||
-#include "libc_private.h"
|
|
||||||
+
|
|
||||||
+#if defined(__FreeBSD__) || defined(__NetBSD__)
|
|
||||||
+#include <libc_private.h>
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* XDR an indirect pointer
|
|
||||||
diff --git a/tirpc/libc_private.h b/tirpc/libc_private.h
|
|
||||||
index 63f8610..e69de29 100644
|
|
||||||
--- a/tirpc/libc_private.h
|
|
||||||
+++ b/tirpc/libc_private.h
|
|
||||||
@@ -1,129 +0,0 @@
|
|
||||||
-/*
|
|
||||||
- * Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>.
|
|
||||||
- * All rights reserved.
|
|
||||||
- *
|
|
||||||
- * Redistribution and use in source and binary forms, with or without
|
|
||||||
- * modification, are permitted provided that the following conditions
|
|
||||||
- * are met:
|
|
||||||
- * 1. Redistributions of source code must retain the above copyright
|
|
||||||
- * notice, this list of conditions and the following disclaimer.
|
|
||||||
- * 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
- * notice, this list of conditions and the following disclaimer in the
|
|
||||||
- * documentation and/or other materials provided with the distribution.
|
|
||||||
- * 3. All advertising materials mentioning features or use of this software
|
|
||||||
- * must display the following acknowledgement:
|
|
||||||
- * This product includes software developed by John Birrell.
|
|
||||||
- * 4. Neither the name of the author nor the names of any co-contributors
|
|
||||||
- * may be used to endorse or promote products derived from this software
|
|
||||||
- * without specific prior written permission.
|
|
||||||
- *
|
|
||||||
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
|
|
||||||
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
||||||
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
||||||
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
||||||
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
||||||
- * SUCH DAMAGE.
|
|
||||||
- *
|
|
||||||
- * $FreeBSD: src/lib/libc/include/libc_private.h,v 1.11 2003/11/05 18:17:30 deischen Exp $
|
|
||||||
- *
|
|
||||||
- * Private definitions for libc, libc_r and libpthread.
|
|
||||||
- *
|
|
||||||
- */
|
|
||||||
-
|
|
||||||
-#ifndef _LIBC_PRIVATE_H_
|
|
||||||
-#define _LIBC_PRIVATE_H_
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * This global flag is non-zero when a process has created one
|
|
||||||
- * or more threads. It is used to avoid calling locking functions
|
|
||||||
- * when they are not required.
|
|
||||||
- */
|
|
||||||
-extern int __isthreaded;
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * File lock contention is difficult to diagnose without knowing
|
|
||||||
- * where locks were set. Allow a debug library to be built which
|
|
||||||
- * records the source file and line number of each lock call.
|
|
||||||
- */
|
|
||||||
-#ifdef _FLOCK_DEBUG
|
|
||||||
-#define _FLOCKFILE(x) _flockfile_debug(x, __FILE__, __LINE__)
|
|
||||||
-#else
|
|
||||||
-#define _FLOCKFILE(x) _flockfile(x)
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * Macros for locking and unlocking FILEs. These test if the
|
|
||||||
- * process is threaded to avoid locking when not required.
|
|
||||||
- */
|
|
||||||
-#define FLOCKFILE(fp) if (__isthreaded) _FLOCKFILE(fp)
|
|
||||||
-#define FUNLOCKFILE(fp) if (__isthreaded) _funlockfile(fp)
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * Indexes into the pthread jump table.
|
|
||||||
- *
|
|
||||||
- * Warning! If you change this type, you must also change the threads
|
|
||||||
- * libraries that reference it (libc_r, libpthread).
|
|
||||||
- */
|
|
||||||
-typedef enum {
|
|
||||||
- PJT_COND_BROADCAST,
|
|
||||||
- PJT_COND_DESTROY,
|
|
||||||
- PJT_COND_INIT,
|
|
||||||
- PJT_COND_SIGNAL,
|
|
||||||
- PJT_COND_WAIT,
|
|
||||||
- PJT_GETSPECIFIC,
|
|
||||||
- PJT_KEY_CREATE,
|
|
||||||
- PJT_KEY_DELETE,
|
|
||||||
- PJT_MAIN_NP,
|
|
||||||
- PJT_MUTEX_DESTROY,
|
|
||||||
- PJT_MUTEX_INIT,
|
|
||||||
- PJT_MUTEX_LOCK,
|
|
||||||
- PJT_MUTEX_TRYLOCK,
|
|
||||||
- PJT_MUTEX_UNLOCK,
|
|
||||||
- PJT_MUTEXATTR_DESTROY,
|
|
||||||
- PJT_MUTEXATTR_INIT,
|
|
||||||
- PJT_MUTEXATTR_SETTYPE,
|
|
||||||
- PJT_ONCE,
|
|
||||||
- PJT_RWLOCK_DESTROY,
|
|
||||||
- PJT_RWLOCK_INIT,
|
|
||||||
- PJT_RWLOCK_RDLOCK,
|
|
||||||
- PJT_RWLOCK_TRYRDLOCK,
|
|
||||||
- PJT_RWLOCK_TRYWRLOCK,
|
|
||||||
- PJT_RWLOCK_UNLOCK,
|
|
||||||
- PJT_RWLOCK_WRLOCK,
|
|
||||||
- PJT_SELF,
|
|
||||||
- PJT_SETSPECIFIC,
|
|
||||||
- PJT_SIGMASK,
|
|
||||||
- PJT_MAX
|
|
||||||
-} pjt_index_t;
|
|
||||||
-
|
|
||||||
-typedef int (*pthread_func_t)(void);
|
|
||||||
-typedef pthread_func_t pthread_func_entry_t[2];
|
|
||||||
-
|
|
||||||
-extern pthread_func_entry_t __thr_jtable[];
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * yplib internal interfaces
|
|
||||||
- */
|
|
||||||
-#ifdef YP
|
|
||||||
-int _yp_check(char **);
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * This is a pointer in the C run-time startup code. It is used
|
|
||||||
- * by getprogname() and setprogname().
|
|
||||||
- */
|
|
||||||
-extern const char *__progname;
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * This is the lock to make malloc() thread-safe. It is externalized
|
|
||||||
- * so that thread libraries can protect malloc across fork().
|
|
||||||
- */
|
|
||||||
-extern struct _spinlock *__malloc_lock;
|
|
||||||
-
|
|
||||||
-#endif /* _LIBC_PRIVATE_H_ */
|
|
||||||
diff --git a/tirpc/nss_tls.h b/tirpc/nss_tls.h
|
|
||||||
index 7536736..e69de29 100644
|
|
||||||
--- a/tirpc/nss_tls.h
|
|
||||||
+++ b/tirpc/nss_tls.h
|
|
||||||
@@ -1,80 +0,0 @@
|
|
||||||
-/*-
|
|
||||||
- * Copyright (c) 2003 Networks Associates Technology, Inc.
|
|
||||||
- * All rights reserved.
|
|
||||||
- *
|
|
||||||
- * This software was developed for the FreeBSD Project by
|
|
||||||
- * Jacques A. Vidrine, Safeport Network Services, and Network
|
|
||||||
- * Associates Laboratories, the Security Research Division of Network
|
|
||||||
- * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
|
|
||||||
- * ("CBOSS"), as part of the DARPA CHATS research program.
|
|
||||||
- *
|
|
||||||
- * Redistribution and use in source and binary forms, with or without
|
|
||||||
- * modification, are permitted provided that the following conditions
|
|
||||||
- * are met:
|
|
||||||
- * 1. Redistributions of source code must retain the above copyright
|
|
||||||
- * notice, this list of conditions and the following disclaimer.
|
|
||||||
- * 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
- * notice, this list of conditions and the following disclaimer in the
|
|
||||||
- * documentation and/or other materials provided with the distribution.
|
|
||||||
- *
|
|
||||||
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
||||||
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
||||||
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
||||||
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
||||||
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
||||||
- * SUCH DAMAGE.
|
|
||||||
- *
|
|
||||||
- * $FreeBSD: src/lib/libc/include/nss_tls.h,v 1.2 2003/04/21 15:44:25 nectar Exp $
|
|
||||||
- *
|
|
||||||
- * Macros which generate thread local storage handling code in NSS modules.
|
|
||||||
- */
|
|
||||||
-#ifndef _NSS_TLS_H_
|
|
||||||
-#define _NSS_TLS_H_
|
|
||||||
-
|
|
||||||
-#define NSS_TLS_HANDLING(name) \
|
|
||||||
-static pthread_key_t name##_state_key; \
|
|
||||||
-static void name##_keyinit(void); \
|
|
||||||
-static int name##_getstate(struct name##_state **); \
|
|
||||||
-\
|
|
||||||
-static void \
|
|
||||||
-name##_keyinit(void) \
|
|
||||||
-{ \
|
|
||||||
- (void)_pthread_key_create(&name##_state_key, name##_endstate); \
|
|
||||||
-} \
|
|
||||||
-\
|
|
||||||
-static int \
|
|
||||||
-name##_getstate(struct name##_state **p) \
|
|
||||||
-{ \
|
|
||||||
- static struct name##_state st; \
|
|
||||||
- static pthread_once_t keyinit = PTHREAD_ONCE_INIT; \
|
|
||||||
- int rv; \
|
|
||||||
- \
|
|
||||||
- if (!__isthreaded || _pthread_main_np() != 0) { \
|
|
||||||
- *p = &st; \
|
|
||||||
- return (0); \
|
|
||||||
- } \
|
|
||||||
- rv = _pthread_once(&keyinit, name##_keyinit); \
|
|
||||||
- if (rv != 0) \
|
|
||||||
- return (rv); \
|
|
||||||
- *p = _pthread_getspecific(name##_state_key); \
|
|
||||||
- if (*p != NULL) \
|
|
||||||
- return (0); \
|
|
||||||
- *p = calloc(1, sizeof(**p)); \
|
|
||||||
- if (*p == NULL) \
|
|
||||||
- return (ENOMEM); \
|
|
||||||
- rv = _pthread_setspecific(name##_state_key, *p); \
|
|
||||||
- if (rv != 0) { \
|
|
||||||
- free(*p); \
|
|
||||||
- *p = NULL; \
|
|
||||||
- } \
|
|
||||||
- return (rv); \
|
|
||||||
-} \
|
|
||||||
-/* allow the macro invocation to end with a semicolon */ \
|
|
||||||
-typedef int _##name##_bmVjdGFy
|
|
||||||
-
|
|
||||||
-#endif /* _NSS_TLS_H_ */
|
|
||||||
diff --git a/tirpc/reentrant.h b/tirpc/reentrant.h
|
|
||||||
index fda8f65..9489b15 100644
|
|
||||||
--- a/tirpc/reentrant.h
|
|
||||||
+++ b/tirpc/reentrant.h
|
|
||||||
@@ -13,13 +13,6 @@
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
- * 3. All advertising materials mentioning features or use of this software
|
|
||||||
- * must display the following acknowledgement:
|
|
||||||
- * This product includes software developed by the NetBSD
|
|
||||||
- * Foundation, Inc. and its contributors.
|
|
||||||
- * 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
||||||
- * contributors may be used to endorse or promote products derived
|
|
||||||
- * from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
||||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
||||||
@@ -33,95 +26,51 @@
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
- * $FreeBSD: src/lib/libc/include/reentrant.h,v 1.2 2002/11/01 09:37:17 dfr Exp $
|
|
||||||
*/
|
|
||||||
|
|
||||||
-/*
|
|
||||||
- * Requirements:
|
|
||||||
- *
|
|
||||||
- * 1. The thread safe mechanism should be lightweight so the library can
|
|
||||||
- * be used by non-threaded applications without unreasonable overhead.
|
|
||||||
- *
|
|
||||||
- * 2. There should be no dependency on a thread engine for non-threaded
|
|
||||||
- * applications.
|
|
||||||
- *
|
|
||||||
- * 3. There should be no dependency on any particular thread engine.
|
|
||||||
- *
|
|
||||||
- * 4. The library should be able to be compiled without support for thread
|
|
||||||
- * safety.
|
|
||||||
- *
|
|
||||||
- *
|
|
||||||
- * Rationale:
|
|
||||||
- *
|
|
||||||
- * One approach for thread safety is to provide discrete versions of the
|
|
||||||
- * library: one thread safe, the other not. The disadvantage of this is
|
|
||||||
- * that libc is rather large, and two copies of a library which are 99%+
|
|
||||||
- * identical is not an efficent use of resources.
|
|
||||||
- *
|
|
||||||
- * Another approach is to provide a single thread safe library. However,
|
|
||||||
- * it should not add significant run time or code size overhead to non-
|
|
||||||
- * threaded applications.
|
|
||||||
- *
|
|
||||||
- * Since the NetBSD C library is used in other projects, it should be
|
|
||||||
- * easy to replace the mutual exclusion primitives with ones provided by
|
|
||||||
- * another system. Similarly, it should also be easy to remove all
|
|
||||||
- * support for thread safety completely if the target environment does
|
|
||||||
- * not support threads.
|
|
||||||
- *
|
|
||||||
- *
|
|
||||||
- * Implementation Details:
|
|
||||||
- *
|
|
||||||
- * The mutex primitives used by the library (mutex_t, mutex_lock, etc.)
|
|
||||||
- * are macros which expand to the cooresponding primitives provided by
|
|
||||||
- * the thread engine or to nothing. The latter is used so that code is
|
|
||||||
- * not unreasonably cluttered with #ifdefs when all thread safe support
|
|
||||||
- * is removed.
|
|
||||||
- *
|
|
||||||
- * The mutex macros can be directly mapped to the mutex primitives from
|
|
||||||
- * pthreads, however it should be reasonably easy to wrap another mutex
|
|
||||||
- * implementation so it presents a similar interface.
|
|
||||||
- *
|
|
||||||
- * Stub implementations of the mutex functions are provided with *weak*
|
|
||||||
- * linkage. These functions simply return success. When linked with a
|
|
||||||
- * thread library (i.e. -lpthread), the functions will override the
|
|
||||||
- * stubs.
|
|
||||||
+/*
|
|
||||||
+ * This file was derived from a copy in FreeBSD CVS on August 26, 2010.
|
|
||||||
+ * FreeBSD/NetBSD have slightly different definitions for some/most of
|
|
||||||
+ * these functions and types, so they should just use the ones found
|
|
||||||
+ * in their system copy of reentrant.h.
|
|
||||||
+ * These definitions are only guaranteed to be valid on Linux.
|
|
||||||
*/
|
|
||||||
-#ifndef _REENTRANT_H
|
|
||||||
-#define _REENTRANT_H
|
|
||||||
-#include <pthread.h>
|
|
||||||
-#include <libc_private.h>
|
|
||||||
|
|
||||||
-#include <stdlib.h>
|
|
||||||
+#if defined(__linux__)
|
|
||||||
+
|
|
||||||
+#include <pthread.h>
|
|
||||||
|
|
||||||
#define mutex_t pthread_mutex_t
|
|
||||||
#define cond_t pthread_cond_t
|
|
||||||
#define rwlock_t pthread_rwlock_t
|
|
||||||
+#define once_t pthread_once_t
|
|
||||||
|
|
||||||
#define thread_key_t pthread_key_t
|
|
||||||
#define MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
|
||||||
#define RWLOCK_INITIALIZER PTHREAD_RWLOCK_INITIALIZER
|
|
||||||
+#define ONCE_INITIALIZER PTHREAD_ONCE_INIT
|
|
||||||
+
|
|
||||||
#define mutex_init(m, a) pthread_mutex_init(m, a)
|
|
||||||
#define mutex_lock(m) pthread_mutex_lock(m)
|
|
||||||
#define mutex_unlock(m) pthread_mutex_unlock(m)
|
|
||||||
-#define mutex_trylock(m) pthread_mutex_trylock(m)
|
|
||||||
|
|
||||||
-#define cond_init(c, a, p) pthread_cond_init(c, a)
|
|
||||||
-#define cond_signal(m) pthread_cond_signal(m)
|
|
||||||
-#define cond_broadcast(m) pthread_cond_broadcast(m)
|
|
||||||
-#define cond_wait(c, m) pthread_cond_wait(c, m)
|
|
||||||
+#define cond_init(c, a, p) pthread_cond_init(c, a)
|
|
||||||
+#define cond_signal(m) pthread_cond_signal(m)
|
|
||||||
+#define cond_broadcast(m) pthread_cond_broadcast(m)
|
|
||||||
+#define cond_wait(c, m) pthread_cond_wait(c, m)
|
|
||||||
|
|
||||||
-#define rwlock_init(l, a) pthread_rwlock_init(l, a)
|
|
||||||
-#define rwlock_rdlock(l) pthread_rwlock_rdlock(l)
|
|
||||||
-#define rwlock_wrlock(l) pthread_rwlock_wrlock(l)
|
|
||||||
-#define rwlock_unlock(l) pthread_rwlock_unlock(l)
|
|
||||||
+#define rwlock_init(l, a) pthread_rwlock_init(l, a)
|
|
||||||
+#define rwlock_rdlock(l) pthread_rwlock_rdlock(l)
|
|
||||||
+#define rwlock_wrlock(l) pthread_rwlock_wrlock(l)
|
|
||||||
+#define rwlock_unlock(l) pthread_rwlock_unlock(l)
|
|
||||||
|
|
||||||
-#define thr_keycreate(k, d) pthread_key_create(k, d)
|
|
||||||
-#define thr_keydelete(k) pthread_key_delete(k)
|
|
||||||
-#define thr_setspecific(k, p) pthread_setspecific(k, p)
|
|
||||||
-#define thr_getspecific(k) pthread_getspecific(k)
|
|
||||||
-#define thr_sigsetmask(f, n, o) pthread_sigmask(f, n, o)
|
|
||||||
+#define thr_keycreate(k, d) pthread_key_create(k, d)
|
|
||||||
+#define thr_setspecific(k, p) pthread_setspecific(k, p)
|
|
||||||
+#define thr_getspecific(k) pthread_getspecific(k)
|
|
||||||
+#define thr_sigsetmask(f, n, o) pthread_sigmask(f, n, o)
|
|
||||||
|
|
||||||
-#define thr_self() pthread_self()
|
|
||||||
-#define thr_exit(x) pthread_exit(x)
|
|
||||||
+#define thr_once(o, i) pthread_once(o, i)
|
|
||||||
+#define thr_self() pthread_self()
|
|
||||||
+#define thr_exit(x) pthread_exit(x)
|
|
||||||
|
|
||||||
-#endif /* reentrant.h */
|
|
||||||
+#endif
|
|
||||||
diff --git a/tirpc/spinlock.h b/tirpc/spinlock.h
|
|
||||||
index 8e9adb1..393fb83 100644
|
|
||||||
--- a/tirpc/spinlock.h
|
|
||||||
+++ b/tirpc/spinlock.h
|
|
||||||
@@ -37,37 +37,5 @@
|
|
||||||
|
|
||||||
#ifndef _SPINLOCK_H_
|
|
||||||
#define _SPINLOCK_H_
|
|
||||||
-#include <sys/cdefs.h>
|
|
||||||
-#include <sys/types.h>
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * Lock structure with room for debugging information.
|
|
||||||
- */
|
|
||||||
-struct _spinlock {
|
|
||||||
- volatile long access_lock;
|
|
||||||
- volatile long lock_owner;
|
|
||||||
- volatile char *fname;
|
|
||||||
- volatile int lineno;
|
|
||||||
-};
|
|
||||||
-typedef struct _spinlock spinlock_t;
|
|
||||||
-
|
|
||||||
-#define _SPINLOCK_INITIALIZER { 0, 0, 0, 0 }
|
|
||||||
-
|
|
||||||
-#define _SPINUNLOCK(_lck) _spinunlock(_lck);
|
|
||||||
-#ifdef _LOCK_DEBUG
|
|
||||||
-#define _SPINLOCK(_lck) _spinlock_debug(_lck, __FILE__, __LINE__)
|
|
||||||
-#else
|
|
||||||
-#define _SPINLOCK(_lck) _spinlock(_lck)
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * Thread function prototype definitions:
|
|
||||||
- */
|
|
||||||
-__BEGIN_DECLS
|
|
||||||
-long _atomic_lock(volatile long *);
|
|
||||||
-void _spinlock(spinlock_t *);
|
|
||||||
-void _spinunlock(spinlock_t *);
|
|
||||||
-void _spinlock_debug(spinlock_t *, char *, int);
|
|
||||||
-__END_DECLS
|
|
||||||
|
|
||||||
#endif /* _SPINLOCK_H_ */
|
|
@ -1,76 +0,0 @@
|
|||||||
commit ea26246defdf9aace0dedca1a5cc9104ba1d3936
|
|
||||||
Author: Tom "spot" Callaway <tcallawa@redhat.com>
|
|
||||||
Date: Fri Jul 16 16:09:14 2010 -0400
|
|
||||||
|
|
||||||
Add back SISSL license attribution.
|
|
||||||
|
|
||||||
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
||||||
|
|
||||||
diff --git a/src/clnt_generic.c b/src/clnt_generic.c
|
|
||||||
index f1dcfa2..9c31680 100644
|
|
||||||
--- a/src/clnt_generic.c
|
|
||||||
+++ b/src/clnt_generic.c
|
|
||||||
@@ -1,4 +1,17 @@
|
|
||||||
/*
|
|
||||||
+ * The contents of this file are subject to the Sun Standards
|
|
||||||
+ * License Version 1.0 the (the "License";) You may not use
|
|
||||||
+ * this file except in compliance with the License. You may
|
|
||||||
+ * obtain a copy of the License at lib/libc/rpc/LICENSE
|
|
||||||
+ *
|
|
||||||
+ * Software distributed under the License is distributed on
|
|
||||||
+ * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
|
|
||||||
+ * express or implied. See the License for the specific
|
|
||||||
+ * language governing rights and limitations under the License.
|
|
||||||
+ *
|
|
||||||
+ * In addition, this file contains code from Sun RPC which is
|
|
||||||
+ * subject to the below terms:
|
|
||||||
+ *
|
|
||||||
* Copyright (c) 2009, Sun Microsystems, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
diff --git a/src/rpcb_clnt.c b/src/rpcb_clnt.c
|
|
||||||
index 218ff7c..a800128 100644
|
|
||||||
--- a/src/rpcb_clnt.c
|
|
||||||
+++ b/src/rpcb_clnt.c
|
|
||||||
@@ -1,4 +1,17 @@
|
|
||||||
/*
|
|
||||||
+ * The contents of this file are subject to the Sun Standards
|
|
||||||
+ * License Version 1.0 the (the "License";) You may not use
|
|
||||||
+ * this file except in compliance with the License. You may
|
|
||||||
+ * obtain a copy of the License at lib/libc/rpc/LICENSE
|
|
||||||
+ *
|
|
||||||
+ * Software distributed under the License is distributed on
|
|
||||||
+ * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
|
|
||||||
+ * express or implied. See the License for the specific
|
|
||||||
+ * language governing rights and limitations under the License.
|
|
||||||
+ *
|
|
||||||
+ * In addition, this file contains code from Sun RPC which is
|
|
||||||
+ * subject to the below terms:
|
|
||||||
+ *
|
|
||||||
* Copyright (c) 2009, Sun Microsystems, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
diff --git a/tirpc/rpc/clnt.h b/tirpc/rpc/clnt.h
|
|
||||||
index e7bb43f..6d2f7dd 100644
|
|
||||||
--- a/tirpc/rpc/clnt.h
|
|
||||||
+++ b/tirpc/rpc/clnt.h
|
|
||||||
@@ -1,6 +1,19 @@
|
|
||||||
/* $NetBSD: clnt.h,v 1.14 2000/06/02 22:57:55 fvdl Exp $ */
|
|
||||||
|
|
||||||
/*
|
|
||||||
+ * The contents of this file are subject to the Sun Standards
|
|
||||||
+ * License Version 1.0 the (the "License";) You may not use
|
|
||||||
+ * this file except in compliance with the License. You may
|
|
||||||
+ * obtain a copy of the License at lib/libc/rpc/LICENSE
|
|
||||||
+ *
|
|
||||||
+ * Software distributed under the License is distributed on
|
|
||||||
+ * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
|
|
||||||
+ * express or implied. See the License for the specific
|
|
||||||
+ * language governing rights and limitations under the License.
|
|
||||||
+ *
|
|
||||||
+ * In addition, this file contains code from Sun RPC which is
|
|
||||||
+ * subject to the below terms:
|
|
||||||
+ *
|
|
||||||
* Copyright (c) 2009, Sun Microsystems, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
@ -1,493 +0,0 @@
|
|||||||
commit 4f4ada08b780c27398b0749b7965fd248a7f3b99
|
|
||||||
Author: Tom 'spot' Callaway <tcallawa@redhat.com>
|
|
||||||
Date: Mon Aug 30 14:35:10 2010 -0400
|
|
||||||
|
|
||||||
Relicense these SISSL files to 3 clause BSD
|
|
||||||
|
|
||||||
This is a patch which takes out the SISSL license entries and
|
|
||||||
replaces them with 3-clause BSD, as specified by Oracle America, Inc.
|
|
||||||
|
|
||||||
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
||||||
|
|
||||||
diff --git a/COPYING b/COPYING
|
|
||||||
index 8b548d6..8e99af8 100644
|
|
||||||
--- a/COPYING
|
|
||||||
+++ b/COPYING
|
|
||||||
@@ -1,338 +1,4 @@
|
|
||||||
-Sun Industry Standards Source License 1.0
|
|
||||||
-
|
|
||||||
-DEFINITIONS
|
|
||||||
-
|
|
||||||
-1.1. "Commercial Use" means distribution or otherwise
|
|
||||||
-making the Original Code available to a third party.
|
|
||||||
-
|
|
||||||
-1.2. "Contributor Version" means the combination of the
|
|
||||||
-Original Code, and the Modifications made by that particular
|
|
||||||
-Contributor.
|
|
||||||
-
|
|
||||||
-1.3. "Electronic Distribution Mechanism" means a mechanism
|
|
||||||
-generally accepted in the software development community for
|
|
||||||
-the electronic transfer of data.
|
|
||||||
-
|
|
||||||
-1.4. "Executable" means Original Code in any form other
|
|
||||||
-than Source Code.
|
|
||||||
-
|
|
||||||
-1.5. "Initial Developer" means the individual or entity
|
|
||||||
-identified as the Initial Developer in the Source Code
|
|
||||||
-notice required by 2 (Exhibit A)
|
|
||||||
-
|
|
||||||
-1.6. "Larger Work" means a work which combines Original
|
|
||||||
-Code or portions thereof with code not governed by the terms
|
|
||||||
-of this License.
|
|
||||||
-
|
|
||||||
-1.7. "License" means this document.
|
|
||||||
-
|
|
||||||
-1.8. "Licensable" means having the right to grant, to the
|
|
||||||
-maximum extent possible, whether at the time of the initial
|
|
||||||
-grant or subsequently acquired, any and all of the rights
|
|
||||||
-conveyed herein.
|
|
||||||
-
|
|
||||||
-1.9. "Modifications" means any addition to or deletion from
|
|
||||||
-the substance or structure of either the Original Code or
|
|
||||||
-any previous Modifications. A Modification is:
|
|
||||||
-
|
|
||||||
-A. Any addition to or deletion from the contents of a file
|
|
||||||
-containing Original Code or previous Modifications.
|
|
||||||
-
|
|
||||||
-B. Any new file that contains any part of the Original Code
|
|
||||||
-or previous Modifications. .
|
|
||||||
-
|
|
||||||
-1.10. "Original Code" means Source Code of computer
|
|
||||||
-software code which is described in the Source Code notice
|
|
||||||
-required by Exhibit A as Original Code.
|
|
||||||
-
|
|
||||||
-1.11. "Patent Claims" means any patent claims, now owned or
|
|
||||||
-hereafter acquired, including without limitation, method,
|
|
||||||
-process, and apparatus claims, in any patent Licensable by
|
|
||||||
-grantor.
|
|
||||||
-
|
|
||||||
-1.12. "Source Code" means the preferred form of the
|
|
||||||
-Original Code for making modifications to it, including all
|
|
||||||
-modules it contains, plus any associated interface
|
|
||||||
-definition files, or scripts used to control compilation and
|
|
||||||
-installation of an Executable.
|
|
||||||
-
|
|
||||||
-1.13. "Standards" means the standard identified in Exhibit
|
|
||||||
-B or a subsequent version of such standard.
|
|
||||||
-
|
|
||||||
-1.14. "You" or "Your" means an individual or a legal entity
|
|
||||||
-exercising rights under, and complying with all of the terms
|
|
||||||
-of, this License or a future version of this License issued
|
|
||||||
-under Section 6.1. For legal entities, "You" includes any
|
|
||||||
-entity which controls, is controlled by, or is under common
|
|
||||||
-control with You. For purposes of this definition,
|
|
||||||
-"control" means (a) the power, direct or indirect, to cause
|
|
||||||
-the direction or management of such entity, whether by
|
|
||||||
-contract or otherwise, or (b) ownership of more than fifty
|
|
||||||
-percent (50%) of the outstanding shares or beneficial
|
|
||||||
-ownership of such entity.
|
|
||||||
-
|
|
||||||
-2.0 SOURCE CODE LICENSE
|
|
||||||
-
|
|
||||||
-2.1 The Initial Developer Grant: The Initial Developer
|
|
||||||
-hereby grants You a world-wide, royalty-free, non-exclusive
|
|
||||||
-license, subject to third party intellectual property
|
|
||||||
-claims:
|
|
||||||
-
|
|
||||||
-a) under intellectual property rights (other than patent or
|
|
||||||
-trademark) Licensable by Initial Developer to use,
|
|
||||||
-reproduce, modify, display, perform, sub license and
|
|
||||||
-distribute the Original Code (or portions thereof )with or
|
|
||||||
-without Modifications, and/or as part of a Larger Work; and
|
|
||||||
-
|
|
||||||
-b) under Patents Claims infringed by the making, using or
|
|
||||||
-selling of Original Code, to make, have made, use, practice,
|
|
||||||
-sell, and offer for sale, and/or otherwise dispose of the
|
|
||||||
-Original Code (or portions thereof).
|
|
||||||
-
|
|
||||||
-c) the licenses granted in this Section 2.1(a ) and (b) are
|
|
||||||
-effective on the date Initial Developer first distributes
|
|
||||||
-Original Code under the terms of this License.
|
|
||||||
-
|
|
||||||
-d) Notwithstanding Section 2.1(b )above, no patent license
|
|
||||||
-is granted: 1) for code that You delete from the Original
|
|
||||||
-Code; 2) separate from the Original Code; or 3) for
|
|
||||||
-infringements caused by: i) the modification of the
|
|
||||||
-Original Code or
|
|
||||||
-
|
|
||||||
-ii) the combination of the Original Code with other software
|
|
||||||
-or devices, including but not limited to Modifications.
|
|
||||||
-
|
|
||||||
-3.0 DISTRIBUTION OBLIGATIONS
|
|
||||||
-
|
|
||||||
-3.1 Application of License. The Source Code version of
|
|
||||||
-Original Code may be distributed only under the terms of
|
|
||||||
-this License or a future version of this License released
|
|
||||||
-under Section 6.1, and You must include a copy of this
|
|
||||||
-License with every copy of the Source Code You distribute.
|
|
||||||
-You may not offer or impose any terms on any Source Code
|
|
||||||
-version that alters or restricts the applicable version of
|
|
||||||
-this License or the recipient's rights hereunder. Your
|
|
||||||
-license for shipment of the Contributor Version is
|
|
||||||
-conditioned upon your full compliance with this Section.
|
|
||||||
-The Modifications which you create must comply with all
|
|
||||||
-requirements set out by the Standards body in effect 120
|
|
||||||
-days before You ship the Contributor Version. In the event
|
|
||||||
-that the Modifications do not meet such requirements, You
|
|
||||||
-agree to publish (i) any deviation from the Standards
|
|
||||||
-protocol resulting from implementation of your Modifications
|
|
||||||
-and (ii) a reference implementation of Your Modifications,
|
|
||||||
-and to make any such deviation and reference implementation
|
|
||||||
-available to all third parties under the same terms as the
|
|
||||||
-license on a royalty free basis within thirty (30) days of
|
|
||||||
-Your first customer shipment of Your Modifications.
|
|
||||||
-
|
|
||||||
-3.2 Required Notices. You must duplicate the notice in
|
|
||||||
-Exhibit A in each file of the Source Code. If it is not
|
|
||||||
-possible to put such notice in a particular Source Code file
|
|
||||||
-due to its structure, then You must include such notice in a
|
|
||||||
-location (such as a relevant directory ) where a user would
|
|
||||||
-be likely to look for such a notice. If You created one or
|
|
||||||
-more Modifications ) You may add your name as a Contributor
|
|
||||||
-to the notice described in Exhibit A. You must also
|
|
||||||
-duplicate this License in any documentation for the Source
|
|
||||||
-Code where You describe recipients' rights or ownership
|
|
||||||
-rights relating to Initial Code. You may choose to offer,
|
|
||||||
-and to charge a fee for, warranty, support, indemnity or
|
|
||||||
-liability obligations to one or more recipients of Your
|
|
||||||
-version of the Code. However, You may do so only
|
|
||||||
-
|
|
||||||
-on Your own behalf, and not on behalf of the Initial
|
|
||||||
-Developer. You must make it absolutely clear than any such
|
|
||||||
-warranty, support, indemnity or liability obligation is
|
|
||||||
-offered by You alone, and You hereby agree to indemnify the
|
|
||||||
-Initial Developer for any liability incurred by the Initial
|
|
||||||
-Developer as a result of warranty, support, indemnity or
|
|
||||||
-liability terms You offer.
|
|
||||||
-
|
|
||||||
-3.3 Distribution of Executable Versions. You may distribute
|
|
||||||
-Original Code in Executable and Source form only if the
|
|
||||||
-requirements of Section 3.1 and 3.2 have been met for that
|
|
||||||
-Original Code, and if You include a notice stating that the
|
|
||||||
-Source Code version of the Original Code is available under
|
|
||||||
-the terms of this License. The notice must be conspicuously
|
|
||||||
-included in any notice in an Executable or Source versions,
|
|
||||||
-related documentation or collateral in which You describe
|
|
||||||
-recipients' rights relating to the Original Code. You may
|
|
||||||
-distribute the Executable and Source versions of Your
|
|
||||||
-version of the Code or ownership rights under a license of
|
|
||||||
-Your choice, which may contain terms different from this
|
|
||||||
-License, provided that You are in compliance with the terms
|
|
||||||
-of this License. If You distribute the Executable and
|
|
||||||
-Source versions under a different license You must make it
|
|
||||||
-absolutely clear that any terms which differ from this
|
|
||||||
-License are offered by You alone, not by the Initial
|
|
||||||
-Developer . You hereby agree to indemnify the Initial
|
|
||||||
-Developer for any liability incurred by the Initial
|
|
||||||
-Developer as a result of any such terms You offer .
|
|
||||||
-
|
|
||||||
-3.4 Larger Works. You may create a Larger Work by combining
|
|
||||||
-Original Code with other code not governed by the terms of
|
|
||||||
-this License and distribute the Larger Work as a single
|
|
||||||
-product. In such a case, You must make sure the
|
|
||||||
-requirements of this License are fulfilled for the Original
|
|
||||||
-Code.
|
|
||||||
-
|
|
||||||
-4.0 INABILITY TO COMPLY DUE TO STATUTE OR REGULATION
|
|
||||||
-
|
|
||||||
-If it is impossible for You to comply with any of the terms
|
|
||||||
-of this License with respect to some or all of the Original
|
|
||||||
-Code due to statute, judicial order, or regulation then You
|
|
||||||
-must:
|
|
||||||
-
|
|
||||||
-a) comply with the terms of this License to the maximum
|
|
||||||
-extent possible; and
|
|
||||||
-
|
|
||||||
-b) describe the limitations and the code they affect. Such
|
|
||||||
-description must be included in the LEGAL file described in
|
|
||||||
-Section 3.2 and must be included with all distributions of
|
|
||||||
-the Source Code. Except to the extent prohibited by statute
|
|
||||||
-or regulation, such description must be sufficiently
|
|
||||||
-detailed for a recipient of ordinary skill to be able to
|
|
||||||
-understand it.
|
|
||||||
-
|
|
||||||
-5.0 APPLICATION OF THIS LICENSE This License applies to code
|
|
||||||
-to which the Initial Developer has attached the notice in
|
|
||||||
-Exhibit A and to related Modifications as set out in Section
|
|
||||||
-3.1.
|
|
||||||
-
|
|
||||||
-6.0 VERSIONS OF THE LICENSE
|
|
||||||
-
|
|
||||||
-6.1 New Versions. Sun Microsystems, Inc. Sun may publish
|
|
||||||
-revised and/or new versions of the License from time to
|
|
||||||
-time. Each version will be given a distinguishing version
|
|
||||||
-number .
|
|
||||||
-
|
|
||||||
-6.2 Effect of New Versions. Once Original Code has been
|
|
||||||
-published under a particular version of the License, You may
|
|
||||||
-always continue to use it under the terms of that version.
|
|
||||||
-You may also choose to use such Original Code under the
|
|
||||||
-terms of any subsequent version of the License published by
|
|
||||||
-Sun. No one other than Sun has the right to modify the
|
|
||||||
-terms applicable to Original Code.
|
|
||||||
-
|
|
||||||
-7. DISCLAIMER OF W ARRANTY. ORIGINAL CODE IS PROVIDED
|
|
||||||
-UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF
|
|
||||||
-ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
|
|
||||||
-LIMITATION, WARRANTIES THAT THE ORIGINAL CODE IS FREE OF
|
|
||||||
-DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR
|
|
||||||
-NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND
|
|
||||||
-PERFORMANCE OF THE ORIGINAL CODE IS WITH YOU. SHOULD ANY
|
|
||||||
-ORIGINAL CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
|
|
||||||
-INITIAL DEVELOPER )ASSUME THE COST OF ANY NECESSARY
|
|
||||||
-SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
|
|
||||||
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO
|
|
||||||
-USE OF ANY ORIGINAL CODE IS AUTHORIZED HEREUNDER EXCEPT
|
|
||||||
-UNDER THIS DISCLAIMER.
|
|
||||||
-
|
|
||||||
-8.0 TERMINATION
|
|
||||||
-
|
|
||||||
-8.1 This License and the rights granted hereunder will
|
|
||||||
-terminate automatically if You fail to comply with terms
|
|
||||||
-herein and fail to cure such breach within 30 days of
|
|
||||||
-becoming aware of the breach. All sublicenses to the
|
|
||||||
-Original Code which are properly granted shall survive any
|
|
||||||
-termination of this License. Provisions which, by their
|
|
||||||
-nature, must remain in effect beyond the termination of this
|
|
||||||
-License shall survive.
|
|
||||||
-
|
|
||||||
-8.2 .In the event of termination under Section 8.1 above,
|
|
||||||
-all end user license agreements (excluding distributors and
|
|
||||||
-resellers) which have been validly granted by You or any
|
|
||||||
-distributor hereunder prior to termination shall survive
|
|
||||||
-termination.
|
|
||||||
-
|
|
||||||
-9.0 LIMIT OF LIABILITY UNDER NO CIRCUMSTANCES AND UNDER NO
|
|
||||||
-LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE) ,CONTRACT,
|
|
||||||
-OR OTHER WISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER
|
|
||||||
-CONTRIBUTOR, OR ANY DISTRIBUTOR OF ORIGINAL CODE, OR ANY
|
|
||||||
-SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
|
|
||||||
-ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
||||||
-OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR
|
|
||||||
-LOSS OF GOOD WILL, WORK STOPPAGE, COMPUTER FAILURE OR
|
|
||||||
-MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR
|
|
||||||
-LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE
|
|
||||||
-POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY
|
|
||||||
-SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
|
|
||||||
-RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT
|
|
||||||
-APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME
|
|
||||||
-JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF
|
|
||||||
-INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND
|
|
||||||
-LIMITATION MAY NOT APPLY TO YOU.
|
|
||||||
-
|
|
||||||
-10.0 U .S. GOVERNMENT END USERS U.S. Government: If this
|
|
||||||
-Software is being acquired by or on behalf of the U.S.
|
|
||||||
-Government or by a U.S. Government prime contractor or
|
|
||||||
-subcontractor (at any tier), then the Government's rights in
|
|
||||||
-the Software and accompanying documentation shall be only as
|
|
||||||
-set forth in this license; this is in accordance with 48 C.F
|
|
||||||
-.R. 227.7201 through 227.7202-4 (for Department of Defense
|
|
||||||
-(DoD) acquisitions )and with 48 C.F.R.2.101 and 12.212( for
|
|
||||||
-non-DoD acquisitions).
|
|
||||||
-
|
|
||||||
-11.0 MISCELLANEOUS This License represents the complete
|
|
||||||
-agreement concerning subject matter hereof. If any
|
|
||||||
-provision of this License is held to be unenforceable, such
|
|
||||||
-provision shall be reformed only to the extent necessary to
|
|
||||||
-make it enforceable. This License shall be governed by
|
|
||||||
-California law provisions (except to the extent applicable
|
|
||||||
-law, if any, provides otherwise), excluding its
|
|
||||||
-conflict-of-law provisions. With respect to disputes in
|
|
||||||
-which at least one party is a citizen of, or an entity
|
|
||||||
-chartered or registered to do business in the United States
|
|
||||||
-of America, any litigation relating to this License shall be
|
|
||||||
-subject to the jurisdiction of the Federal Courts of the
|
|
||||||
-Northern District of California, with venue lying in Santa
|
|
||||||
-Clara County, California, with the losing party responsible
|
|
||||||
-for costs, including without limitation, court costs and
|
|
||||||
-reasonable attorneys fees and expenses. The application of
|
|
||||||
-the United Nations Convention on Contracts for the
|
|
||||||
-International Sale of Goods is expressly excluded. Any law
|
|
||||||
-or regulation which provides that the language of a contract
|
|
||||||
-shall be construed against the drafter shall not apply to
|
|
||||||
-this License.
|
|
||||||
-
|
|
||||||
-EXHIBIT A - Sun Standards
|
|
||||||
-
|
|
||||||
-"The contents of this file are subject to the Sun Standards
|
|
||||||
-License Version 1.0 the (the "License";) You may not use
|
|
||||||
-this file except in compliance with the License. You may
|
|
||||||
-obtain a copy of the License at
|
|
||||||
-_______________________________.
|
|
||||||
-
|
|
||||||
- Software distributed under the License is distributed on
|
|
||||||
-an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
|
|
||||||
-express or implied. See the License for the specific
|
|
||||||
-language governing rights and limitations under the License.
|
|
||||||
-
|
|
||||||
-The Original Code is Copyright 1998 by Sun Microsystems, Inc
|
|
||||||
-
|
|
||||||
-The Initial Developer of the Original Code is: Sun
|
|
||||||
-Microsystems, Inc.
|
|
||||||
-
|
|
||||||
-Portions created by _____________________________ are
|
|
||||||
-Copyright ______________________________.
|
|
||||||
-
|
|
||||||
-All Rights Reserved.
|
|
||||||
-
|
|
||||||
-Contributors: ______________________________________.
|
|
||||||
-
|
|
||||||
-EXHIBIT B - Sun Standards
|
|
||||||
-
|
|
||||||
-The Standard is defined as the following IETF RFCs:
|
|
||||||
-
|
|
||||||
-RFC1831: RPC: Remote Procedure Call Protocol Specification
|
|
||||||
-Version 2 RFC1832: XDR: External Data REpresentation
|
|
||||||
-Standard RFC1833: Binding Protocols for ONC RPC Version 2
|
|
||||||
-RFC2078: Generic Security Service Application Program
|
|
||||||
-Interface, Version 2 RFC2203: RPCSEC_GSS Protocol
|
|
||||||
-Specification RFC2695: Authentication Mechanisms for ONC RPC
|
|
||||||
-
|
|
||||||
-*
|
|
||||||
+/*
|
|
||||||
* Copyright (c) Copyright (c) Bull S.A. 2005 All Rights Reserved.
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
diff --git a/src/clnt_generic.c b/src/clnt_generic.c
|
|
||||||
index 9c31680..b9b07bc 100644
|
|
||||||
--- a/src/clnt_generic.c
|
|
||||||
+++ b/src/clnt_generic.c
|
|
||||||
@@ -1,18 +1,5 @@
|
|
||||||
/*
|
|
||||||
- * The contents of this file are subject to the Sun Standards
|
|
||||||
- * License Version 1.0 the (the "License";) You may not use
|
|
||||||
- * this file except in compliance with the License. You may
|
|
||||||
- * obtain a copy of the License at lib/libc/rpc/LICENSE
|
|
||||||
- *
|
|
||||||
- * Software distributed under the License is distributed on
|
|
||||||
- * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
|
|
||||||
- * express or implied. See the License for the specific
|
|
||||||
- * language governing rights and limitations under the License.
|
|
||||||
- *
|
|
||||||
- * In addition, this file contains code from Sun RPC which is
|
|
||||||
- * subject to the below terms:
|
|
||||||
- *
|
|
||||||
- * Copyright (c) 2009, Sun Microsystems, Inc.
|
|
||||||
+ * Copyright (c) 2010, Oracle America, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
@@ -22,7 +9,7 @@
|
|
||||||
* - Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
|
||||||
* and/or other materials provided with the distribution.
|
|
||||||
- * - Neither the name of Sun Microsystems, Inc. nor the names of its
|
|
||||||
+ * - Neither the name of the "Oracle America, Inc." nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
@@ -39,10 +26,6 @@
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
-/*
|
|
||||||
- * Copyright (c) 1986-1996,1998 by Sun Microsystems, Inc.
|
|
||||||
- * All rights reserved.
|
|
||||||
- */
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <reentrant.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
diff --git a/src/rpcb_clnt.c b/src/rpcb_clnt.c
|
|
||||||
index a800128..312967c 100644
|
|
||||||
--- a/src/rpcb_clnt.c
|
|
||||||
+++ b/src/rpcb_clnt.c
|
|
||||||
@@ -1,18 +1,5 @@
|
|
||||||
/*
|
|
||||||
- * The contents of this file are subject to the Sun Standards
|
|
||||||
- * License Version 1.0 the (the "License";) You may not use
|
|
||||||
- * this file except in compliance with the License. You may
|
|
||||||
- * obtain a copy of the License at lib/libc/rpc/LICENSE
|
|
||||||
- *
|
|
||||||
- * Software distributed under the License is distributed on
|
|
||||||
- * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
|
|
||||||
- * express or implied. See the License for the specific
|
|
||||||
- * language governing rights and limitations under the License.
|
|
||||||
- *
|
|
||||||
- * In addition, this file contains code from Sun RPC which is
|
|
||||||
- * subject to the below terms:
|
|
||||||
- *
|
|
||||||
- * Copyright (c) 2009, Sun Microsystems, Inc.
|
|
||||||
+ * Copyright (c) 2010, Oracle America, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
@@ -22,7 +9,7 @@
|
|
||||||
* - Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
|
||||||
* and/or other materials provided with the distribution.
|
|
||||||
- * - Neither the name of Sun Microsystems, Inc. nor the names of its
|
|
||||||
+ * - Neither the name of the "Oracle America, Inc." nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
@@ -38,15 +25,10 @@
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
-/*
|
|
||||||
- * Copyright (c) 1986-1991 by Sun Microsystems Inc.
|
|
||||||
- */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* rpcb_clnt.c
|
|
||||||
* interface to rpcbind rpc service.
|
|
||||||
- *
|
|
||||||
- * Copyright (C) 1988, Sun Microsystems, Inc.
|
|
||||||
*/
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <reentrant.h>
|
|
||||||
diff --git a/tirpc/rpc/clnt.h b/tirpc/rpc/clnt.h
|
|
||||||
index 6d2f7dd..9ee619e 100644
|
|
||||||
--- a/tirpc/rpc/clnt.h
|
|
||||||
+++ b/tirpc/rpc/clnt.h
|
|
||||||
@@ -1,20 +1,7 @@
|
|
||||||
/* $NetBSD: clnt.h,v 1.14 2000/06/02 22:57:55 fvdl Exp $ */
|
|
||||||
|
|
||||||
/*
|
|
||||||
- * The contents of this file are subject to the Sun Standards
|
|
||||||
- * License Version 1.0 the (the "License";) You may not use
|
|
||||||
- * this file except in compliance with the License. You may
|
|
||||||
- * obtain a copy of the License at lib/libc/rpc/LICENSE
|
|
||||||
- *
|
|
||||||
- * Software distributed under the License is distributed on
|
|
||||||
- * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
|
|
||||||
- * express or implied. See the License for the specific
|
|
||||||
- * language governing rights and limitations under the License.
|
|
||||||
- *
|
|
||||||
- * In addition, this file contains code from Sun RPC which is
|
|
||||||
- * subject to the below terms:
|
|
||||||
- *
|
|
||||||
- * Copyright (c) 2009, Sun Microsystems, Inc.
|
|
||||||
+ * Copyright (c) 2010, Oracle America, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
@@ -24,7 +11,7 @@
|
|
||||||
* - Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
|
||||||
* and/or other materials provided with the distribution.
|
|
||||||
- * - Neither the name of Sun Microsystems, Inc. nor the names of its
|
|
||||||
+ * - Neither the name of the "Oracle America, Inc." nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
@@ -47,9 +34,6 @@
|
|
||||||
|
|
||||||
/*
|
|
||||||
* clnt.h - Client side remote procedure call interface.
|
|
||||||
- *
|
|
||||||
- * Copyright (c) 1986-1991,1994-1999 by Sun Microsystems, Inc.
|
|
||||||
- * All rights reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _TIRPC_CLNT_H_
|
|
@ -1,19 +1,13 @@
|
|||||||
%define _root_libdir /%{_lib}
|
%define _root_libdir /%{_lib}
|
||||||
|
|
||||||
Name: libtirpc
|
Name: libtirpc
|
||||||
Version: 0.2.1
|
Version: 0.2.2
|
||||||
Release: 7.1%{?dist}
|
Release: 0%{?dist}
|
||||||
Summary: Transport Independent RPC Library
|
Summary: Transport Independent RPC Library
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
License: SISSL and BSD
|
License: SISSL and BSD
|
||||||
URL: http://nfsv4.bullopensource.org/
|
URL: http://nfsv4.bullopensource.org/
|
||||||
|
|
||||||
Patch001: libtirpc-0-2-2-rc2.patch
|
|
||||||
|
|
||||||
Patch100: libtirpc-0.2.1-SISSL-license.patch
|
|
||||||
Patch101: libtirpc-0.2.1-replace-SISSL-with-BSD.patch
|
|
||||||
Patch102: libtirpc-0.2.1-BSD-license.patch
|
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Source0: http://downloads.sourceforge.net/libtirpc/libtirpc-%{version}.tar.bz2
|
Source0: http://downloads.sourceforge.net/libtirpc/libtirpc-%{version}.tar.bz2
|
||||||
|
|
||||||
@ -46,12 +40,6 @@ developing programs which use the tirpc library.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%patch001 -p1
|
|
||||||
|
|
||||||
%patch100 -p1
|
|
||||||
%patch101 -p1
|
|
||||||
%patch102 -p1
|
|
||||||
|
|
||||||
# Remove .orig files
|
# Remove .orig files
|
||||||
find . -name "*.orig" | xargs rm -f
|
find . -name "*.orig" | xargs rm -f
|
||||||
|
|
||||||
@ -139,6 +127,9 @@ rm -rf %{buildroot}
|
|||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 2 2011 Steve Dickson <steved@redhat.com> 0.2.1-0
|
||||||
|
- Updated to latest upstream version: 0.2.2
|
||||||
|
|
||||||
* Tue Apr 12 2011 Karsten Hopp <karsten@redhat.com> 0.2.1-7.1
|
* Tue Apr 12 2011 Karsten Hopp <karsten@redhat.com> 0.2.1-7.1
|
||||||
- replace Requires(devel) with a simple Requires as the new rpm
|
- replace Requires(devel) with a simple Requires as the new rpm
|
||||||
aborts otherwise with "Bad Requireflags: qualifiers: Requires(devel)"
|
aborts otherwise with "Bad Requireflags: qualifiers: Requires(devel)"
|
||||||
|
Loading…
Reference in New Issue
Block a user