Skip to content

Commit e850607

Browse files
committed
Merge branch 'c23'
2 parents 0f822d5 + 78add20 commit e850607

39 files changed

+372
-346
lines changed

librpc/auth_non.c

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ static char sccsid[] = "@(#)auth_none.c 1.19 87/08/11 Copyr 1984 Sun Micro";
6161
/*
6262
* Authenticator operations routines
6363
*/
64-
static void authnone_verf();
65-
static void authnone_destroy();
66-
static bool_t authnone_marshal();
67-
static bool_t authnone_validate();
68-
static bool_t authnone_refresh();
64+
static void authnone_verf(AUTH *);
65+
static void authnone_destroy(AUTH *);
66+
static bool_t authnone_marshal(AUTH *, XDR *);
67+
static bool_t authnone_validate(AUTH *, struct opaque_auth *);
68+
static bool_t authnone_refresh(AUTH *);
6969

7070
static struct auth_ops ops = {
7171
authnone_verf,
@@ -123,25 +123,30 @@ authnone_marshal(client, xdrs)
123123
}
124124

125125
static void
126-
authnone_verf()
126+
authnone_verf(client)
127+
AUTH *client;
127128
{
128129
}
129130

130131
static bool_t
131-
authnone_validate()
132+
authnone_validate(client, verf)
133+
AUTH *client;
134+
struct opaque_auth *verf;
132135
{
133136

134137
return (TRUE);
135138
}
136139

137140
static bool_t
138-
authnone_refresh()
141+
authnone_refresh(client)
142+
AUTH *client;
139143
{
140144

141145
return (FALSE);
142146
}
143147

144148
static void
145-
authnone_destroy()
149+
authnone_destroy(client)
150+
AUTH *client;
146151
{
147152
}

librpc/auth_uni.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ static char sccsid[] = "@(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro";
7171
/*
7272
* Unix authenticator operations vector
7373
*/
74-
static void authunix_nextverf();
75-
static bool_t authunix_marshal();
76-
static bool_t authunix_validate();
77-
static bool_t authunix_refresh();
78-
static void authunix_destroy();
74+
static void authunix_nextverf(AUTH *);
75+
static bool_t authunix_marshal(AUTH *, XDR *);
76+
static bool_t authunix_validate(AUTH *, struct opaque_auth *);
77+
static bool_t authunix_refresh(AUTH *);
78+
static void authunix_destroy(AUTH *);
7979

8080
static struct auth_ops auth_unix_ops = {
8181
authunix_nextverf,
@@ -97,7 +97,7 @@ struct audata {
9797
};
9898
#define AUTH_PRIVATE(auth) ((struct audata *)auth->ah_private)
9999

100-
static bool_t marshal_new_auth();
100+
static bool_t marshal_new_auth(AUTH *);
101101

102102

103103
/*
@@ -245,14 +245,14 @@ authunix_marshal(auth, xdrs)
245245
static bool_t
246246
authunix_validate(auth, verf)
247247
register AUTH *auth;
248-
struct opaque_auth verf;
248+
struct opaque_auth *verf;
249249
{
250250
register struct audata *au;
251251
XDR xdrs;
252252

253-
if (verf.oa_flavor == AUTH_SHORT) {
253+
if (verf->oa_flavor == AUTH_SHORT) {
254254
au = AUTH_PRIVATE(auth);
255-
xdrmem_create(&xdrs, verf.oa_base, verf.oa_length, XDR_DECODE);
255+
xdrmem_create(&xdrs, verf->oa_base, verf->oa_length, XDR_DECODE);
256256

257257
if (au->au_shcred.oa_base != NULL) {
258258
mem_free(au->au_shcred.oa_base,

librpc/authunix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ xdr_authunix_parms(xdrs, p)
6969
&& xdr_int(xdrs, &(p->aup_uid))
7070
&& xdr_int(xdrs, &(p->aup_gid))
7171
&& xdr_array(xdrs, (caddr_t *)&(p->aup_gids),
72-
&(p->aup_len), NGRPS, sizeof(int), xdr_int) ) {
72+
&(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) {
7373
return (TRUE);
7474
}
7575
return (FALSE);

librpc/clnt_gen.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ static char sccsid[] = "@(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI";
6262
CLIENT *
6363
clnt_create(hostname, prog, vers, proto)
6464
char *hostname;
65-
unsigned prog;
66-
unsigned vers;
65+
u_long prog;
66+
u_long vers;
6767
char *proto;
6868
{
6969
struct hostent *h;
@@ -114,7 +114,7 @@ clnt_create(hostname, prog, vers, proto)
114114
return (NULL);
115115
}
116116
tv.tv_sec = 25;
117-
clnt_control(client, CLSET_TIMEOUT, &tv);
117+
clnt_control(client, CLSET_TIMEOUT, (caddr_t)&tv);
118118
break;
119119
case IPPROTO_TCP:
120120
client = clnttcp_create(&sin, prog, vers, &sock, 0, 0);
@@ -123,7 +123,7 @@ clnt_create(hostname, prog, vers, proto)
123123
}
124124
tv.tv_sec = 25;
125125
tv.tv_usec = 0;
126-
clnt_control(client, CLSET_TIMEOUT, &tv);
126+
clnt_control(client, CLSET_TIMEOUT, (caddr_t)&tv);
127127
break;
128128
default:
129129
rpc_createerr.cf_stat = RPC_SYSTEMERROR;

librpc/clnt_per.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,7 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";
5757
#include <rpc/auth.h>
5858
#include <rpc/clnt.h>
5959

60-
#ifndef WIN32
61-
extern char *sys_errlist[];
62-
extern char *sprintf();
63-
#endif
64-
static char *auth_errmsg();
65-
66-
extern char *strcpy();
60+
static char *auth_errmsg(enum auth_stat);
6761

6862
static char *buf;
6963

@@ -85,7 +79,7 @@ clnt_sperror(rpch, s)
8579
char *s;
8680
{
8781
struct rpc_err e;
88-
void clnt_perrno();
82+
void clnt_perrno(enum clnt_stat);
8983
char *err;
9084
char *str = _buf();
9185
char *strstart = str;

librpc/clnt_raw.c

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ static struct clntraw_private {
7171
u_int mcnt;
7272
} *clntraw_private;
7373

74-
static enum clnt_stat clntraw_call();
75-
static void clntraw_abort();
76-
static void clntraw_geterr();
77-
static bool_t clntraw_freeres();
78-
static bool_t clntraw_control();
79-
static void clntraw_destroy();
74+
static enum clnt_stat clntraw_call(CLIENT *, u_long, xdrproc_t, caddr_t, xdrproc_t, caddr_t, struct timeval);
75+
static void clntraw_abort(CLIENT *);
76+
static void clntraw_geterr(CLIENT *, struct rpc_err *);
77+
static bool_t clntraw_freeres(CLIENT *, xdrproc_t, caddr_t);
78+
static bool_t clntraw_control(CLIENT *, int, caddr_t);
79+
static void clntraw_destroy(CLIENT *);
8080

8181
static struct clnt_ops client_ops = {
8282
clntraw_call,
@@ -87,8 +87,6 @@ static struct clnt_ops client_ops = {
8787
clntraw_control
8888
};
8989

90-
void svc_getreq();
91-
9290
/*
9391
* Create a client handle for memory based rpc.
9492
*/
@@ -211,7 +209,9 @@ clntraw_call(h, proc, xargs, argsp, xresults, resultsp, timeout)
211209
}
212210

213211
static void
214-
clntraw_geterr()
212+
clntraw_geterr(cl, error)
213+
CLIENT *cl;
214+
struct rpc_err *error;
215215
{
216216
}
217217

@@ -236,17 +236,22 @@ clntraw_freeres(cl, xdr_res, res_ptr)
236236
}
237237

238238
static void
239-
clntraw_abort()
239+
clntraw_abort(cl)
240+
CLIENT *cl;
240241
{
241242
}
242243

243244
static bool_t
244-
clntraw_control()
245+
clntraw_control(cl, request, info)
246+
CLIENT *cl;
247+
int request;
248+
char *info;
245249
{
246250
return (FALSE);
247251
}
248252

249253
static void
250-
clntraw_destroy()
254+
clntraw_destroy(cl)
255+
CLIENT *cl;
251256
{
252257
}

librpc/clnt_tcp.c

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";
8484
extern int errno;
8585
#endif
8686

87-
static int readtcp();
88-
static int writetcp();
87+
static int readtcp(caddr_t, caddr_t, int);
88+
static int writetcp(caddr_t, caddr_t, int);
8989

90-
static enum clnt_stat clnttcp_call();
91-
static void clnttcp_abort();
92-
static void clnttcp_geterr();
93-
static bool_t clnttcp_freeres();
94-
static bool_t clnttcp_control();
95-
static void clnttcp_destroy();
90+
static enum clnt_stat clnttcp_call(CLIENT *, u_long, xdrproc_t, caddr_t, xdrproc_t, caddr_t, struct timeval);
91+
static void clnttcp_abort(CLIENT *);
92+
static void clnttcp_geterr(CLIENT *, struct rpc_err *);
93+
static bool_t clnttcp_freeres(CLIENT *, xdrproc_t, caddr_t);
94+
static bool_t clnttcp_control(CLIENT *, int, caddr_t);
95+
static void clnttcp_destroy(CLIENT *);
9696

9797
static struct clnt_ops tcp_ops = {
9898
clnttcp_call,
@@ -335,7 +335,7 @@ clnttcp_call(h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout)
335335
while (TRUE) {
336336
reply_msg.acpted_rply.ar_verf = _null_auth;
337337
reply_msg.acpted_rply.ar_results.where = NULL;
338-
reply_msg.acpted_rply.ar_results.proc = xdr_void;
338+
reply_msg.acpted_rply.ar_results.proc = (xdrproc_t) xdr_void;
339339
if (! xdrrec_skiprecord(xdrs))
340340
return (ct->ct_error.re_status);
341341
/* now decode and validate the response header */
@@ -399,7 +399,8 @@ clnttcp_freeres(cl, xdr_res, res_ptr)
399399
}
400400

401401
static void
402-
clnttcp_abort()
402+
clnttcp_abort(cl)
403+
CLIENT *cl;
403404
{
404405
}
405406

@@ -454,11 +455,12 @@ clnttcp_destroy(h)
454455
* around for the rpc level.
455456
*/
456457
static int
457-
readtcp(ct, buf, len)
458-
register struct ct_data *ct;
458+
readtcp(ctp, buf, len)
459+
caddr_t ctp;
459460
caddr_t buf;
460461
register int len;
461462
{
463+
register struct ct_data *ct = (struct ct_data *)ctp;
462464
#ifdef FD_SETSIZE
463465
fd_set mask;
464466
fd_set readfds;
@@ -543,12 +545,13 @@ readtcp(ct, buf, len)
543545
}
544546

545547
static int
546-
writetcp(ct, buf, len)
547-
struct ct_data *ct;
548+
writetcp(ctp, buf, len)
549+
caddr_t ctp;
548550
caddr_t buf;
549551
int len;
550552
{
551553
register int i, cnt;
554+
struct ct_data *ct = (struct ct_data *) ctp;
552555

553556
for (cnt = len; cnt > 0; cnt -= i, buf += i) {
554557
#ifdef WIN32

librpc/clnt_udp.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ extern int errno;
7171
/*
7272
* UDP bases client side rpc operations
7373
*/
74-
static enum clnt_stat clntudp_call();
75-
static void clntudp_abort();
76-
static void clntudp_geterr();
77-
static bool_t clntudp_freeres();
78-
static bool_t clntudp_control();
79-
static void clntudp_destroy();
74+
static enum clnt_stat clntudp_call(CLIENT *, u_long, xdrproc_t, caddr_t, xdrproc_t, caddr_t, struct timeval);
75+
static void clntudp_abort(CLIENT *);
76+
static void clntudp_geterr(CLIENT *, struct rpc_err *);
77+
static bool_t clntudp_freeres(CLIENT *, xdrproc_t, caddr_t);
78+
static bool_t clntudp_control(CLIENT *, int, caddr_t);
79+
static void clntudp_destroy(CLIENT *);
8080

8181
static struct clnt_ops udp_ops = {
8282
clntudp_call,
@@ -459,8 +459,8 @@ clntudp_freeres(cl, xdr_res, res_ptr)
459459
}
460460

461461
static void
462-
clntudp_abort(/*h*/)
463-
/*CLIENT *h;*/
462+
clntudp_abort(cl)
463+
CLIENT *cl;
464464
{
465465
}
466466

librpc/getrpcen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ struct rpcdata {
7373
static void setrpcent(int f);
7474
static void endrpcent();
7575

76-
static struct rpcent *interpret();
76+
static struct rpcent *interpret(char *, int);
7777
struct hostent *gethostent();
7878
#ifdef WIN32
7979
#define index(str,ch) strchr(str,ch)

librpc/pmap_cln.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static char sccsid[] = "@(#)pmap_clnt.c 1.37 87/08/11 Copyr 1984 Sun Micro";
5858
static struct timeval timeout = { 5, 0 };
5959
static struct timeval tottimeout = { 60, 0 };
6060

61-
void clnt_perror();
61+
void clnt_perror(CLIENT *, char *);
6262

6363

6464
/*
@@ -87,7 +87,9 @@ pmap_set(program, version, protocol, port)
8787
parms.pm_vers = version;
8888
parms.pm_prot = protocol;
8989
parms.pm_port = port;
90-
if (CLNT_CALL(client, PMAPPROC_SET, xdr_pmap, &parms, xdr_bool, &rslt,
90+
if (CLNT_CALL(client, PMAPPROC_SET,
91+
(xdrproc_t)xdr_pmap, (caddr_t)&parms,
92+
(xdrproc_t)xdr_bool, (caddr_t)&rslt,
9193
tottimeout) != RPC_SUCCESS) {
9294
clnt_perror(client, "Cannot register service");
9395
return (FALSE);
@@ -124,8 +126,9 @@ pmap_unset(program, version)
124126
parms.pm_prog = program;
125127
parms.pm_vers = version;
126128
parms.pm_port = parms.pm_prot = 0;
127-
CLNT_CALL(client, PMAPPROC_UNSET, xdr_pmap, &parms, xdr_bool, &rslt,
128-
tottimeout);
129+
CLNT_CALL(client, PMAPPROC_UNSET,
130+
(xdrproc_t)xdr_pmap, (caddr_t)&parms,
131+
(xdrproc_t)xdr_bool, (caddr_t)&rslt, tottimeout);
129132
CLNT_DESTROY(client);
130133
#ifdef WIN32
131134
(void)closesocket(socket);

0 commit comments

Comments
 (0)