summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/rpc/auth_unix.c10
-rw-r--r--lib/libc/rpc/clnt_perror.c4
-rw-r--r--lib/libc/rpc/clnt_simple.c5
-rw-r--r--lib/libc/rpc/getrpcent.c7
-rw-r--r--lib/libc/rpc/pmap_prot2.c4
-rw-r--r--lib/libc/rpc/rpc_dtablesize.c3
-rw-r--r--lib/libc/rpc/rpc_prot.c8
-rw-r--r--lib/libc/rpc/svc_simple.c9
-rw-r--r--lib/libc/rpc/svc_tcp.c8
9 files changed, 37 insertions, 21 deletions
diff --git a/lib/libc/rpc/auth_unix.c b/lib/libc/rpc/auth_unix.c
index b63b959..e96eb08 100644
--- a/lib/libc/rpc/auth_unix.c
+++ b/lib/libc/rpc/auth_unix.c
@@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)auth_unix.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: auth_unix.c,v 1.4 1995/05/30 05:41:12 rgrimes Exp $";
+static char *rcsid = "$Id: auth_unix.c,v 1.5 1995/10/22 14:51:08 phk Exp $";
#endif
/*
@@ -56,6 +56,8 @@ static char *rcsid = "$Id: auth_unix.c,v 1.4 1995/05/30 05:41:12 rgrimes Exp $";
#include <rpc/auth.h>
#include <rpc/auth_unix.h>
+bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);
+
/*
* Unix authenticator operations vector
*/
@@ -202,13 +204,13 @@ authunix_create_default()
if (gethostname(machname, MAX_MACHINE_NAME) == -1)
abort();
machname[MAX_MACHINE_NAME] = 0;
- uid = geteuid();
- gid = getegid();
+ uid = (int)geteuid();
+ gid = (int)getegid();
if ((len = getgroups(NGROUPS, real_gids)) < 0)
abort();
if(len > NGRPS) len = NGRPS; /* GW: turn `gid_t's into `int's */
for(i = 0; i < len; i++) {
- gids[i] = real_gids[i];
+ gids[i] = (int)real_gids[i];
}
return (authunix_create(machname, uid, gid, len, gids));
}
diff --git a/lib/libc/rpc/clnt_perror.c b/lib/libc/rpc/clnt_perror.c
index a6ee70b..0bcd8f0 100644
--- a/lib/libc/rpc/clnt_perror.c
+++ b/lib/libc/rpc/clnt_perror.c
@@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)clnt_perror.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: clnt_perror.c,v 1.3 1995/10/22 14:51:14 phk Exp $";
+static char *rcsid = "$Id: clnt_perror.c,v 1.4 1995/12/10 17:40:18 wpaul Exp $";
#endif
/*
@@ -253,6 +253,8 @@ clnt_spcreateerror(s)
(void) sprintf(&str[strlen(str)], "Error %d",
rpc_createerr.cf_error.re_errno);
break;
+ default:
+ break;
}
(void) strcat(str, "\n");
return (str);
diff --git a/lib/libc/rpc/clnt_simple.c b/lib/libc/rpc/clnt_simple.c
index 2678287..5dfbc22 100644
--- a/lib/libc/rpc/clnt_simple.c
+++ b/lib/libc/rpc/clnt_simple.c
@@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)clnt_simple.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: clnt_simple.c,v 1.2 1995/05/30 05:41:17 rgrimes Exp $";
+static char *rcsid = "$Id: clnt_simple.c,v 1.3 1995/10/22 14:51:17 phk Exp $";
#endif
/*
@@ -55,8 +55,9 @@ static struct callrpc_private {
char *oldhost;
} *callrpc_private;
-callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
+int callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
char *host;
+ int prognum, versnum, procnum;
xdrproc_t inproc, outproc;
char *in, *out;
{
diff --git a/lib/libc/rpc/getrpcent.c b/lib/libc/rpc/getrpcent.c
index e9b919c..6556e61 100644
--- a/lib/libc/rpc/getrpcent.c
+++ b/lib/libc/rpc/getrpcent.c
@@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)getrpcent.c 1.14 91/03/11 Copyr 1984 Sun Micro";*/
-static char *rcsid = "$Id: getrpcent.c,v 1.2 1995/05/30 05:41:21 rgrimes Exp $";
+static char *rcsid = "$Id: getrpcent.c,v 1.3 1995/10/22 14:51:24 phk Exp $";
#endif
/*
@@ -66,6 +66,7 @@ struct rpcdata {
#ifdef YP
static int __yp_nomap = 0;
+extern int _yp_check(char **);
#endif /* YP */
static struct rpcent *interpret();
@@ -123,7 +124,7 @@ getrpcbynumber(number)
no_yp:
#endif /* YP */
setrpcent(0);
- while (p = getrpcent()) {
+ while ((p = getrpcent())) {
if (p->r_number == number)
break;
}
@@ -139,7 +140,7 @@ getrpcbyname(name)
char **rp;
setrpcent(0);
- while (rpc = getrpcent()) {
+ while ((rpc = getrpcent())) {
if (strcmp(rpc->r_name, name) == 0)
return (rpc);
for (rp = rpc->r_aliases; *rp != NULL; rp++) {
diff --git a/lib/libc/rpc/pmap_prot2.c b/lib/libc/rpc/pmap_prot2.c
index 5e937ed..2f2a9a0 100644
--- a/lib/libc/rpc/pmap_prot2.c
+++ b/lib/libc/rpc/pmap_prot2.c
@@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)pmap_prot2.c 1.3 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)pmap_prot2.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: pmap_prot2.c,v 1.1 1994/08/07 18:35:57 wollman Exp $";
+static char *rcsid = "$Id: pmap_prot2.c,v 1.2 1995/05/30 05:41:26 rgrimes Exp $";
#endif
/*
@@ -95,7 +95,7 @@ xdr_pmaplist(xdrs, rp)
*/
bool_t more_elements;
register int freeing = (xdrs->x_op == XDR_FREE);
- register struct pmaplist **next;
+ register struct pmaplist **next = NULL;
while (TRUE) {
more_elements = (bool_t)(*rp != NULL);
diff --git a/lib/libc/rpc/rpc_dtablesize.c b/lib/libc/rpc/rpc_dtablesize.c
index 6ca511d..330d082 100644
--- a/lib/libc/rpc/rpc_dtablesize.c
+++ b/lib/libc/rpc/rpc_dtablesize.c
@@ -34,6 +34,7 @@ static char *rcsid = "rpc_dtablesize.c,v 1.1 1994/08/07 18:36:02 wollman Exp";
#endif
#include <sys/types.h>
+#include <unistd.h>
/*
* Cache the result of getdtablesize(), so we don't have to do an
@@ -50,7 +51,7 @@ static char *rcsid = "rpc_dtablesize.c,v 1.1 1994/08/07 18:36:02 wollman Exp";
* that. Clamping this function at 256 is a kludge, but it'll have to
* do until select()'s descriptor table size can be adjusted dynamically.
*/
-_rpc_dtablesize()
+int _rpc_dtablesize(void)
{
static int size;
diff --git a/lib/libc/rpc/rpc_prot.c b/lib/libc/rpc/rpc_prot.c
index 1693b67..9f7d1c0 100644
--- a/lib/libc/rpc/rpc_prot.c
+++ b/lib/libc/rpc/rpc_prot.c
@@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)rpc_prot.c 2.3 88/08/07 4.0 RPCSRC";*/
-static char *rcsid = "$Id: rpc_prot.c,v 1.1 1994/08/07 18:36:03 wollman Exp $";
+static char *rcsid = "$Id: rpc_prot.c,v 1.2 1995/05/30 05:41:31 rgrimes Exp $";
#endif
/*
@@ -106,6 +106,8 @@ xdr_accepted_reply(xdrs, ar)
if (! xdr_u_long(xdrs, &(ar->ar_vers.low)))
return (FALSE);
return (xdr_u_long(xdrs, &(ar->ar_vers.high)));
+ default:
+ break;
}
return (TRUE); /* TRUE => open ended set of problems */
}
@@ -236,6 +238,8 @@ rejected(rjct_stat, error)
case AUTH_ERROR:
error->re_status = RPC_AUTHERROR;
return;
+ default:
+ break;
}
/* something's wrong, but we don't know what ... */
error->re_status = RPC_FAILED;
@@ -287,5 +291,7 @@ _seterr_reply(msg, error)
error->re_vers.low = msg->acpted_rply.ar_vers.low;
error->re_vers.high = msg->acpted_rply.ar_vers.high;
break;
+ default:
+ break;
}
}
diff --git a/lib/libc/rpc/svc_simple.c b/lib/libc/rpc/svc_simple.c
index 8bcc306..f18b417 100644
--- a/lib/libc/rpc/svc_simple.c
+++ b/lib/libc/rpc/svc_simple.c
@@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)svc_simple.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: svc_simple.c,v 1.2 1995/05/30 05:41:37 rgrimes Exp $";
+static char *rcsid = "$Id: svc_simple.c,v 1.3 1995/10/22 14:51:37 phk Exp $";
#endif
/*
@@ -47,6 +47,8 @@ static char *rcsid = "$Id: svc_simple.c,v 1.2 1995/05/30 05:41:37 rgrimes Exp $"
#include <sys/socket.h>
#include <netdb.h>
+bool_t pmap_unset(u_long, u_long);
+
static struct proglst {
char *(*p_progname)();
int p_prognum;
@@ -58,14 +60,15 @@ static void universal();
static SVCXPRT *transp;
struct proglst *pl;
-registerrpc(prognum, versnum, procnum, progname, inproc, outproc)
+int registerrpc(prognum, versnum, procnum, progname, inproc, outproc)
char *(*progname)();
+ int prognum, versnum, procnum;
xdrproc_t inproc, outproc;
{
if (procnum == NULLPROC) {
(void) fprintf(stderr,
- "can't reassign procedure number %d\n", NULLPROC);
+ "can't reassign procedure number %ld\n", NULLPROC);
return (-1);
}
if (transp == 0) {
diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c
index b408dec..2b941ba 100644
--- a/lib/libc/rpc/svc_tcp.c
+++ b/lib/libc/rpc/svc_tcp.c
@@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)svc_tcp.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: svc_tcp.c,v 1.4 1995/12/07 12:50:56 bde Exp $";
+static char *rcsid = "$Id: svc_tcp.c,v 1.5 1996/06/08 22:54:57 jraynard Exp $";
#endif
/*
@@ -82,9 +82,9 @@ static enum xprt_stat rendezvous_stat();
static struct xp_ops svctcp_rendezvous_op = {
rendezvous_request,
rendezvous_stat,
- abort,
- abort,
- abort,
+ (bool_t (*)())abort,
+ (bool_t (*)())abort,
+ (bool_t (*)())abort,
svctcp_destroy
};
OpenPOWER on IntegriCloud