2023-04-21 19:52:49 +00:00
|
|
|
diff --git a/src/bindresvport.c b/src/bindresvport.c
|
|
|
|
index 5c0ddcf..efeb1cc 100644
|
|
|
|
--- a/src/bindresvport.c
|
|
|
|
+++ b/src/bindresvport.c
|
|
|
|
@@ -130,6 +130,7 @@ load_blacklist (void)
|
|
|
|
if (list == NULL)
|
|
|
|
{
|
|
|
|
free (buf);
|
|
|
|
+ fclose (fp);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
diff --git a/src/clnt_raw.c b/src/clnt_raw.c
|
|
|
|
index 31f9d0c..03f839d 100644
|
|
|
|
--- a/src/clnt_raw.c
|
|
|
|
+++ b/src/clnt_raw.c
|
|
|
|
@@ -142,7 +142,7 @@ clnt_raw_call(h, proc, xargs, argsp, xresults, resultsp, timeout)
|
|
|
|
struct timeval timeout;
|
|
|
|
{
|
|
|
|
struct clntraw_private *clp = clntraw_private;
|
|
|
|
- XDR *xdrs = &clp->xdr_stream;
|
|
|
|
+ XDR *xdrs;
|
|
|
|
struct rpc_msg msg;
|
|
|
|
enum clnt_stat status;
|
|
|
|
struct rpc_err error;
|
|
|
|
@@ -154,6 +154,7 @@ clnt_raw_call(h, proc, xargs, argsp, xresults, resultsp, timeout)
|
|
|
|
mutex_unlock(&clntraw_lock);
|
|
|
|
return (RPC_FAILED);
|
|
|
|
}
|
|
|
|
+ xdrs = &clp->xdr_stream;
|
|
|
|
mutex_unlock(&clntraw_lock);
|
|
|
|
|
|
|
|
call_again:
|
|
|
|
@@ -245,7 +246,7 @@ clnt_raw_freeres(cl, xdr_res, res_ptr)
|
|
|
|
void *res_ptr;
|
|
|
|
{
|
|
|
|
struct clntraw_private *clp = clntraw_private;
|
|
|
|
- XDR *xdrs = &clp->xdr_stream;
|
|
|
|
+ XDR *xdrs;
|
|
|
|
bool_t rval;
|
|
|
|
|
|
|
|
mutex_lock(&clntraw_lock);
|
|
|
|
@@ -254,6 +255,7 @@ clnt_raw_freeres(cl, xdr_res, res_ptr)
|
|
|
|
mutex_unlock(&clntraw_lock);
|
|
|
|
return (rval);
|
|
|
|
}
|
|
|
|
+ xdrs = &clp->xdr_stream;
|
|
|
|
mutex_unlock(&clntraw_lock);
|
|
|
|
xdrs->x_op = XDR_FREE;
|
|
|
|
return ((*xdr_res)(xdrs, res_ptr));
|
|
|
|
diff --git a/src/getnetconfig.c b/src/getnetconfig.c
|
|
|
|
index cfd33c2..d547dce 100644
|
|
|
|
--- a/src/getnetconfig.c
|
|
|
|
+++ b/src/getnetconfig.c
|
|
|
|
@@ -436,11 +436,6 @@ getnetconfigent(netid)
|
|
|
|
fprintf(stderr, "in /etc/netconfig.\n");
|
|
|
|
fprintf(stderr, "Please change this to \"local\" manually ");
|
|
|
|
fprintf(stderr, "or run mergemaster(8).\n");
|
|
|
|
- fprintf(stderr, "See UPDATING entry 20021216 for details.\n");
|
|
|
|
- fprintf(stderr, "Continuing in 10 seconds\n\n");
|
|
|
|
- fprintf(stderr, "This warning will be removed 20030301\n");
|
|
|
|
- sleep(10);
|
|
|
|
-
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
diff --git a/src/rpcb_clnt.c b/src/rpcb_clnt.c
|
2023-08-07 15:45:47 +00:00
|
|
|
index 9a9de69..68fe69a 100644
|
2023-04-21 19:52:49 +00:00
|
|
|
--- a/src/rpcb_clnt.c
|
|
|
|
+++ b/src/rpcb_clnt.c
|
2023-08-07 15:45:47 +00:00
|
|
|
@@ -104,17 +104,27 @@ destroy_addr(addr)
|
|
|
|
{
|
|
|
|
if (addr == NULL)
|
|
|
|
return;
|
|
|
|
- if(addr->ac_host != NULL)
|
|
|
|
+ if (addr->ac_host != NULL) {
|
|
|
|
free(addr->ac_host);
|
|
|
|
- if(addr->ac_netid != NULL)
|
|
|
|
+ addr->ac_host = NULL;
|
|
|
|
+ }
|
|
|
|
+ if (addr->ac_netid != NULL) {
|
|
|
|
free(addr->ac_netid);
|
|
|
|
- if(addr->ac_uaddr != NULL)
|
|
|
|
+ addr->ac_netid = NULL;
|
|
|
|
+ }
|
|
|
|
+ if (addr->ac_uaddr != NULL) {
|
|
|
|
free(addr->ac_uaddr);
|
|
|
|
- if(addr->ac_taddr != NULL) {
|
|
|
|
- if(addr->ac_taddr->buf != NULL)
|
|
|
|
+ addr->ac_uaddr = NULL;
|
|
|
|
+ }
|
|
|
|
+ if (addr->ac_taddr != NULL) {
|
|
|
|
+ if(addr->ac_taddr->buf != NULL) {
|
|
|
|
free(addr->ac_taddr->buf);
|
|
|
|
+ addr->ac_taddr->buf = NULL;
|
|
|
|
+ }
|
|
|
|
+ addr->ac_taddr = NULL;
|
|
|
|
}
|
|
|
|
free(addr);
|
|
|
|
+ addr = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
@@ -252,12 +262,15 @@ delete_cache(addr)
|
|
|
|
for (cptr = front; cptr != NULL; cptr = cptr->ac_next) {
|
|
|
|
if (!memcmp(cptr->ac_taddr->buf, addr->buf, addr->len)) {
|
|
|
|
/* Unlink from cache. We'll destroy it after releasing the mutex. */
|
|
|
|
- if (cptr->ac_uaddr)
|
|
|
|
+ if (cptr->ac_uaddr) {
|
|
|
|
free(cptr->ac_uaddr);
|
|
|
|
- if (prevptr)
|
|
|
|
+ cptr->ac_uaddr = NULL;
|
|
|
|
+ }
|
|
|
|
+ if (prevptr) {
|
|
|
|
prevptr->ac_next = cptr->ac_next;
|
|
|
|
- else
|
|
|
|
+ } else {
|
|
|
|
front = cptr->ac_next;
|
|
|
|
+ }
|
|
|
|
cachesize--;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
@@ -496,11 +509,7 @@ getpmaphandle(nconf, hostname, tgtaddr)
|
2023-04-21 19:52:49 +00:00
|
|
|
CLIENT *client = NULL;
|
|
|
|
rpcvers_t pmapvers = 2;
|
|
|
|
|
|
|
|
- /*
|
|
|
|
- * Try UDP only - there are some portmappers out
|
|
|
|
- * there that use UDP only.
|
|
|
|
- */
|
|
|
|
- if (nconf == NULL || strcmp(nconf->nc_proto, NC_TCP) == 0) {
|
|
|
|
+ if (nconf == NULL) {
|
|
|
|
struct netconfig *newnconf;
|
|
|
|
|
|
|
|
if ((newnconf = getnetconfigent("udp")) == NULL) {
|
2023-08-07 15:45:47 +00:00
|
|
|
@@ -509,7 +518,8 @@ getpmaphandle(nconf, hostname, tgtaddr)
|
2023-04-21 19:52:49 +00:00
|
|
|
}
|
|
|
|
client = getclnthandle(hostname, newnconf, tgtaddr);
|
|
|
|
freenetconfigent(newnconf);
|
|
|
|
- } else if (strcmp(nconf->nc_proto, NC_UDP) == 0) {
|
|
|
|
+ } else if (strcmp(nconf->nc_proto, NC_UDP) == 0 ||
|
|
|
|
+ strcmp(nconf->nc_proto, NC_TCP) == 0) {
|
|
|
|
if (strcmp(nconf->nc_protofmly, NC_INET) != 0)
|
|
|
|
return NULL;
|
|
|
|
client = getclnthandle(hostname, nconf, tgtaddr);
|
|
|
|
diff --git a/src/svc_auth.c b/src/svc_auth.c
|
|
|
|
index ce8bbd8..789d6af 100644
|
|
|
|
--- a/src/svc_auth.c
|
|
|
|
+++ b/src/svc_auth.c
|
|
|
|
@@ -66,6 +66,9 @@ static struct authsvc *Auths = NULL;
|
|
|
|
|
|
|
|
extern SVCAUTH svc_auth_none;
|
|
|
|
|
|
|
|
+#ifdef AUTHDES_SUPPORT
|
|
|
|
+extern enum auth_stat _svcauth_des(struct svc_req *rqst, struct rpc_msg *msg);
|
|
|
|
+#endif
|
|
|
|
/*
|
|
|
|
* The call rpc message, msg has been obtained from the wire. The msg contains
|
|
|
|
* the raw form of credentials and verifiers. authenticate returns AUTH_OK
|