aboutsummaryrefslogtreecommitdiff
path: root/src/lib/rpc
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
committerTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
commit02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b (patch)
tree61b9147863cd8be3eff63903dc36cae168254bd5 /src/lib/rpc
parent162ab371748cba0cc6f172419bd6e71fa04bb878 (diff)
downloadkrb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.zip
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.gz
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.bz2
make mark-cstyle
make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/rpc')
-rw-r--r--src/lib/rpc/auth_gss.c96
-rw-r--r--src/lib/rpc/auth_gssapi.c180
-rw-r--r--src/lib/rpc/auth_gssapi_misc.c66
-rw-r--r--src/lib/rpc/auth_none.c20
-rw-r--r--src/lib/rpc/auth_unix.c16
-rw-r--r--src/lib/rpc/authgss_prot.c36
-rw-r--r--src/lib/rpc/authunix_prot.c11
-rw-r--r--src/lib/rpc/bindresvport.c10
-rw-r--r--src/lib/rpc/clnt_generic.c16
-rw-r--r--src/lib/rpc/clnt_perror.c54
-rw-r--r--src/lib/rpc/clnt_raw.c16
-rw-r--r--src/lib/rpc/clnt_simple.c18
-rw-r--r--src/lib/rpc/clnt_tcp.c16
-rw-r--r--src/lib/rpc/clnt_udp.c40
-rw-r--r--src/lib/rpc/dyn.c46
-rw-r--r--src/lib/rpc/dyn.h2
-rw-r--r--src/lib/rpc/dynP.h2
-rw-r--r--src/lib/rpc/dyntest.c18
-rw-r--r--src/lib/rpc/get_myaddress.c14
-rw-r--r--src/lib/rpc/getrpcent.c10
-rw-r--r--src/lib/rpc/getrpcport.c10
-rw-r--r--src/lib/rpc/gssrpcint.h4
-rw-r--r--src/lib/rpc/pmap_clnt.c10
-rw-r--r--src/lib/rpc/pmap_getmaps.c10
-rw-r--r--src/lib/rpc/pmap_getport.c10
-rw-r--r--src/lib/rpc/pmap_prot.c14
-rw-r--r--src/lib/rpc/pmap_prot2.c22
-rw-r--r--src/lib/rpc/pmap_rmt.c21
-rw-r--r--src/lib/rpc/rpc_callmsg.c15
-rw-r--r--src/lib/rpc/rpc_commondata.c10
-rw-r--r--src/lib/rpc/rpc_dtablesize.c18
-rw-r--r--src/lib/rpc/rpc_prot.c18
-rw-r--r--src/lib/rpc/svc.c56
-rw-r--r--src/lib/rpc/svc_auth.c14
-rw-r--r--src/lib/rpc/svc_auth_gss.c76
-rw-r--r--src/lib/rpc/svc_auth_gssapi.c120
-rw-r--r--src/lib/rpc/svc_auth_none.c4
-rw-r--r--src/lib/rpc/svc_auth_unix.c14
-rw-r--r--src/lib/rpc/svc_raw.c14
-rw-r--r--src/lib/rpc/svc_run.c10
-rw-r--r--src/lib/rpc/svc_simple.c17
-rw-r--r--src/lib/rpc/svc_tcp.c23
-rw-r--r--src/lib/rpc/svc_udp.c41
-rw-r--r--src/lib/rpc/unit-test/client.c19
-rw-r--r--src/lib/rpc/unit-test/server.c24
-rw-r--r--src/lib/rpc/xdr.c24
-rw-r--r--src/lib/rpc/xdr_alloc.c12
-rw-r--r--src/lib/rpc/xdr_array.c17
-rw-r--r--src/lib/rpc/xdr_float.c10
-rw-r--r--src/lib/rpc/xdr_mem.c12
-rw-r--r--src/lib/rpc/xdr_rec.c28
-rw-r--r--src/lib/rpc/xdr_reference.c10
-rw-r--r--src/lib/rpc/xdr_sizeof.c10
-rw-r--r--src/lib/rpc/xdr_stdio.c16
54 files changed, 705 insertions, 715 deletions
diff --git a/src/lib/rpc/auth_gss.c b/src/lib/rpc/auth_gss.c
index 1debd4d..1d6837e 100644
--- a/src/lib/rpc/auth_gss.c
+++ b/src/lib/rpc/auth_gss.c
@@ -2,7 +2,7 @@
auth_gss.c
RPCSEC_GSS client routines.
-
+
Copyright (c) 2000 The Regents of the University of Michigan.
All rights reserved.
@@ -144,7 +144,7 @@ print_rpc_gss_sec(struct rpc_gss_sec *ptr)
struct rpc_gss_data {
bool_t established; /* context established */
bool_t inprogress;
- gss_buffer_desc gc_wire_verf; /* save GSS_S_COMPLETE NULL RPC verfier
+ gss_buffer_desc gc_wire_verf; /* save GSS_S_COMPLETE NULL RPC verfier
* to process at end of context negotiation*/
CLIENT *clnt; /* client handle */
gss_name_t name; /* service name */
@@ -166,9 +166,9 @@ authgss_create(CLIENT *clnt, gss_name_t name, struct rpc_gss_sec *sec)
OM_uint32 min_stat = 0;
log_debug("in authgss_create()");
-
+
memset(&rpc_createerr, 0, sizeof(rpc_createerr));
-
+
if ((auth = calloc(sizeof(*auth), 1)) == NULL) {
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
rpc_createerr.cf_error.re_errno = ENOMEM;
@@ -200,18 +200,18 @@ authgss_create(CLIENT *clnt, gss_name_t name, struct rpc_gss_sec *sec)
gd->gc.gc_v = RPCSEC_GSS_VERSION;
gd->gc.gc_proc = RPCSEC_GSS_INIT;
gd->gc.gc_svc = gd->sec.svc;
-
+
auth->ah_ops = &authgss_ops;
auth->ah_private = (caddr_t)gd;
-
+
save_auth = clnt->cl_auth;
clnt->cl_auth = auth;
if (!authgss_refresh(auth, NULL))
auth = NULL;
-
+
clnt->cl_auth = save_auth;
-
+
log_debug("authgss_create returning auth 0x%08x", auth);
return (auth);
}
@@ -225,11 +225,11 @@ authgss_create_default(CLIENT *clnt, char *service, struct rpc_gss_sec *sec)
gss_name_t name;
log_debug("in authgss_create_default()");
-
+
sname.value = service;
sname.length = strlen(service);
-
+
maj_stat = gss_import_name(&min_stat, &sname,
(gss_OID)gss_nt_service_name,
&name);
@@ -241,10 +241,10 @@ authgss_create_default(CLIENT *clnt, char *service, struct rpc_gss_sec *sec)
}
auth = authgss_create(clnt, name, sec);
-
+
if (name != GSS_C_NO_NAME)
gss_release_name(&min_stat, &name);
-
+
log_debug("authgss_create_default returning auth 0x%08x", auth);
return (auth);
}
@@ -287,16 +287,16 @@ authgss_marshal(AUTH *auth, XDR *xdrs)
gss_buffer_desc rpcbuf, checksum;
OM_uint32 maj_stat, min_stat;
bool_t xdr_stat;
-
+
log_debug("in authgss_marshal()");
-
+
gd = AUTH_PRIVATE(auth);
if (gd->established)
gd->gc.gc_seq++;
-
+
xdrmem_create(&tmpxdrs, tmp, sizeof(tmp), XDR_ENCODE);
-
+
if (!xdr_rpc_gss_cred(&tmpxdrs, &gd->gc)) {
XDR_DESTROY(&tmpxdrs);
return (FALSE);
@@ -304,12 +304,12 @@ authgss_marshal(AUTH *auth, XDR *xdrs)
auth->ah_cred.oa_flavor = RPCSEC_GSS;
auth->ah_cred.oa_base = tmp;
auth->ah_cred.oa_length = XDR_GETPOS(&tmpxdrs);
-
+
XDR_DESTROY(&tmpxdrs);
-
+
if (!xdr_opaque_auth(xdrs, &auth->ah_cred))
return (FALSE);
-
+
if (gd->gc.gc_proc == RPCSEC_GSS_INIT ||
gd->gc.gc_proc == RPCSEC_GSS_CONTINUE_INIT) {
return (xdr_opaque_auth(xdrs, &gssrpc__null_auth));
@@ -318,7 +318,7 @@ authgss_marshal(AUTH *auth, XDR *xdrs)
rpcbuf.length = XDR_GETPOS(xdrs);
XDR_SETPOS(xdrs, 0);
rpcbuf.value = XDR_INLINE(xdrs, (int)rpcbuf.length);
-
+
maj_stat = gss_get_mic(&min_stat, gd->ctx, gd->sec.qop,
&rpcbuf, &checksum);
@@ -333,10 +333,10 @@ authgss_marshal(AUTH *auth, XDR *xdrs)
auth->ah_verf.oa_flavor = RPCSEC_GSS;
auth->ah_verf.oa_base = checksum.value;
auth->ah_verf.oa_length = checksum.length;
-
+
xdr_stat = xdr_opaque_auth(xdrs, &auth->ah_verf);
gss_release_buffer(&min_stat, &checksum);
-
+
return (xdr_stat);
}
@@ -350,13 +350,13 @@ authgss_validate(AUTH *auth, struct opaque_auth *verf)
OM_uint32 maj_stat, min_stat;
log_debug("in authgss_validate()");
-
+
gd = AUTH_PRIVATE(auth);
if (gd->established == FALSE) {
/* would like to do this only on NULL rpc - gc->established is good enough.
* save the on the wire verifier to validate last INIT phase packet
- * after decode if the major status is GSS_S_COMPLETE
+ * after decode if the major status is GSS_S_COMPLETE
*/
if ((gd->gc_wire_verf.value = mem_alloc(verf->oa_length)) == NULL) {
fprintf(stderr, "gss_validate: out of memory\n");
@@ -372,13 +372,13 @@ authgss_validate(AUTH *auth, struct opaque_auth *verf)
num = htonl(gd->win);
}
else num = htonl(gd->gc.gc_seq);
-
+
signbuf.value = &num;
signbuf.length = sizeof(num);
-
+
checksum.value = verf->oa_base;
checksum.length = verf->oa_length;
-
+
maj_stat = gss_verify_mic(&min_stat, gd->ctx, &signbuf,
&checksum, &qop_state);
if (maj_stat != GSS_S_COMPLETE || qop_state != gd->sec.qop) {
@@ -401,16 +401,16 @@ authgss_refresh(AUTH *auth, struct rpc_msg *msg)
OM_uint32 maj_stat, min_stat, call_stat, ret_flags;
log_debug("in authgss_refresh()");
-
+
gd = AUTH_PRIVATE(auth);
-
+
if (gd->established || gd->inprogress)
return (TRUE);
-
+
/* GSS context establishment loop. */
memset(&gr, 0, sizeof(gr));
recv_tokenp = GSS_C_NO_BUFFER;
-
+
#ifdef DEBUG
print_rpc_gss_sec(&gd->sec);
#endif /*DEBUG*/
@@ -424,13 +424,13 @@ authgss_refresh(AUTH *auth, struct rpc_msg *msg)
gd->sec.mech,
gd->sec.req_flags,
0, /* time req */
- GSS_C_NO_CHANNEL_BINDINGS,
+ GSS_C_NO_CHANNEL_BINDINGS,
recv_tokenp,
NULL, /* used mech */
&send_token,
&ret_flags,
NULL); /* time rec */
-
+
log_status("gss_init_sec_context", maj_stat, min_stat);
if (recv_tokenp != GSS_C_NO_BUFFER) {
gss_release_buffer(&min_stat, &gr.gr_token);
@@ -443,13 +443,13 @@ authgss_refresh(AUTH *auth, struct rpc_msg *msg)
}
if (send_token.length != 0) {
memset(&gr, 0, sizeof(gr));
-
+
call_stat = clnt_call(gd->clnt, NULLPROC,
xdr_rpc_gss_init_args,
&send_token,
xdr_rpc_gss_init_res,
(caddr_t)&gr, AUTH_TIMEOUT);
-
+
gss_release_buffer(&min_stat, &send_token);
log_debug("authgss_refresh: call_stat=%d", call_stat);
@@ -458,7 +458,7 @@ authgss_refresh(AUTH *auth, struct rpc_msg *msg)
(gr.gr_major != GSS_S_COMPLETE &&
gr.gr_major != GSS_S_CONTINUE_NEEDED))
break;
-
+
if (gr.gr_ctx.length != 0) {
if (gd->gc.gc_ctx.value)
gss_release_buffer(&min_stat,
@@ -472,7 +472,7 @@ authgss_refresh(AUTH *auth, struct rpc_msg *msg)
}
gd->gc.gc_proc = RPCSEC_GSS_CONTINUE_INIT;
}
-
+
/* GSS_S_COMPLETE => check gss header verifier, usually checked in
* gss_validate
*/
@@ -516,11 +516,11 @@ authgss_refresh(AUTH *auth, struct rpc_msg *msg)
log_debug("authgss_refresh: returning ERROR (gc_proc %d)", gd->gc.gc_proc);
if (gr.gr_token.length != 0)
gss_release_buffer(&min_stat, &gr.gr_token);
-
+
authgss_destroy(auth);
auth = NULL;
rpc_createerr.cf_stat = RPC_AUTHERROR;
-
+
return (FALSE);
}
log_debug("authgss_refresh: returning SUCCESS");
@@ -552,9 +552,9 @@ authgss_destroy_context(AUTH *auth)
enum clnt_stat callstat;
log_debug("in authgss_destroy_context()");
-
+
gd = AUTH_PRIVATE(auth);
-
+
if (gd->gc.gc_ctx.length != 0) {
if (gd->established) {
gd->gc.gc_proc = RPCSEC_GSS_DESTROY;
@@ -584,13 +584,13 @@ authgss_destroy(AUTH *auth)
{
struct rpc_gss_data *gd;
OM_uint32 min_stat;
-
+
log_debug("in authgss_destroy()");
-
+
gd = AUTH_PRIVATE(auth);
-
+
authgss_destroy_context(auth);
-
+
if (gd->name != GSS_C_NO_NAME)
gss_release_name(&min_stat, &gd->name);
@@ -604,7 +604,7 @@ authgss_wrap(AUTH *auth, XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr)
struct rpc_gss_data *gd;
log_debug("in authgss_wrap()");
-
+
gd = AUTH_PRIVATE(auth);
if (!gd->established || gd->sec.svc == RPCSEC_GSS_SVC_NONE) {
@@ -621,9 +621,9 @@ authgss_unwrap(AUTH *auth, XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr)
struct rpc_gss_data *gd;
log_debug("in authgss_unwrap()");
-
+
gd = AUTH_PRIVATE(auth);
-
+
if (!gd->established || gd->sec.svc == RPCSEC_GSS_SVC_NONE) {
return ((*xdr_func)(xdrs, xdr_ptr));
}
diff --git a/src/lib/rpc/auth_gssapi.c b/src/lib/rpc/auth_gssapi.c
index 69a4fd1..e7a1f8b 100644
--- a/src/lib/rpc/auth_gssapi.c
+++ b/src/lib/rpc/auth_gssapi.c
@@ -34,7 +34,7 @@ extern void gssrpcint_printf(const char *format, ...);
#define L_PRINTF(l, args)
#define AUTH_GSSAPI_DISPLAY_STATUS(args)
#endif
-
+
static void auth_gssapi_nextverf(AUTH *);
static bool_t auth_gssapi_marshall(AUTH *, XDR *);
static bool_t auth_gssapi_validate(AUTH *, struct opaque_auth *);
@@ -42,7 +42,7 @@ static bool_t auth_gssapi_refresh(AUTH *, struct rpc_msg *);
static bool_t auth_gssapi_wrap(AUTH *, XDR *, xdrproc_t, caddr_t);
static bool_t auth_gssapi_unwrap(AUTH *, XDR *, xdrproc_t, caddr_t);
static void auth_gssapi_destroy(AUTH *);
-
+
static bool_t marshall_new_creds(AUTH *, bool_t, gss_buffer_t);
static struct auth_ops auth_gssapi_ops = {
@@ -65,7 +65,7 @@ struct auth_gssapi_data {
gss_buffer_desc client_handle;
uint32_t seq_num;
int def_cred;
-
+
/* pre-serialized ah_cred */
unsigned char cred_buf[MAX_AUTH_BYTES];
uint32_t cred_len;
@@ -86,11 +86,11 @@ AUTH *auth_gssapi_create_default(CLIENT *clnt, char *service_name)
OM_uint32 gssstat, minor_stat;
gss_buffer_desc input_name;
gss_name_t target_name;
-
+
input_name.value = service_name;
input_name.length = strlen(service_name) + 1;
-
- gssstat = gss_import_name(&minor_stat, &input_name,
+
+ gssstat = gss_import_name(&minor_stat, &input_name,
gss_nt_service_name, &target_name);
if (gssstat != GSS_S_COMPLETE) {
AUTH_GSSAPI_DISPLAY_STATUS(("parsing name", gssstat,
@@ -99,7 +99,7 @@ AUTH *auth_gssapi_create_default(CLIENT *clnt, char *service_name)
rpc_createerr.cf_error.re_errno = ENOMEM;
return NULL;
}
-
+
auth = auth_gssapi_create(clnt,
&gssstat,
&minor_stat,
@@ -111,7 +111,7 @@ AUTH *auth_gssapi_create_default(CLIENT *clnt, char *service_name)
NULL,
NULL,
NULL);
-
+
gss_release_name(&minor_stat, &target_name);
return auth;
}
@@ -145,22 +145,22 @@ AUTH *auth_gssapi_create(
struct timeval timeout;
int bindings_failed;
rpcproc_t init_func;
-
+
auth_gssapi_init_arg call_arg;
auth_gssapi_init_res call_res;
gss_buffer_desc *input_token, isn_buf;
-
+
memset(&rpc_createerr, 0, sizeof(rpc_createerr));
-
+
/* this timeout is only used if clnt_control(clnt, CLSET_TIMEOUT) */
/* has not already been called.. therefore, we can just pick */
/* something reasonable-sounding.. */
timeout.tv_sec = 30;
timeout.tv_usec = 0;
-
+
auth = NULL;
pdata = NULL;
-
+
/* don't assume the caller will want to change clnt->cl_auth */
save_auth = clnt->cl_auth;
@@ -178,23 +178,23 @@ AUTH *auth_gssapi_create(
}
memset(auth, 0, sizeof(*auth));
memset(pdata, 0, sizeof(*pdata));
-
+
auth->ah_ops = &auth_gssapi_ops;
auth->ah_private = (caddr_t) pdata;
-
+
/* initial creds are auth_msg TRUE and no handle */
marshall_new_creds(auth, TRUE, NULL);
-
+
/* initial verifier is empty */
auth->ah_verf.oa_flavor = AUTH_GSSAPI;
auth->ah_verf.oa_base = NULL;
auth->ah_verf.oa_length = 0;
-
+
AUTH_PRIVATE(auth)->established = FALSE;
AUTH_PRIVATE(auth)->clnt = clnt;
AUTH_PRIVATE(auth)->def_cred = (claimant_cred_handle ==
GSS_C_NO_CREDENTIAL);
-
+
clnt->cl_auth = auth;
/* start by trying latest version */
@@ -237,7 +237,7 @@ try_new_version:
bindings.initiator_addrtype = GSS_C_AF_INET;
bindings.initiator_address.length = 4;
bindings.initiator_address.value = &laddr.sin_addr.s_addr;
-
+
bindings.acceptor_addrtype = GSS_C_AF_INET;
bindings.acceptor_address.length = 4;
bindings.acceptor_address.value = &raddr.sin_addr.s_addr;
@@ -245,9 +245,9 @@ try_new_version:
} else {
bindp = NULL;
}
-
+
memset(&call_res, 0, sizeof(call_res));
-
+
next_token:
*gssstat = gss_init_sec_context(minor_stat,
claimant_cred_handle,
@@ -262,16 +262,16 @@ next_token:
&call_arg.token,
ret_flags,
time_rec);
-
+
if (*gssstat != GSS_S_COMPLETE && *gssstat != GSS_S_CONTINUE_NEEDED) {
AUTH_GSSAPI_DISPLAY_STATUS(("initializing context", *gssstat,
*minor_stat));
goto cleanup;
}
-
+
/* if we got a token, pass it on */
if (call_arg.token.length != 0) {
-
+
/*
* sanity check: if we received a signed isn in the last
* response then there *cannot* be another token to send
@@ -280,16 +280,16 @@ next_token:
PRINTF(("gssapi_create: unexpected token from init_sec\n"));
goto cleanup;
}
-
+
PRINTF(("gssapi_create: calling GSSAPI_INIT (%d)\n", init_func));
-
+
memset(&call_res, 0, sizeof(call_res));
callstat = clnt_call(clnt, init_func,
xdr_authgssapi_init_arg, &call_arg,
xdr_authgssapi_init_res, &call_res,
timeout);
gss_release_buffer(minor_stat, &call_arg.token);
-
+
if (callstat != RPC_SUCCESS) {
struct rpc_err err;
@@ -306,7 +306,7 @@ next_token:
PRINTF(("gssapi_create: GSSAPI_INIT (%d) failed, stat %d\n",
init_func, callstat));
}
-
+
goto cleanup;
} else if (call_res.version != call_arg.version &&
!(call_arg.version == 2 && call_res.version == 1)) {
@@ -332,10 +332,10 @@ next_token:
call_res.gss_minor));
goto cleanup;
}
-
+
PRINTF(("gssapi_create: GSSAPI_INIT (%d) succeeded\n", init_func));
init_func = AUTH_GSSAPI_CONTINUE_INIT;
-
+
/* check for client_handle */
if (AUTH_PRIVATE(auth)->client_handle.length == 0) {
if (call_res.client_handle.length == 0) {
@@ -344,20 +344,20 @@ next_token:
} else {
PRINTF(("gssapi_create: got client_handle %d\n",
*((uint32_t *)call_res.client_handle.value)));
-
+
GSS_DUP_BUFFER(AUTH_PRIVATE(auth)->client_handle,
call_res.client_handle);
-
+
/* auth_msg is TRUE; there may be more tokens */
marshall_new_creds(auth, TRUE,
- &AUTH_PRIVATE(auth)->client_handle);
+ &AUTH_PRIVATE(auth)->client_handle);
}
} else if (!GSS_BUFFERS_EQUAL(AUTH_PRIVATE(auth)->client_handle,
call_res.client_handle)) {
PRINTF(("gssapi_create: got different client_handle\n"));
goto cleanup;
}
-
+
/* check for token */
if (call_res.token.length==0 && *gssstat==GSS_S_CONTINUE_NEEDED) {
PRINTF(("gssapi_create: expected token\n"));
@@ -373,7 +373,7 @@ next_token:
}
}
}
-
+
/* check for isn */
if (*gssstat == GSS_S_COMPLETE) {
if (call_res.signed_isn.length == 0) {
@@ -381,67 +381,67 @@ next_token:
goto cleanup;
} else {
PRINTF(("gssapi_create: processing signed isn\n"));
-
+
/* don't check conf (integ only) or qop (accpet default) */
*gssstat = gss_unseal(minor_stat,
AUTH_PRIVATE(auth)->context,
&call_res.signed_isn,
&isn_buf, NULL, NULL);
-
+
if (*gssstat != GSS_S_COMPLETE) {
AUTH_GSSAPI_DISPLAY_STATUS(("unsealing isn",
- *gssstat, *minor_stat));
+ *gssstat, *minor_stat));
goto cleanup;
} else if (isn_buf.length != sizeof(uint32_t)) {
PRINTF(("gssapi_create: gss_unseal gave %d bytes\n",
(int) isn_buf.length));
goto cleanup;
}
-
+
AUTH_PRIVATE(auth)->seq_num = (uint32_t)
- ntohl(*((uint32_t*)isn_buf.value));
+ ntohl(*((uint32_t*)isn_buf.value));
*gssstat = gss_release_buffer(minor_stat, &isn_buf);
if (*gssstat != GSS_S_COMPLETE) {
AUTH_GSSAPI_DISPLAY_STATUS(("releasing unsealed isn",
*gssstat, *minor_stat));
goto cleanup;
}
-
+
PRINTF(("gssapi_create: isn is %d\n",
AUTH_PRIVATE(auth)->seq_num));
-
+
/* we no longer need these results.. */
xdr_free(xdr_authgssapi_init_res, &call_res);
}
} else if (call_res.signed_isn.length != 0) {
PRINTF(("gssapi_create: got signed isn, can't check yet\n"));
}
-
+
/* results were okay.. continue if necessary */
if (*gssstat == GSS_S_CONTINUE_NEEDED) {
PRINTF(("gssapi_create: not done, continuing\n"));
goto next_token;
}
-
+
/*
* Done! Context is established, we have client_handle and isn.
*/
AUTH_PRIVATE(auth)->established = TRUE;
-
+
marshall_new_creds(auth, FALSE,
- &AUTH_PRIVATE(auth)->client_handle);
-
+ &AUTH_PRIVATE(auth)->client_handle);
+
PRINTF(("gssapi_create: done. client_handle %#x, isn %d\n\n",
*((uint32_t *)AUTH_PRIVATE(auth)->client_handle.value),
AUTH_PRIVATE(auth)->seq_num));
-
+
/* don't assume the caller will want to change clnt->cl_auth */
clnt->cl_auth = save_auth;
-
+
return auth;
-
+
/******************************************************************/
-
+
cleanup:
PRINTF(("gssapi_create: bailing\n\n"));
@@ -452,13 +452,13 @@ cleanup:
free(auth);
auth = NULL;
}
-
+
/* don't assume the caller will want to change clnt->cl_auth */
clnt->cl_auth = save_auth;
-
+
if (rpc_createerr.cf_stat == 0)
rpc_createerr.cf_stat = RPC_AUTHERROR;
-
+
return auth;
}
@@ -480,7 +480,7 @@ cleanup:
* Requires: auth must point to a valid GSS-API auth structure, auth_msg
* must be TRUE or FALSE, client_handle must be a gss_buffer_t with a valid
* value and length field or NULL.
- *
+ *
* Effects: auth->ah_cred is set to the serialized auth_gssapi_creds
* version 2 structure (stored in the cred_buf field of private data)
* containing version, auth_msg and client_handle.
@@ -496,11 +496,11 @@ static bool_t marshall_new_creds(
{
auth_gssapi_creds creds;
XDR xdrs;
-
+
PRINTF(("marshall_new_creds: starting\n"));
creds.version = 2;
-
+
creds.auth_msg = auth_msg;
if (client_handle)
GSS_COPY_BUFFER(creds.client_handle, *client_handle)
@@ -508,7 +508,7 @@ static bool_t marshall_new_creds(
creds.client_handle.length = 0;
creds.client_handle.value = NULL;
}
-
+
xdrmem_create(&xdrs, (caddr_t) AUTH_PRIVATE(auth)->cred_buf,
MAX_AUTH_BYTES, XDR_ENCODE);
if (! xdr_authgssapi_creds(&xdrs, &creds)) {
@@ -518,16 +518,16 @@ static bool_t marshall_new_creds(
}
AUTH_PRIVATE(auth)->cred_len = xdr_getpos(&xdrs);
XDR_DESTROY(&xdrs);
-
+
PRINTF(("marshall_new_creds: auth_gssapi_creds is %d bytes\n",
AUTH_PRIVATE(auth)->cred_len));
-
+
auth->ah_cred.oa_flavor = AUTH_GSSAPI;
auth->ah_cred.oa_base = (char *) AUTH_PRIVATE(auth)->cred_buf;
auth->ah_cred.oa_length = AUTH_PRIVATE(auth)->cred_len;
-
+
PRINTF(("marshall_new_creds: succeeding\n"));
-
+
return TRUE;
}
@@ -556,13 +556,13 @@ static void auth_gssapi_nextverf(AUTH *auth)
* Returns: boolean indicating success/failure
*
* Effects:
- *
+ *
* The pre-serialized credentials in cred_buf are serialized. If the
* context is established, the sealed sequence number is serialized as
* the verifier. If the context is not established, an empty verifier
* is serialized. The sequence number is *not* incremented, because
* this function is called multiple times if retransmission is required.
- *
+ *
* If this took all the header fields as arguments, it could sign
* them.
*/
@@ -573,22 +573,22 @@ static bool_t auth_gssapi_marshall(
OM_uint32 minor_stat;
gss_buffer_desc out_buf;
uint32_t seq_num;
-
+
if (AUTH_PRIVATE(auth)->established == TRUE) {
PRINTF(("gssapi_marshall: starting\n"));
-
+
seq_num = AUTH_PRIVATE(auth)->seq_num + 1;
-
+
PRINTF(("gssapi_marshall: sending seq_num %d\n", seq_num));
-
+
if (auth_gssapi_seal_seq(AUTH_PRIVATE(auth)->context, seq_num,
&out_buf) == FALSE) {
PRINTF(("gssapi_marhshall: seal failed\n"));
}
-
+
auth->ah_verf.oa_base = out_buf.value;
auth->ah_verf.oa_length = out_buf.length;
-
+
if (! xdr_opaque_auth(xdrs, &auth->ah_cred) ||
! xdr_opaque_auth(xdrs, &auth->ah_verf)) {
(void) gss_release_buffer(&minor_stat, &out_buf);
@@ -597,16 +597,16 @@ static bool_t auth_gssapi_marshall(
(void) gss_release_buffer(&minor_stat, &out_buf);
} else {
PRINTF(("gssapi_marshall: not established, sending null verf\n"));
-
+
auth->ah_verf.oa_base = NULL;
auth->ah_verf.oa_length = 0;
-
+
if (! xdr_opaque_auth(xdrs, &auth->ah_cred) ||
! xdr_opaque_auth(xdrs, &auth->ah_verf)) {
return FALSE;
}
}
-
+
return TRUE;
}
@@ -623,14 +623,14 @@ static bool_t auth_gssapi_validate(
{
gss_buffer_desc in_buf;
uint32_t seq_num;
-
+
if (AUTH_PRIVATE(auth)->established == FALSE) {
PRINTF(("gssapi_validate: not established, noop\n"));
return TRUE;
}
-
+
PRINTF(("gssapi_validate: starting\n"));
-
+
in_buf.length = verf->oa_length;
in_buf.value = verf->oa_base;
if (auth_gssapi_unseal_seq(AUTH_PRIVATE(auth)->context, &in_buf,
@@ -638,7 +638,7 @@ static bool_t auth_gssapi_validate(
PRINTF(("gssapi_validate: failed unsealing verifier\n"));
return FALSE;
}
-
+
/* we sent seq_num+1, so we should get back seq_num+2 */
if (AUTH_PRIVATE(auth)->seq_num+2 != seq_num) {
PRINTF(("gssapi_validate: expecting seq_num %d, got %d (%#x)\n",
@@ -646,12 +646,12 @@ static bool_t auth_gssapi_validate(
return FALSE;
}
PRINTF(("gssapi_validate: seq_num %d okay\n", seq_num));
-
+
/* +1 for successful transmission, +1 for successful validation */
AUTH_PRIVATE(auth)->seq_num += 2;
-
+
PRINTF(("gssapi_validate: succeeding\n"));
-
+
return TRUE;
}
@@ -661,7 +661,7 @@ static bool_t auth_gssapi_validate(
* Purpose: Attempts to resyncrhonize the sequence number.
*
* Effects:
- *
+ *
* When the server receives a properly authenticated RPC call, it
* increments the sequence number it is expecting from the client.
* But if the server's response is lost for any reason, the client
@@ -706,18 +706,18 @@ static void auth_gssapi_destroy(AUTH *auth)
OM_uint32 gssstat, minor_stat;
gss_cred_id_t cred;
int callstat;
-
+
if (AUTH_PRIVATE(auth)->client_handle.length == 0) {
PRINTF(("gssapi_destroy: no client_handle, not calling destroy\n"));
goto skip_call;
}
-
+
PRINTF(("gssapi_destroy: marshalling new creds\n"));
if (!marshall_new_creds(auth, TRUE, &AUTH_PRIVATE(auth)->client_handle)) {
PRINTF(("gssapi_destroy: marshall_new_creds failed\n"));
goto skip_call;
}
-
+
PRINTF(("gssapi_destroy: calling GSSAPI_DESTROY\n"));
timeout.tv_sec = 1;
timeout.tv_usec = 0;
@@ -726,7 +726,7 @@ static void auth_gssapi_destroy(AUTH *auth)
if (callstat != RPC_SUCCESS)
clnt_sperror(AUTH_PRIVATE(auth)->clnt,
"gssapi_destroy: GSSAPI_DESTROY failed");
-
+
skip_call:
PRINTF(("gssapi_destroy: deleting context\n"));
gssstat = gss_delete_sec_context(&minor_stat,
@@ -742,18 +742,18 @@ skip_call:
AUTH_GSSAPI_DISPLAY_STATUS(("deleting default credential",
gssstat, minor_stat));
}
-
+
if (AUTH_PRIVATE(auth)->client_handle.length != 0)
gss_release_buffer(&minor_stat,
&AUTH_PRIVATE(auth)->client_handle);
-
+
#if 0
PRINTF(("gssapi_destroy: calling GSSAPI_EXIT\n"));
AUTH_PRIVATE(auth)->established = FALSE;
callstat = clnt_call(AUTH_PRIVATE(auth)->clnt, AUTH_GSSAPI_EXIT,
xdr_void, NULL, xdr_void, NULL, timeout);
#endif
-
+
free(auth->ah_private);
free(auth);
PRINTF(("gssapi_destroy: done\n"));
@@ -774,7 +774,7 @@ static bool_t auth_gssapi_wrap(
caddr_t xdr_ptr)
{
OM_uint32 gssstat, minor_stat;
-
+
if (! AUTH_PRIVATE(auth)->established) {
PRINTF(("gssapi_wrap: context not established, noop\n"));
return (*xdr_func)(out_xdrs, xdr_ptr);
@@ -805,7 +805,7 @@ static bool_t auth_gssapi_unwrap(
caddr_t xdr_ptr)
{
OM_uint32 gssstat, minor_stat;
-
+
if (! AUTH_PRIVATE(auth)->established) {
PRINTF(("gssapi_unwrap: context not established, noop\n"));
return (*xdr_func)(in_xdrs, xdr_ptr);
diff --git a/src/lib/rpc/auth_gssapi_misc.c b/src/lib/rpc/auth_gssapi_misc.c
index 908ac0c..e1f9205 100644
--- a/src/lib/rpc/auth_gssapi_misc.c
+++ b/src/lib/rpc/auth_gssapi_misc.c
@@ -27,10 +27,10 @@ extern void gssrpcint_printf(const char *, ...);
#define L_PRINTF(l, args)
#define AUTH_GSSAPI_DISPLAY_STATUS(args)
#endif
-
+
static void auth_gssapi_display_status_1
(char *, OM_uint32, int, int);
-
+
bool_t xdr_gss_buf(
XDR *xdrs,
gss_buffer_t buf)
@@ -95,9 +95,9 @@ bool_t auth_gssapi_seal_seq(
gss_buffer_desc in_buf;
OM_uint32 gssstat, minor_stat;
uint32_t nl_seq_num;
-
+
nl_seq_num = htonl(seq_num);
-
+
in_buf.length = sizeof(uint32_t);
in_buf.value = (char *) &nl_seq_num;
gssstat = gss_seal(&minor_stat, context, 0, GSS_C_QOP_DEFAULT,
@@ -119,13 +119,13 @@ bool_t auth_gssapi_unseal_seq(
gss_buffer_desc out_buf;
OM_uint32 gssstat, minor_stat;
uint32_t nl_seq_num;
-
+
gssstat = gss_unseal(&minor_stat, context, in_buf, &out_buf,
NULL, NULL);
if (gssstat != GSS_S_COMPLETE) {
PRINTF(("gssapi_unseal_seq: failed\n"));
AUTH_GSSAPI_DISPLAY_STATUS(("unsealing sequence number",
- gssstat, minor_stat));
+ gssstat, minor_stat));
return FALSE;
} else if (out_buf.length != sizeof(uint32_t)) {
PRINTF(("gssapi_unseal_seq: unseal gave %d bytes\n",
@@ -133,11 +133,11 @@ bool_t auth_gssapi_unseal_seq(
gss_release_buffer(&minor_stat, &out_buf);
return FALSE;
}
-
+
nl_seq_num = *((uint32_t *) out_buf.value);
*seq_num = (uint32_t) ntohl(nl_seq_num);
gss_release_buffer(&minor_stat, &out_buf);
-
+
return TRUE;
}
@@ -159,7 +159,7 @@ static void auth_gssapi_display_status_1(
OM_uint32 gssstat, minor_stat;
gss_buffer_desc msg;
OM_uint32 msg_ctx;
-
+
msg_ctx = 0;
while (1) {
gssstat = gss_display_status(&minor_stat, code,
@@ -167,7 +167,7 @@ static void auth_gssapi_display_status_1(
&msg_ctx, &msg);
if (gssstat != GSS_S_COMPLETE) {
if (!rec) {
- auth_gssapi_display_status_1(m,gssstat,GSS_C_GSS_CODE,1);
+ auth_gssapi_display_status_1(m,gssstat,GSS_C_GSS_CODE,1);
auth_gssapi_display_status_1(m, minor_stat,
GSS_C_MECH_CODE, 1);
} else {
@@ -185,7 +185,7 @@ static void auth_gssapi_display_status_1(
gssrpcint_printf("GSS-API authentication error %s: %*s\n",
m, msg.length, (char *) msg.value);
(void) gss_release_buffer(&minor_stat, &msg);
-
+
if (!msg_ctx)
break;
}
@@ -204,14 +204,14 @@ bool_t auth_gssapi_wrap_data(
XDR temp_xdrs;
int conf_state;
unsigned int length;
-
+
PRINTF(("gssapi_wrap_data: starting\n"));
-
+
*major = GSS_S_COMPLETE;
*minor = 0; /* assumption */
-
+
xdralloc_create(&temp_xdrs, XDR_ENCODE);
-
+
/* serialize the sequence number into local memory */
PRINTF(("gssapi_wrap_data: encoding seq_num %d\n", seq_num));
if (! xdr_u_int32(&temp_xdrs, &seq_num)) {
@@ -219,17 +219,17 @@ bool_t auth_gssapi_wrap_data(
XDR_DESTROY(&temp_xdrs);
return FALSE;
}
-
+
/* serialize the arguments into local memory */
if (!(*xdr_func)(&temp_xdrs, xdr_ptr)) {
PRINTF(("gssapi_wrap_data: serializing arguments failed\n"));
XDR_DESTROY(&temp_xdrs);
return FALSE;
}
-
+
in_buf.length = xdr_getpos(&temp_xdrs);
in_buf.value = xdralloc_getdata(&temp_xdrs);
-
+
*major = gss_seal(minor, context, 1,
GSS_C_QOP_DEFAULT, &in_buf, &conf_state,
&out_buf);
@@ -237,22 +237,22 @@ bool_t auth_gssapi_wrap_data(
XDR_DESTROY(&temp_xdrs);
return FALSE;
}
-
+
PRINTF(("gssapi_wrap_data: %d bytes data, %d bytes sealed\n",
(int) in_buf.length, (int) out_buf.length));
-
+
/* write the token */
length = out_buf.length;
- if (! xdr_bytes(out_xdrs, (char **) &out_buf.value,
+ if (! xdr_bytes(out_xdrs, (char **) &out_buf.value,
(unsigned int *) &length,
out_buf.length)) {
PRINTF(("gssapi_wrap_data: serializing encrypted data failed\n"));
XDR_DESTROY(&temp_xdrs);
return FALSE;
}
-
+
*major = gss_release_buffer(minor, &out_buf);
-
+
PRINTF(("gssapi_wrap_data: succeeding\n\n"));
XDR_DESTROY(&temp_xdrs);
return TRUE;
@@ -272,12 +272,12 @@ bool_t auth_gssapi_unwrap_data(
uint32_t verf_seq_num;
int conf, qop;
unsigned int length;
-
+
PRINTF(("gssapi_unwrap_data: starting\n"));
-
+
*major = GSS_S_COMPLETE;
*minor = 0; /* assumption */
-
+
in_buf.value = NULL;
out_buf.value = NULL;
if (! xdr_bytes(in_xdrs, (char **) &in_buf.value,
@@ -289,18 +289,18 @@ bool_t auth_gssapi_unwrap_data(
return FALSE;
}
in_buf.length = length;
-
+
*major = gss_unseal(minor, context, &in_buf, &out_buf, &conf,
&qop);
free(in_buf.value);
if (*major != GSS_S_COMPLETE)
return FALSE;
-
+
PRINTF(("gssapi_unwrap_data: %d bytes data, %d bytes sealed\n",
out_buf.length, in_buf.length));
-
+
xdrmem_create(&temp_xdrs, out_buf.value, out_buf.length, XDR_DECODE);
-
+
/* deserialize the sequence number */
if (! xdr_u_int32(&temp_xdrs, &verf_seq_num)) {
PRINTF(("gssapi_unwrap_data: deserializing verf_seq_num failed\n"));
@@ -316,7 +316,7 @@ bool_t auth_gssapi_unwrap_data(
return FALSE;
}
PRINTF(("gssapi_unwrap_data: unwrap seq_num %d okay\n", verf_seq_num));
-
+
/* deserialize the arguments into xdr_ptr */
if (! (*xdr_func)(&temp_xdrs, xdr_ptr)) {
PRINTF(("gssapi_unwrap_data: deserializing arguments failed\n"));
@@ -325,9 +325,9 @@ bool_t auth_gssapi_unwrap_data(
XDR_DESTROY(&temp_xdrs);
return FALSE;
}
-
+
PRINTF(("gssapi_unwrap_data: succeeding\n\n"));
-
+
gss_release_buffer(minor, &out_buf);
XDR_DESTROY(&temp_xdrs);
return TRUE;
diff --git a/src/lib/rpc/auth_none.c b/src/lib/rpc/auth_none.c
index f4869aa..2e17622 100644
--- a/src/lib/rpc/auth_none.c
+++ b/src/lib/rpc/auth_none.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -33,10 +33,10 @@ static char sccsid[] = "@(#)auth_none.c 1.19 87/08/11 Copyr 1984 Sun Micro";
/*
* auth_none.c
- * Creates a client authentication handle for passing "null"
- * credentials and verifiers to remote systems.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
+ * Creates a client authentication handle for passing "null"
+ * credentials and verifiers to remote systems.
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
*/
#include <gssrpc/types.h>
@@ -111,7 +111,7 @@ authnone_marshal(AUTH *client, XDR *xdrs)
}
/*ARGSUSED*/
-static void
+static void
authnone_verf(AUTH *auth)
{
}
diff --git a/src/lib/rpc/auth_unix.c b/src/lib/rpc/auth_unix.c
index eaa8427..ad7b505 100644
--- a/src/lib/rpc/auth_unix.c
+++ b/src/lib/rpc/auth_unix.c
@@ -6,11 +6,11 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
@@ -18,11 +18,11 @@
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -32,8 +32,8 @@ static char sccsid[] = "@(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro";
#endif
/*
- * auth_unix.c, Implements UNIX style authentication parameters.
- *
+ * auth_unix.c, Implements UNIX style authentication parameters.
+ *
* Copyright (C) 1984, Sun Microsystems, Inc.
*
* The system is very weak. The client uses no encryption for it's
@@ -145,7 +145,7 @@ authunix_create(
* Serialize the parameters into origcred
*/
xdrmem_create(&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE);
- if (! xdr_authunix_parms(&xdrs, &aup))
+ if (! xdr_authunix_parms(&xdrs, &aup))
abort();
au->au_origcred.oa_length = len = XDR_GETPOS(&xdrs);
au->au_origcred.oa_flavor = AUTH_UNIX;
@@ -261,7 +261,7 @@ authunix_refresh(register AUTH *auth, struct rpc_msg *msg)
xdrmem_create(&xdrs, au->au_origcred.oa_base,
au->au_origcred.oa_length, XDR_DECODE);
stat = xdr_authunix_parms(&xdrs, &aup);
- if (! stat)
+ if (! stat)
goto done;
/* update the time and serialize in place */
diff --git a/src/lib/rpc/authgss_prot.c b/src/lib/rpc/authgss_prot.c
index ab6e7fe..31a8dda 100644
--- a/src/lib/rpc/authgss_prot.c
+++ b/src/lib/rpc/authgss_prot.c
@@ -1,12 +1,12 @@
/*
authgss_prot.c
-
+
Copyright (c) 2000 The Regents of the University of Michigan.
All rights reserved.
-
+
Copyright (c) 2000 Dug Song <dugsong@UMICH.EDU>.
All rights reserved, all wrongs reversed.
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
@@ -98,7 +98,7 @@ xdr_rpc_gss_init_args(XDR *xdrs, gss_buffer_desc *p)
(xdrs->x_op == XDR_ENCODE) ? "encode" : "decode",
(xdr_stat == TRUE) ? "success" : "failure",
p->value, p->length);
-
+
return (xdr_stat);
}
@@ -120,7 +120,7 @@ xdr_rpc_gss_init_res(XDR *xdrs, struct rpc_gss_init_res *p)
p->gr_ctx.value, p->gr_ctx.length,
p->gr_major, p->gr_minor, p->gr_win,
p->gr_token.value, p->gr_token.length);
-
+
return (xdr_stat);
}
@@ -138,7 +138,7 @@ xdr_rpc_gss_wrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
xdralloc_create(&tmpxdrs, XDR_ENCODE);
xdr_stat = FALSE;
-
+
/* Marshal rpc_gss_data_t (sequence number + arguments). */
if (!xdr_u_int32(&tmpxdrs, &seq) || !(*xdr_func)(&tmpxdrs, xdr_ptr))
goto errout;
@@ -161,7 +161,7 @@ xdr_rpc_gss_wrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
/* Marshal checksum. */
xdr_stat = xdr_rpc_gss_buf(xdrs, &wrapbuf, (unsigned int)-1);
gss_release_buffer(&min_stat, &wrapbuf);
- }
+ }
else if (svc == RPCSEC_GSS_SVC_PRIVACY) {
/* Encrypt rpc_gss_data_t. */
maj_stat = gss_wrap(&min_stat, ctx, TRUE, qop, &databuf,
@@ -194,10 +194,10 @@ xdr_rpc_gss_unwrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
if (xdr_func == xdr_void || xdr_ptr == NULL)
return (TRUE);
-
+
memset(&databuf, 0, sizeof(databuf));
memset(&wrapbuf, 0, sizeof(wrapbuf));
-
+
if (svc == RPCSEC_GSS_SVC_INTEGRITY) {
/* Decode databody_integ. */
if (!xdr_rpc_gss_buf(xdrs, &databuf, (unsigned int)-1)) {
@@ -214,7 +214,7 @@ xdr_rpc_gss_unwrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
maj_stat = gss_verify_mic(&min_stat, ctx, &databuf,
&wrapbuf, &qop_state);
gss_release_buffer(&min_stat, &wrapbuf);
-
+
if (maj_stat != GSS_S_COMPLETE || qop_state != qop) {
gss_release_buffer(&min_stat, &databuf);
log_status("gss_verify_mic", maj_stat, min_stat);
@@ -230,9 +230,9 @@ xdr_rpc_gss_unwrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
/* Decrypt databody. */
maj_stat = gss_unwrap(&min_stat, ctx, &wrapbuf, &databuf,
&conf_state, &qop_state);
-
+
gss_release_buffer(&min_stat, &wrapbuf);
-
+
/* Verify encryption and QOP. */
if (maj_stat != GSS_S_COMPLETE || qop_state != qop ||
conf_state != TRUE) {
@@ -247,7 +247,7 @@ xdr_rpc_gss_unwrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
(*xdr_func)(&tmpxdrs, xdr_ptr));
XDR_DESTROY(&tmpxdrs);
gss_release_buffer(&min_stat, &databuf);
-
+
/* Verify sequence number. */
if (xdr_stat == TRUE && seq_num != seq) {
log_debug("wrong sequence number in databody");
@@ -262,7 +262,7 @@ xdr_rpc_gss_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
rpc_gss_svc_t svc, uint32_t seq)
{
switch (xdrs->x_op) {
-
+
case XDR_ENCODE:
return (xdr_rpc_gss_wrap_data(xdrs, xdr_func, xdr_ptr,
ctx, qop, svc, seq));
@@ -316,13 +316,13 @@ log_hexdump(const u_char *buf, int len, int offset)
{
u_int i, j, jm;
int c;
-
+
fprintf(stderr, "\n");
for (i = 0; i < len; i += 0x10) {
fprintf(stderr, " %04x: ", (u_int)(i + offset));
jm = len - i;
jm = jm > 16 ? 16 : jm;
-
+
for (j = 0; j < jm; j++) {
if ((j % 2) == 1)
fprintf(stderr, "%02x ", (u_int) buf[i+j]);
@@ -334,7 +334,7 @@ log_hexdump(const u_char *buf, int len, int offset)
else fprintf(stderr, " ");
}
fprintf(stderr, " ");
-
+
for (j = 0; j < jm; j++) {
c = buf[i+j];
c = isprint(c) ? c : '.';
@@ -362,5 +362,3 @@ log_hexdump(const u_char *buf, int len, int offset)
}
#endif
-
-
diff --git a/src/lib/rpc/authunix_prot.c b/src/lib/rpc/authunix_prot.c
index 7eb47a4..4d20b01 100644
--- a/src/lib/rpc/authunix_prot.c
+++ b/src/lib/rpc/authunix_prot.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -61,4 +61,3 @@ xdr_authunix_parms(register XDR *xdrs, register struct authunix_parms *p)
}
return (FALSE);
}
-
diff --git a/src/lib/rpc/bindresvport.c b/src/lib/rpc/bindresvport.c
index d1ec654..62cc529 100644
--- a/src/lib/rpc/bindresvport.c
+++ b/src/lib/rpc/bindresvport.c
@@ -8,23 +8,23 @@ static char sccsid[] = "@(#)bindresvport.c 2.2 88/07/29 4.0 RPCSRC 1.8 88/02/08
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
diff --git a/src/lib/rpc/clnt_generic.c b/src/lib/rpc/clnt_generic.c
index 696e5a2..880b0df 100644
--- a/src/lib/rpc/clnt_generic.c
+++ b/src/lib/rpc/clnt_generic.c
@@ -6,11 +6,11 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
@@ -18,11 +18,11 @@
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -42,7 +42,7 @@ static char sccsid[] = "@(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI";
/*
* Generic client creation: takes (hostname, program-number, protocol) and
- * returns client handle. Default options are set, which the user can
+ * returns client handle. Default options are set, which the user can
* change using the rpc equivalent of ioctl()'s.
*/
CLIENT *
@@ -69,7 +69,7 @@ clnt_create(
* Only support INET for now
*/
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
- rpc_createerr.cf_error.re_errno = EAFNOSUPPORT;
+ rpc_createerr.cf_error.re_errno = EAFNOSUPPORT;
return (NULL);
}
memset(&sockin, 0, sizeof(sockin));
@@ -82,7 +82,7 @@ clnt_create(
p = getprotobyname(proto);
if (p == NULL) {
rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
- rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;
+ rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;
return (NULL);
}
sock = RPC_ANYSOCK;
@@ -108,7 +108,7 @@ clnt_create(
break;
default:
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
- rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;
+ rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;
return (NULL);
}
return (client);
diff --git a/src/lib/rpc/clnt_perror.c b/src/lib/rpc/clnt_perror.c
index 09b4322..7a469fb 100644
--- a/src/lib/rpc/clnt_perror.c
+++ b/src/lib/rpc/clnt_perror.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -100,7 +100,7 @@ clnt_sperror(CLIENT *rpch, char *s)
case RPC_SUCCESS:
case RPC_CANTENCODEARGS:
case RPC_CANTDECODERES:
- case RPC_TIMEDOUT:
+ case RPC_TIMEDOUT:
case RPC_PROGUNAVAIL:
case RPC_PROCUNAVAIL:
case RPC_CANTDECODEARGS:
@@ -117,7 +117,7 @@ clnt_sperror(CLIENT *rpch, char *s)
/* 10 for the string */
if (str - bufstart + 10 + strlen(strerror(e.re_errno)) < BUFSIZ)
(void) snprintf(str, strend-str, "; errno = %s",
- strerror(e.re_errno));
+ strerror(e.re_errno));
str += strlen(str);
break;
@@ -125,7 +125,7 @@ clnt_sperror(CLIENT *rpch, char *s)
/* 33 for the string, 22 for the numbers */
if(str - bufstart + 33 + 22 < BUFSIZ)
(void) snprintf(str, strend-str,
- "; low version = %lu, high version = %lu",
+ "; low version = %lu, high version = %lu",
(u_long) e.re_vers.low,
(u_long) e.re_vers.high);
str += strlen(str);
@@ -188,41 +188,41 @@ struct rpc_errtab {
};
static struct rpc_errtab rpc_errlist[] = {
- { RPC_SUCCESS,
- "RPC: Success" },
- { RPC_CANTENCODEARGS,
+ { RPC_SUCCESS,
+ "RPC: Success" },
+ { RPC_CANTENCODEARGS,
"RPC: Can't encode arguments" },
- { RPC_CANTDECODERES,
+ { RPC_CANTDECODERES,
"RPC: Can't decode result" },
- { RPC_CANTSEND,
+ { RPC_CANTSEND,
"RPC: Unable to send" },
- { RPC_CANTRECV,
+ { RPC_CANTRECV,
"RPC: Unable to receive" },
- { RPC_TIMEDOUT,
+ { RPC_TIMEDOUT,
"RPC: Timed out" },
- { RPC_VERSMISMATCH,
+ { RPC_VERSMISMATCH,
"RPC: Incompatible versions of RPC" },
- { RPC_AUTHERROR,
+ { RPC_AUTHERROR,
"RPC: Authentication error" },
- { RPC_PROGUNAVAIL,
+ { RPC_PROGUNAVAIL,
"RPC: Program unavailable" },
- { RPC_PROGVERSMISMATCH,
+ { RPC_PROGVERSMISMATCH,
"RPC: Program/version mismatch" },
- { RPC_PROCUNAVAIL,
+ { RPC_PROCUNAVAIL,
"RPC: Procedure unavailable" },
- { RPC_CANTDECODEARGS,
+ { RPC_CANTDECODEARGS,
"RPC: Server can't decode arguments" },
- { RPC_SYSTEMERROR,
+ { RPC_SYSTEMERROR,
"RPC: Remote system error" },
- { RPC_UNKNOWNHOST,
+ { RPC_UNKNOWNHOST,
"RPC: Unknown host" },
{ RPC_UNKNOWNPROTO,
"RPC: Unknown protocol" },
- { RPC_PMAPFAILURE,
+ { RPC_PMAPFAILURE,
"RPC: Port mapper failure" },
- { RPC_PROGNOTREGISTERED,
+ { RPC_PROGNOTREGISTERED,
"RPC: Program not registered"},
- { RPC_FAILED,
+ { RPC_FAILED,
"RPC: Failed (unspecified error)"}
};
@@ -313,7 +313,7 @@ clnt_pcreateerror(char *s)
}
struct auth_errtab {
- enum auth_stat status;
+ enum auth_stat status;
char *message;
};
diff --git a/src/lib/rpc/clnt_raw.c b/src/lib/rpc/clnt_raw.c
index 06b078e..e2fdc35 100644
--- a/src/lib/rpc/clnt_raw.c
+++ b/src/lib/rpc/clnt_raw.c
@@ -6,11 +6,11 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
@@ -18,11 +18,11 @@
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -60,8 +60,8 @@ static struct clntraw_private {
u_int mcnt;
} *clntraw_private;
-static enum clnt_stat clntraw_call(CLIENT *, rpcproc_t, xdrproc_t,
- void *, xdrproc_t, void *,
+static enum clnt_stat clntraw_call(CLIENT *, rpcproc_t, xdrproc_t,
+ void *, xdrproc_t, void *,
struct timeval);
static void clntraw_abort(CLIENT *);
static void clntraw_geterr(CLIENT *, struct rpc_err *);
@@ -106,7 +106,7 @@ clntraw_create(
call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
call_msg.rm_call.cb_prog = prog;
call_msg.rm_call.cb_vers = vers;
- xdrmem_create(xdrs, clp->u.mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE);
+ xdrmem_create(xdrs, clp->u.mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE);
if (! xdr_callhdr(xdrs, &call_msg)) {
perror("clnt_raw.c - Fatal header serialization error.");
}
@@ -126,7 +126,7 @@ clntraw_create(
return (client);
}
-static enum clnt_stat
+static enum clnt_stat
clntraw_call(
CLIENT *h,
rpcproc_t proc,
diff --git a/src/lib/rpc/clnt_simple.c b/src/lib/rpc/clnt_simple.c
index 3649c80..d5dbb5a 100644
--- a/src/lib/rpc/clnt_simple.c
+++ b/src/lib/rpc/clnt_simple.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -31,7 +31,7 @@
static char sccsid[] = "@(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";
#endif
-/*
+/*
* clnt_simple.c
* Simplified front end to rpc.
*
@@ -89,7 +89,7 @@ callrpc(
}
if (crp->valid && crp->oldprognum == prognum && crp->oldversnum == versnum
&& strcmp(crp->oldhost, host) == 0) {
- /* reuse old client */
+ /* reuse old client */
} else {
crp->valid = 0;
(void)closesocket(crp->socket);
@@ -103,7 +103,7 @@ callrpc(
timeout.tv_usec = 0;
timeout.tv_sec = 5;
memset(&server_addr, 0, sizeof(server_addr));
- memmove((char *)&server_addr.sin_addr, hp->h_addr,
+ memmove((char *)&server_addr.sin_addr, hp->h_addr,
sizeof(server_addr.sin_addr));
#if HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
server_addr.sin_len = sizeof(server_addr);
@@ -123,7 +123,7 @@ callrpc(
tottimeout.tv_usec = 0;
clnt_stat = clnt_call(crp->client, procnum, inproc, in,
outproc, out, tottimeout);
- /*
+ /*
* if call failed, empty cache
*/
if (clnt_stat != RPC_SUCCESS)
diff --git a/src/lib/rpc/clnt_tcp.c b/src/lib/rpc/clnt_tcp.c
index 7168493..0eb8f45 100644
--- a/src/lib/rpc/clnt_tcp.c
+++ b/src/lib/rpc/clnt_tcp.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -30,7 +30,7 @@
#if !defined(lint) && defined(SCCSIDS)
static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";
#endif
-
+
/*
* clnt_tcp.c, Implements a TCP/IP based, client side RPC.
*
@@ -90,7 +90,7 @@ struct ct_data {
bool_t ct_closeit;
struct timeval ct_wait;
bool_t ct_waitset; /* wait set by clnt_control? */
- struct sockaddr_in ct_addr;
+ struct sockaddr_in ct_addr;
struct rpc_err ct_error;
union {
char ct_mcall[MCALL_MSG_SIZE]; /* marshalled callmsg */
@@ -377,7 +377,7 @@ clnttcp_control(
{
register struct ct_data *ct = (struct ct_data *)cl->cl_private;
GETSOCKNAME_ARG3_TYPE len;
-
+
switch (request) {
case CLSET_TIMEOUT:
ct->ct_wait = *(struct timeval *)info;
diff --git a/src/lib/rpc/clnt_udp.c b/src/lib/rpc/clnt_udp.c
index 25474b9..a3876a7 100644
--- a/src/lib/rpc/clnt_udp.c
+++ b/src/lib/rpc/clnt_udp.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -76,7 +76,7 @@ static struct clnt_ops udp_ops = {
clntudp_control
};
-/*
+/*
* Private data kept per client handle
*/
struct cu_data {
@@ -197,7 +197,7 @@ clntudp_bufcreate(
cu->cu_llen = sizeof(cu->cu_laddr);
if (getsockname(*sockp, (struct sockaddr *)&cu->cu_laddr, &cu->cu_llen) < 0)
goto fooy;
-
+
cu->cu_sock = *sockp;
cl->cl_auth = authnone_create();
return (cl);
@@ -222,7 +222,7 @@ clntudp_create(
UDPMSGSIZE, UDPMSGSIZE));
}
-static enum clnt_stat
+static enum clnt_stat
clntudp_call(
register CLIENT *cl, /* client handle */
rpcproc_t proc, /* procedure number */
@@ -306,7 +306,7 @@ send_again:
for (;;) {
readfds = mask;
seltimeout = cu->cu_wait;
- switch (select(gssrpc__rpc_dtablesize(), &readfds, (fd_set *)NULL,
+ switch (select(gssrpc__rpc_dtablesize(), &readfds, (fd_set *)NULL,
(fd_set *)NULL, &seltimeout)) {
case 0:
@@ -319,7 +319,7 @@ send_again:
if ((time_waited.tv_sec < timeout.tv_sec) ||
((time_waited.tv_sec == timeout.tv_sec) &&
(time_waited.tv_usec < timeout.tv_usec)))
- goto send_again;
+ goto send_again;
return (cu->cu_error.re_status = RPC_TIMEDOUT);
/*
@@ -328,28 +328,28 @@ send_again:
*/
case -1:
if (errno == EINTR)
- continue;
+ continue;
cu->cu_error.re_errno = errno;
return (cu->cu_error.re_status = RPC_CANTRECV);
}
do {
fromlen = sizeof(struct sockaddr);
- inlen = recvfrom(cu->cu_sock, cu->cu_inbuf,
+ inlen = recvfrom(cu->cu_sock, cu->cu_inbuf,
cu->cu_recvsz, 0,
(struct sockaddr *)&from, &fromlen);
} while (inlen < 0 && errno == EINTR);
if (inlen < 0) {
if (errno == EWOULDBLOCK)
- continue;
+ continue;
cu->cu_error.re_errno = errno;
return (cu->cu_error.re_status = RPC_CANTRECV);
}
if (inlen < sizeof(uint32_t))
- continue;
+ continue;
/* see if reply transaction id matches sent id */
- if (*((uint32_t *)(void *)(cu->cu_inbuf)) !=
+ if (*((uint32_t *)(void *)(cu->cu_inbuf)) !=
*((uint32_t *)(void *)(cu->cu_outbuf)))
- continue;
+ continue;
/* we now assume we have the proper reply */
break;
}
@@ -387,7 +387,7 @@ send_again:
xdrs->x_op = XDR_FREE;
(void)xdr_opaque_auth(xdrs,
&(reply_msg.acpted_rply.ar_verf));
- }
+ }
} /* end of valid reply message */
else {
/*
@@ -435,7 +435,7 @@ clntudp_freeres(
/*ARGSUSED*/
-static void
+static void
clntudp_abort(CLIENT *h)
{
}
@@ -447,7 +447,7 @@ clntudp_control(
void *info)
{
register struct cu_data *cu = (struct cu_data *)cl->cl_private;
-
+
switch (request) {
case CLSET_TIMEOUT:
cu->cu_total = *(struct timeval *)info;
@@ -472,7 +472,7 @@ clntudp_control(
}
return (TRUE);
}
-
+
static void
clntudp_destroy(CLIENT *cl)
{
diff --git a/src/lib/rpc/dyn.c b/src/lib/rpc/dyn.c
index 192095c..bce1fd2 100644
--- a/src/lib/rpc/dyn.c
+++ b/src/lib/rpc/dyn.c
@@ -81,7 +81,7 @@ DynObjectP DynCopy(obj)
DynObjectP obj;
{
DynObjectP obj1;
-
+
obj1 = (DynObjectP) malloc(sizeof(DynObjectRecP));
if (obj1 == NULL)
return NULL;
@@ -98,7 +98,7 @@ DynObjectP DynCopy(obj)
free(obj1);
return NULL;
}
- memcpy(obj1->array, obj->array,
+ memcpy(obj1->array, obj->array,
(size_t) (obj1->el_size * obj1->size));
return obj1;
@@ -154,7 +154,7 @@ int DynDebug(obj, state)
/*
* Checkers! Get away from that "hard disk erase" button!
* (Stupid dog. He almost did it to me again ...)
- */
+ */
int DynDelete(obj, idx)
DynObjectP obj;
int idx;
@@ -164,7 +164,7 @@ int DynDelete(obj, idx)
fprintf(stderr, "dyn: delete: bad index %d\n", idx);
return DYN_BADINDEX;
}
-
+
if (idx >= obj->num_el) {
if (obj->debug)
fprintf(stderr, "dyn: delete: Highest index is %d.\n",
@@ -182,14 +182,14 @@ int DynDelete(obj, idx)
if (obj->debug)
fprintf(stderr, "dyn: delete: last element, punting.\n");
}
- }
+ }
else {
if (obj->debug)
fprintf(stderr,
"dyn: delete: copying %d bytes from %p + %d to + %d.\n",
obj->el_size*(obj->num_el - idx), obj->array,
(idx+1)*obj->el_size, idx*obj->el_size);
-
+
memmove(obj->array + idx*obj->el_size,
obj->array + (idx+1)*obj->el_size,
(size_t) obj->el_size*(obj->num_el - idx));
@@ -203,9 +203,9 @@ int DynDelete(obj, idx)
(size_t) obj->el_size);
}
}
-
+
--obj->num_el;
-
+
if (obj->debug)
fprintf(stderr, "dyn: delete: done.\n");
@@ -244,7 +244,7 @@ int DynInsert(obj, idx, els_in, num)
{
DynPtr els = (DynPtr) els_in;
int ret;
-
+
if (idx < 0 || idx > obj->num_el) {
if (obj->debug)
fprintf(stderr, "dyn: insert: index %d is not in [0,%d]\n",
@@ -327,18 +327,18 @@ DynPtr DynGet(obj, num)
fprintf(stderr, "dyn: get: bad index %d\n", num);
return NULL;
}
-
+
if (num >= obj->num_el) {
if (obj->debug)
fprintf(stderr, "dyn: get: highest element is %d.\n",
obj->num_el);
return NULL;
}
-
+
if (obj->debug)
fprintf(stderr, "dyn: get: Returning address %p + %d.\n",
obj->array, obj->el_size*num);
-
+
return (DynPtr) obj->array + obj->el_size*num;
}
@@ -347,7 +347,7 @@ int DynAdd(obj, el)
void *el;
{
int ret;
-
+
ret = DynPut(obj, el, obj->num_el);
if (ret != DYN_OK)
return ret;
@@ -371,7 +371,7 @@ int DynPut(obj, el_in, idx)
{
DynPtr el = (DynPtr) el_in;
int ret;
-
+
if (obj->debug)
fprintf(stderr, "dyn: put: Writing %d bytes from %p to %p + %d\n",
obj->el_size, el, obj->array, idx*obj->el_size);
@@ -383,7 +383,7 @@ int DynPut(obj, el_in, idx)
if (obj->debug)
fprintf(stderr, "dyn: put: done.\n");
-
+
return DYN_OK;
}
@@ -402,7 +402,7 @@ int _DynResize(obj, req)
int req;
{
int size;
-
+
if (obj->size > req)
return DYN_OK;
else if (obj->inc > 0)
@@ -410,9 +410,9 @@ int _DynResize(obj, req)
else {
if (obj->size == 0)
size = -obj->inc;
- else
+ else
size = obj->size;
-
+
/*@-shiftsigned@*/
while (size <= req)
size <<= 1;
@@ -426,7 +426,7 @@ int _DynResize(obj, req)
* Resize the array by num_incs units. If obj->inc is positive, this
* means make it obj->inc*num_incs elements larger. If obj->inc is
* negative, this means make the array num_incs elements long.
- *
+ *
* Ideally, this function should not be called from outside the
* library. However, nothing will break if it is.
*/
@@ -441,13 +441,13 @@ int _DynRealloc(obj, num_incs)
new_size_in_bytes = obj->el_size*(obj->size + obj->inc*num_incs);
else
new_size_in_bytes = obj->el_size*num_incs;
-
+
if (obj->debug)
fprintf(stderr,
"dyn: alloc: Increasing object by %d bytes (%d incs).\n",
new_size_in_bytes - obj->el_size*obj->size,
num_incs);
-
+
temp = (DynPtr) realloc(obj->array, (size_t) new_size_in_bytes);
if (temp == NULL) {
if (obj->debug)
@@ -464,7 +464,7 @@ int _DynRealloc(obj, num_incs)
if (obj->debug)
fprintf(stderr, "dyn: alloc: done.\n");
-
+
return DYN_OK;
}
@@ -546,7 +546,7 @@ Sat Dec 6 22:50:03 1997 Ezra Peisach <epeisach@mit.edu>
Mon Jul 22 21:37:52 1996 Ezra Peisach <epeisach@mit.edu>
* dyn.h: If __STDC__ is not defined, generate prototypes implying
- functions and not variables.
+ functions and not variables.
Mon Jul 22 04:20:48 1996 Marc Horowitz <marc@mit.edu>
diff --git a/src/lib/rpc/dyn.h b/src/lib/rpc/dyn.h
index a888b1d..2e3f3e5 100644
--- a/src/lib/rpc/dyn.h
+++ b/src/lib/rpc/dyn.h
@@ -39,7 +39,7 @@ typedef struct _DynObject {
#define DYN_NOMEM -1001
#define DYN_BADINDEX -1002
#define DYN_BADVALUE -1003
-
+
#define DynCreate gssrpcint_DynCreate
#define DynDestroy gssrpcint_DynDestroy
#define DynRelease gssrpcint_DynRelease
diff --git a/src/lib/rpc/dynP.h b/src/lib/rpc/dynP.h
index f2e1c3e..462ce18 100644
--- a/src/lib/rpc/dynP.h
+++ b/src/lib/rpc/dynP.h
@@ -41,7 +41,7 @@ typedef struct _DynObject DynObjectRecP, *DynObjectP;
#define _DynResize gssrpcint_DynResize
/* Internal functions */
-int _DynRealloc (DynObjectP obj, int req),
+int _DynRealloc (DynObjectP obj, int req),
_DynResize (DynObjectP obj, int req);
#undef P
diff --git a/src/lib/rpc/dyntest.c b/src/lib/rpc/dyntest.c
index 2a80b4f..5e68f61 100644
--- a/src/lib/rpc/dyntest.c
+++ b/src/lib/rpc/dyntest.c
@@ -50,7 +50,7 @@ main(argc, argv)
dbmallopt(MALLOC_REUSE, &arg);
o_size = malloc_inuse(&hist1);
-#endif
+#endif
/*@+matchanyintegral@*/
obj = DynCreate(sizeof(char), -8);
@@ -58,7 +58,7 @@ main(argc, argv)
fprintf(stderr, "test: create failed.\n");
exit(1);
}
-
+
if(DynDebug(obj, 1) != DYN_OK) {
fprintf(stderr, "test: setting paranoid failed.\n");
exit(1);
@@ -67,9 +67,9 @@ main(argc, argv)
fprintf(stderr, "test: setting paranoid failed.\n");
exit(1);
}
-
- if ((DynGet(obj, -5) != NULL) ||
+
+ if ((DynGet(obj, -5) != NULL) ||
(DynGet(obj, 0) != NULL) || (DynGet(obj, 1000) != NULL)) {
fprintf(stderr, "test: Get did not fail when it should have.\n");
exit(1);
@@ -96,7 +96,7 @@ main(argc, argv)
fprintf(stderr, "test: appending array failed.\n");
exit(1);
}
-
+
if (DynDelete(obj, DynHigh(obj) / 2) != DYN_OK) {
fprintf(stderr, "test: deleting element failed.\n");
exit(1);
@@ -153,17 +153,17 @@ main(argc, argv)
1) != DYN_OK) {
fprintf(stderr, "DynInsert to end failed.\n");
exit(1);
- }
+ }
if (DynInsert(obj, 19, insert2, strlen(insert2)) != DYN_OK) {
fprintf(stderr, "DynInsert to middle failed.\n");
exit(1);
}
-
+
if (DynInsert(obj, 0, insert1, strlen(insert1)+1) != DYN_OK) {
fprintf(stderr, "DynInsert to start failed.\n");
exit(1);
- }
+ }
data = DynGet(obj, 14 + strlen(insert1) + 1);
if (data == NULL) {
@@ -194,7 +194,7 @@ main(argc, argv)
malloc_list(2, hist1, hist2);
}
#endif
-
+
printf("All tests pass\n");
return 0;
diff --git a/src/lib/rpc/get_myaddress.c b/src/lib/rpc/get_myaddress.c
index 6ec0170..caaa87f 100644
--- a/src/lib/rpc/get_myaddress.c
+++ b/src/lib/rpc/get_myaddress.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -46,7 +46,7 @@ static char sccsid[] = "@(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro";
#include <sys/socket.h>
#include <netinet/in.h>
#include <krb5.h>
-/*
+/*
* don't use gethostbyname, which would invoke yellow pages
*/
int
@@ -75,7 +75,7 @@ get_myaddress(struct sockaddr_in *addr)
#include <arpa/inet.h>
#include <netinet/in.h>
-/*
+/*
* don't use gethostbyname, which would invoke yellow pages
*/
get_myaddress(struct sockaddr_in *addr)
diff --git a/src/lib/rpc/getrpcent.c b/src/lib/rpc/getrpcent.c
index 0654039..a30c01d 100644
--- a/src/lib/rpc/getrpcent.c
+++ b/src/lib/rpc/getrpcent.c
@@ -10,23 +10,23 @@ static char sccsid[] = "@(#)getrpcent.c 1.9 87/08/11 Copyr 1984 Sun Micro";
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
diff --git a/src/lib/rpc/getrpcport.c b/src/lib/rpc/getrpcport.c
index 8688df2..e8398b9 100644
--- a/src/lib/rpc/getrpcport.c
+++ b/src/lib/rpc/getrpcport.c
@@ -9,23 +9,23 @@ static char sccsid[] = "@(#)getrpcport.c 1.3 87/08/11 SMI";
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
diff --git a/src/lib/rpc/gssrpcint.h b/src/lib/rpc/gssrpcint.h
index c9f03d8..8110596 100644
--- a/src/lib/rpc/gssrpcint.h
+++ b/src/lib/rpc/gssrpcint.h
@@ -8,7 +8,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +22,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* <<< Description >>>
*/
diff --git a/src/lib/rpc/pmap_clnt.c b/src/lib/rpc/pmap_clnt.c
index affac9f..eeb5019 100644
--- a/src/lib/rpc/pmap_clnt.c
+++ b/src/lib/rpc/pmap_clnt.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
diff --git a/src/lib/rpc/pmap_getmaps.c b/src/lib/rpc/pmap_getmaps.c
index 36997c2..e961ac9 100644
--- a/src/lib/rpc/pmap_getmaps.c
+++ b/src/lib/rpc/pmap_getmaps.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
diff --git a/src/lib/rpc/pmap_getport.c b/src/lib/rpc/pmap_getport.c
index 998a081..147bbec 100644
--- a/src/lib/rpc/pmap_getport.c
+++ b/src/lib/rpc/pmap_getport.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
diff --git a/src/lib/rpc/pmap_prot.c b/src/lib/rpc/pmap_prot.c
index 0f39f91..46fcfd6 100644
--- a/src/lib/rpc/pmap_prot.c
+++ b/src/lib/rpc/pmap_prot.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -47,8 +47,8 @@ bool_t
xdr_pmap(XDR *xdrs, struct pmap *regs)
{
- if (xdr_rpcprog(xdrs, &regs->pm_prog) &&
- xdr_rpcvers(xdrs, &regs->pm_vers) &&
+ if (xdr_rpcprog(xdrs, &regs->pm_prog) &&
+ xdr_rpcvers(xdrs, &regs->pm_vers) &&
xdr_rpcprot(xdrs, &regs->pm_prot))
return (xdr_rpcport(xdrs, &regs->pm_port));
return (FALSE);
diff --git a/src/lib/rpc/pmap_prot2.c b/src/lib/rpc/pmap_prot2.c
index 13dc1af..491dc40 100644
--- a/src/lib/rpc/pmap_prot2.c
+++ b/src/lib/rpc/pmap_prot2.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)pmap_prot2.c 1.3 87/08/11 Copyr 1984 Sun Micro";
#include <gssrpc/pmap_prot.h>
-/*
+/*
* What is going on with linked lists? (!)
* First recall the link list declaration from pmap_prot.h:
*
@@ -52,11 +52,11 @@ static char sccsid[] = "@(#)pmap_prot2.c 1.3 87/08/11 Copyr 1984 Sun Micro";
* struct pmaplist *pml_map;
* };
*
- * Compare that declaration with a corresponding xdr declaration that
+ * Compare that declaration with a corresponding xdr declaration that
* is (a) pointer-less, and (b) recursive:
*
* typedef union switch (bool_t) {
- *
+ *
* case TRUE: struct {
* struct pmap;
* pmaplist_t foo;
@@ -69,8 +69,8 @@ static char sccsid[] = "@(#)pmap_prot2.c 1.3 87/08/11 Copyr 1984 Sun Micro";
* the C declaration has no bool_t variable. The bool_t can be
* interpreted as ``more data follows me''; if FALSE then nothing
* follows this bool_t; if TRUE then the bool_t is followed by
- * an actual struct pmap, and then (recursively) by the
- * xdr union, pamplist_t.
+ * an actual struct pmap, and then (recursively) by the
+ * xdr union, pamplist_t.
*
* This could be implemented via the xdr_union primitive, though this
* would cause a one recursive call per element in the list. Rather than do
@@ -105,7 +105,7 @@ xdr_pmaplist(register XDR *xdrs, register struct pmaplist **rp)
* before we free the current object ...
*/
if (freeing)
- next = &((*rp)->pml_next);
+ next = &((*rp)->pml_next);
if (! xdr_reference(xdrs, (caddr_t *)rp,
(u_int)sizeof(struct pmaplist), xdr_pmap))
return (FALSE);
diff --git a/src/lib/rpc/pmap_rmt.c b/src/lib/rpc/pmap_rmt.c
index dbe597d..ee630d2 100644
--- a/src/lib/rpc/pmap_rmt.c
+++ b/src/lib/rpc/pmap_rmt.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -171,7 +171,7 @@ xdr_rmtcallres(
/*
* The following is kludged-up support for simple rpc broadcasts.
- * Someday a large, complicated system will replace these trivial
+ * Someday a large, complicated system will replace these trivial
* routines which only support udp/ip .
*/
@@ -216,7 +216,7 @@ getbroadcastnets(
(sockin->sin_addr),
#else /* hpux or solaris */
(sockin->sin_addr.s_addr),
-#endif
+#endif
INADDR_ANY);
#endif
} else {
@@ -232,7 +232,7 @@ getbroadcastnets(
return (i);
}
-enum clnt_stat
+enum clnt_stat
clnt_broadcast(
rpcprog_t prog, /* program number */
rpcvers_t vers, /* version number */
@@ -268,7 +268,7 @@ clnt_broadcast(
struct rmtcallargs a;
struct rmtcallres r;
struct rpc_msg msg;
- struct timeval t, t2;
+ struct timeval t, t2;
char outbuf[MAX_BROADCAST_SIZE];
#ifndef MAX
#define MAX(A,B) ((A)<(B)?(B):(A))
@@ -355,7 +355,7 @@ clnt_broadcast(
msg.acpted_rply.ar_results.proc = xdr_rmtcallres;
readfds = mask;
t2 = t;
- switch (select(gssrpc__rpc_dtablesize(), &readfds, (fd_set *)NULL,
+ switch (select(gssrpc__rpc_dtablesize(), &readfds, (fd_set *)NULL,
(fd_set *)NULL, &t2)) {
case 0: /* timed out */
@@ -421,4 +421,3 @@ done_broad:
AUTH_DESTROY(unix_auth);
return (stat);
}
-
diff --git a/src/lib/rpc/rpc_callmsg.c b/src/lib/rpc/rpc_callmsg.c
index 2e4789a..233fc7d 100644
--- a/src/lib/rpc/rpc_callmsg.c
+++ b/src/lib/rpc/rpc_callmsg.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -131,7 +131,7 @@ xdr_callmsg(register XDR *xdrs, register struct rpc_msg *cmsg)
return (FALSE);
}
} else {
- memmove(oa->oa_base, (caddr_t)buf,
+ memmove(oa->oa_base, (caddr_t)buf,
oa->oa_length);
/* no real need....
buf += RNDUP(oa->oa_length) /
@@ -167,7 +167,7 @@ xdr_callmsg(register XDR *xdrs, register struct rpc_msg *cmsg)
return (FALSE);
}
} else {
- memmove(oa->oa_base, (caddr_t) buf,
+ memmove(oa->oa_base, (caddr_t) buf,
oa->oa_length);
/* no real need...
buf += RNDUP(oa->oa_length) /
@@ -191,4 +191,3 @@ xdr_callmsg(register XDR *xdrs, register struct rpc_msg *cmsg)
return (xdr_opaque_auth(xdrs, &(cmsg->rm_call.cb_verf)));
return (FALSE);
}
-
diff --git a/src/lib/rpc/rpc_commondata.c b/src/lib/rpc/rpc_commondata.c
index 882b6a4..6da7ac8 100644
--- a/src/lib/rpc/rpc_commondata.c
+++ b/src/lib/rpc/rpc_commondata.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
diff --git a/src/lib/rpc/rpc_dtablesize.c b/src/lib/rpc/rpc_dtablesize.c
index c7d2329..a933e8e 100644
--- a/src/lib/rpc/rpc_dtablesize.c
+++ b/src/lib/rpc/rpc_dtablesize.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -38,17 +38,17 @@ static char sccsid[] = "@(#)rpc_dtablesize.c 1.2 87/08/11 Copyr 1987 Sun Micro";
* Cache the result of getdtablesize(), so we don't have to do an
* expensive system call every time.
*/
-int
+int
gssrpc__rpc_dtablesize(void)
{
static int size;
-
+
if (size == 0) {
#ifdef _SC_OPEN_MAX
size = (int) sysconf(_SC_OPEN_MAX);
-#else
+#else
size = getdtablesize();
-#endif
+#endif
/* sysconf() can return a number larger than what will fit in an
fd_set. we can't use fd's larger than this, anyway. */
diff --git a/src/lib/rpc/rpc_prot.c b/src/lib/rpc/rpc_prot.c
index 17e26b1..b66d666 100644
--- a/src/lib/rpc/rpc_prot.c
+++ b/src/lib/rpc/rpc_prot.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -78,7 +78,7 @@ xdr_des_block(XDR *xdrs, des_block *blkp)
/*
* XDR the MSG_ACCEPTED part of a reply message union
*/
-bool_t
+bool_t
xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar)
{
@@ -109,7 +109,7 @@ xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar)
/*
* XDR the MSG_DENIED part of a reply message union
*/
-bool_t
+bool_t
xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr)
{
@@ -141,7 +141,7 @@ bool_t
xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg)
{
if (
- xdr_u_int32(xdrs, &(rmsg->rm_xid)) &&
+ xdr_u_int32(xdrs, &(rmsg->rm_xid)) &&
xdr_enum(xdrs, (enum_t *)&(rmsg->rm_direction)) &&
(rmsg->rm_direction == REPLY) )
return (xdr_union(xdrs, (enum_t *)&(rmsg->rm_reply.rp_stat),
@@ -209,7 +209,7 @@ accepted(enum accept_stat acpt_stat, struct rpc_err *error)
error->re_lb.s2 = (int32_t)acpt_stat;
}
-static void
+static void
rejected(enum reject_stat rjct_stat, struct rpc_err *error)
{
diff --git a/src/lib/rpc/svc.c b/src/lib/rpc/svc.c
index 25b13f6..86179c6 100644
--- a/src/lib/rpc/svc.c
+++ b/src/lib/rpc/svc.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -123,11 +123,11 @@ xprt_register(SVCXPRT *xprt)
}
/*
- * De-activate a transport handle.
+ * De-activate a transport handle.
*/
void
xprt_unregister(SVCXPRT *xprt)
-{
+{
register int sock = xprt->xp_sock;
#ifdef FD_SETSIZE
@@ -246,15 +246,15 @@ svc_sendreply(
xdrproc_t xdr_results,
caddr_t xdr_location)
{
- struct rpc_msg rply;
+ struct rpc_msg rply;
- rply.rm_direction = REPLY;
- rply.rm_reply.rp_stat = MSG_ACCEPTED;
- rply.acpted_rply.ar_verf = xprt->xp_verf;
+ rply.rm_direction = REPLY;
+ rply.rm_reply.rp_stat = MSG_ACCEPTED;
+ rply.acpted_rply.ar_verf = xprt->xp_verf;
rply.acpted_rply.ar_stat = SUCCESS;
rply.acpted_rply.ar_results.where = xdr_location;
rply.acpted_rply.ar_results.proc = xdr_results;
- return (SVC_REPLY(xprt, &rply));
+ return (SVC_REPLY(xprt, &rply));
}
/*
@@ -278,13 +278,13 @@ svcerr_noproc(register SVCXPRT *xprt)
void
svcerr_decode(register SVCXPRT *xprt)
{
- struct rpc_msg rply;
+ struct rpc_msg rply;
- rply.rm_direction = REPLY;
- rply.rm_reply.rp_stat = MSG_ACCEPTED;
+ rply.rm_direction = REPLY;
+ rply.rm_reply.rp_stat = MSG_ACCEPTED;
rply.acpted_rply.ar_verf = xprt->xp_verf;
rply.acpted_rply.ar_stat = GARBAGE_ARGS;
- SVC_REPLY(xprt, &rply);
+ SVC_REPLY(xprt, &rply);
}
/*
@@ -293,13 +293,13 @@ svcerr_decode(register SVCXPRT *xprt)
void
svcerr_systemerr(register SVCXPRT *xprt)
{
- struct rpc_msg rply;
+ struct rpc_msg rply;
- rply.rm_direction = REPLY;
- rply.rm_reply.rp_stat = MSG_ACCEPTED;
+ rply.rm_direction = REPLY;
+ rply.rm_reply.rp_stat = MSG_ACCEPTED;
rply.acpted_rply.ar_verf = xprt->xp_verf;
rply.acpted_rply.ar_stat = SYSTEM_ERR;
- SVC_REPLY(xprt, &rply);
+ SVC_REPLY(xprt, &rply);
}
/*
@@ -332,14 +332,14 @@ svcerr_weakauth(SVCXPRT *xprt)
/*
* Program unavailable error reply
*/
-void
+void
svcerr_noprog(register SVCXPRT *xprt)
{
- struct rpc_msg rply;
+ struct rpc_msg rply;
- rply.rm_direction = REPLY;
- rply.rm_reply.rp_stat = MSG_ACCEPTED;
- rply.acpted_rply.ar_verf = xprt->xp_verf;
+ rply.rm_direction = REPLY;
+ rply.rm_reply.rp_stat = MSG_ACCEPTED;
+ rply.acpted_rply.ar_verf = xprt->xp_verf;
rply.acpted_rply.ar_stat = PROG_UNAVAIL;
SVC_REPLY(xprt, &rply);
}
@@ -347,7 +347,7 @@ svcerr_noprog(register SVCXPRT *xprt)
/*
* Program version mismatch error reply
*/
-void
+void
svcerr_progvers(
register SVCXPRT *xprt,
rpcvers_t low_vers,
@@ -374,9 +374,9 @@ svcerr_progvers(
* the "raw" parameters (msg.rm_call.cb_cred and msg.rm_call.cb_verf) and
* the "cooked" credentials (rqst->rq_clntcred).
* However, this function does not know the structure of the cooked
- * credentials, so it make the following assumptions:
+ * credentials, so it make the following assumptions:
* a) the structure is contiguous (no pointers), and
- * b) the cred structure size does not exceed RQCRED_SIZE bytes.
+ * b) the cred structure size does not exceed RQCRED_SIZE bytes.
* In all events, all three parameters are freed upon exit from this routine.
* The storage is trivially management on the call stack in user land, but
* is mallocated in kernel land.
diff --git a/src/lib/rpc/svc_auth.c b/src/lib/rpc/svc_auth.c
index 8732619..de77e4d 100644
--- a/src/lib/rpc/svc_auth.c
+++ b/src/lib/rpc/svc_auth.c
@@ -8,11 +8,11 @@ static char sccsid[] = "@(#)svc_auth.c 2.1 88/08/07 4.0 RPCSRC; from 1.19 87/08/
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
@@ -42,12 +42,12 @@ static char sccsid[] = "@(#)svc_auth.c 2.1 88/08/07 4.0 RPCSRC; from 1.19 87/08/
/*
* Server side authenticators are called from authenticate by
* using the client auth struct flavor field to index into svcauthsw.
- * The server auth flavors must implement a routine that looks
- * like:
- *
+ * The server auth flavors must implement a routine that looks
+ * like:
+ *
* enum auth_stat
* flavorx_auth(rqst, msg)
- * register struct svc_req *rqst;
+ * register struct svc_req *rqst;
* register struct rpc_msg *msg;
*
*/
@@ -104,6 +104,6 @@ gssrpc__authenticate(
no_dispatch));
}
}
-
+
return (AUTH_REJECTEDCRED);
}
diff --git a/src/lib/rpc/svc_auth_gss.c b/src/lib/rpc/svc_auth_gss.c
index 990e7fa..cac5702 100644
--- a/src/lib/rpc/svc_auth_gss.c
+++ b/src/lib/rpc/svc_auth_gss.c
@@ -1,6 +1,6 @@
/*
svc_auth_gss.c
-
+
Copyright (c) 2000 The Regents of the University of Michigan.
All rights reserved.
@@ -160,7 +160,7 @@ svcauth_gss_acquire_cred(void)
maj_stat = gss_acquire_cred(&min_stat, svcauth_gss_name, 0,
GSS_C_NULL_OID_SET, GSS_C_ACCEPT,
&svcauth_gss_creds, NULL, NULL);
-
+
if (maj_stat != GSS_S_COMPLETE) {
log_status("gss_acquire_cred", maj_stat, min_stat);
return (FALSE);
@@ -172,18 +172,18 @@ static bool_t
svcauth_gss_release_cred(void)
{
OM_uint32 maj_stat, min_stat;
-
+
log_debug("in svcauth_gss_release_cred()");
-
+
maj_stat = gss_release_cred(&min_stat, &svcauth_gss_creds);
-
+
if (maj_stat != GSS_S_COMPLETE) {
log_status("gss_release_cred", maj_stat, min_stat);
return (FALSE);
}
-
+
svcauth_gss_creds = NULL;
-
+
return (TRUE);
}
@@ -198,14 +198,14 @@ svcauth_gss_accept_sec_context(struct svc_req *rqst,
OM_uint32 maj_stat = 0, min_stat = 0, ret_flags, seq;
log_debug("in svcauth_gss_accept_context()");
-
+
gd = SVCAUTH_PRIVATE(rqst->rq_xprt->xp_auth);
gc = (struct rpc_gss_cred *)rqst->rq_clntcred;
memset(gr, 0, sizeof(*gr));
/* Deserialize arguments. */
memset(&recv_tok, 0, sizeof(recv_tok));
-
+
if (!svc_getargs(rqst->rq_xprt, xdr_rpc_gss_init_args,
(caddr_t)&recv_tok))
return (FALSE);
@@ -237,7 +237,7 @@ svcauth_gss_accept_sec_context(struct svc_req *rqst,
goto errout;
}
/*
- * ANDROS: krb5 mechglue returns ctx of size 8 - two pointers,
+ * ANDROS: krb5 mechglue returns ctx of size 8 - two pointers,
* one to the mechanism oid, one to the internal_ctx_id
*/
if ((gr->gr_ctx.value = mem_alloc(sizeof(gss_union_ctx_id_desc))) == NULL) {
@@ -249,7 +249,7 @@ svcauth_gss_accept_sec_context(struct svc_req *rqst,
/* gr->gr_win = 0x00000005; ANDROS: for debugging linux kernel version... */
gr->gr_win = sizeof(gd->seqmask) * 8;
-
+
/* Save client info. */
gd->sec.mech = mech;
gd->sec.qop = GSS_C_QOP_DEFAULT;
@@ -265,7 +265,7 @@ svcauth_gss_accept_sec_context(struct svc_req *rqst,
maj_stat = gss_display_name(&min_stat, gd->client_name,
&gd->cname, &gd->sec.mech);
#ifdef SPKM
- }
+ }
#endif
if (maj_stat != GSS_S_COMPLETE) {
log_status("display_name", maj_stat, min_stat);
@@ -282,7 +282,7 @@ svcauth_gss_accept_sec_context(struct svc_req *rqst,
gss_buffer_desc mechname;
gss_oid_to_str(&min_stat, mech, &mechname);
-
+
log_debug("accepted context for %.*s with "
"<mech %.*s, qop %d, svc %d>",
gd->cname.length, (char *)gd->cname.value,
@@ -304,8 +304,8 @@ svcauth_gss_accept_sec_context(struct svc_req *rqst,
if (maj_stat != GSS_S_COMPLETE) {
goto errout;
}
-
-
+
+
rqst->rq_xprt->xp_verf.oa_flavor = RPCSEC_GSS;
rqst->rq_xprt->xp_verf.oa_base = gd->checksum.value;
rqst->rq_xprt->xp_verf.oa_length = gd->checksum.length;
@@ -326,7 +326,7 @@ svcauth_gss_validate(struct svc_req *rqst, struct svc_rpc_gss_data *gd, struct r
int32_t *buf;
log_debug("in svcauth_gss_validate()");
-
+
memset(rpchdr, 0, sizeof(rpchdr));
/* XXX - Reconstruct RPC header for signing (from xdr_callmsg). */
@@ -357,10 +357,10 @@ svcauth_gss_validate(struct svc_req *rqst, struct svc_rpc_gss_data *gd, struct r
checksum.value = msg->rm_call.cb_verf.oa_base;
checksum.length = msg->rm_call.cb_verf.oa_length;
-
+
maj_stat = gss_verify_mic(&min_stat, gd->ctx, &rpcbuf, &checksum,
&qop_state);
-
+
if (maj_stat != GSS_S_COMPLETE) {
log_status("gss_verify_mic", maj_stat, min_stat);
if (log_badverf != NULL)
@@ -383,7 +383,7 @@ svcauth_gss_nextverf(struct svc_req *rqst, u_int num)
if (rqst->rq_xprt->xp_auth == NULL)
return (FALSE);
-
+
gd = SVCAUTH_PRIVATE(rqst->rq_xprt->xp_auth);
gss_release_buffer(&min_stat, &gd->checksum);
@@ -401,7 +401,7 @@ svcauth_gss_nextverf(struct svc_req *rqst, u_int num)
rqst->rq_xprt->xp_verf.oa_flavor = RPCSEC_GSS;
rqst->rq_xprt->xp_verf.oa_base = (caddr_t)gd->checksum.value;
rqst->rq_xprt->xp_verf.oa_length = (u_int)gd->checksum.length;
-
+
return (TRUE);
}
@@ -419,7 +419,7 @@ gssrpc__svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg,
OM_uint32 min_stat;
log_debug("in svcauth_gss()");
-
+
/* Initialize reply. */
rqst->rq_xprt->xp_verf = gssrpc__null_auth;
@@ -445,7 +445,7 @@ gssrpc__svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg,
/* Deserialize client credentials. */
if (rqst->rq_cred.oa_length <= 0)
return (AUTH_BADCRED);
-
+
gc = (struct rpc_gss_cred *)rqst->rq_clntcred;
memset(gc, 0, sizeof(*gc));
@@ -455,7 +455,7 @@ gssrpc__svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg,
xdrmem_create(&xdrs, rqst->rq_cred.oa_base,
rqst->rq_cred.oa_length, XDR_DECODE);
log_debug("xdrmem_create() returned");
-
+
if (!xdr_rpc_gss_cred(&xdrs, gc)) {
log_debug("xdr_rpc_gss_cred() failed");
XDR_DESTROY(&xdrs);
@@ -495,7 +495,7 @@ gssrpc__svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg,
gd->seq = gc->gc_seq;
gd->seqmask |= (1 << offset);
}
-
+
if (gd->established) {
rqst->rq_clntname = (char *)gd->client_name;
rqst->rq_svccred = (char *)gd->ctx;
@@ -511,7 +511,7 @@ gssrpc__svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg,
if (!svcauth_gss_acquire_cred())
ret_freegc (AUTH_FAILED);
-
+
if (!svcauth_gss_accept_sec_context(rqst, &gr))
ret_freegc (AUTH_REJECTEDCRED);
@@ -522,7 +522,7 @@ gssrpc__svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg,
ret_freegc (AUTH_FAILED);
}
*no_dispatch = TRUE;
-
+
call_stat = svc_sendreply(rqst->rq_xprt, xdr_rpc_gss_init_res,
(caddr_t)&gr);
@@ -534,24 +534,24 @@ gssrpc__svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg,
if (gr.gr_major == GSS_S_COMPLETE)
gd->established = TRUE;
-
+
break;
-
+
case RPCSEC_GSS_DATA:
if (!svcauth_gss_validate(rqst, gd, msg))
ret_freegc (RPCSEC_GSS_CREDPROBLEM);
-
+
if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq)))
ret_freegc (AUTH_FAILED);
break;
-
+
case RPCSEC_GSS_DESTROY:
if (rqst->rq_proc != NULLPROC)
ret_freegc (AUTH_FAILED); /* XXX ? */
if (!svcauth_gss_validate(rqst, gd, msg))
ret_freegc (RPCSEC_GSS_CREDPROBLEM);
-
+
if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq)))
ret_freegc (AUTH_FAILED);
@@ -564,7 +564,7 @@ gssrpc__svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg,
if (!svcauth_gss_release_cred())
ret_freegc (AUTH_FAILED);
-
+
SVCAUTH_DESTROY(rqst->rq_xprt->xp_auth);
rqst->rq_xprt->xp_auth = &svc_auth_none;
@@ -588,9 +588,9 @@ svcauth_gss_destroy(SVCAUTH *auth)
OM_uint32 min_stat;
log_debug("in svcauth_gss_destroy()");
-
+
gd = SVCAUTH_PRIVATE(auth);
-
+
gss_delete_sec_context(&min_stat, &gd->ctx, GSS_C_NO_BUFFER);
gss_release_buffer(&min_stat, &gd->cname);
gss_release_buffer(&min_stat, &gd->checksum);
@@ -600,7 +600,7 @@ svcauth_gss_destroy(SVCAUTH *auth)
mem_free(gd, sizeof(*gd));
mem_free(auth, sizeof(*auth));
-
+
return (TRUE);
}
@@ -608,11 +608,11 @@ static bool_t
svcauth_gss_wrap(SVCAUTH *auth, XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr)
{
struct svc_rpc_gss_data *gd;
-
+
log_debug("in svcauth_gss_wrap()");
gd = SVCAUTH_PRIVATE(auth);
-
+
if (!gd->established || gd->sec.svc == RPCSEC_GSS_SVC_NONE) {
return ((*xdr_func)(xdrs, xdr_ptr));
}
@@ -627,7 +627,7 @@ svcauth_gss_unwrap(SVCAUTH *auth, XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr
struct svc_rpc_gss_data *gd;
log_debug("in svcauth_gss_unwrap()");
-
+
gd = SVCAUTH_PRIVATE(auth);
if (!gd->established || gd->sec.svc == RPCSEC_GSS_SVC_NONE) {
diff --git a/src/lib/rpc/svc_auth_gssapi.c b/src/lib/rpc/svc_auth_gssapi.c
index e14a581..9688b8c 100644
--- a/src/lib/rpc/svc_auth_gssapi.c
+++ b/src/lib/rpc/svc_auth_gssapi.c
@@ -162,20 +162,20 @@ enum auth_stat gssrpc__svcauth_gssapi(
uint32_t seq_num;
PRINTF(("svcauth_gssapi: starting\n"));
-
+
/* clean up expired entries */
clean_client();
/* use AUTH_NONE until there is a client_handle */
rqst->rq_xprt->xp_auth = &svc_auth_none;
-
+
memset(&call_res, 0, sizeof(call_res));
creds.client_handle.length = 0;
creds.client_handle.value = NULL;
-
+
cred = &msg->rm_call.cb_cred;
verf = &msg->rm_call.cb_verf;
-
+
if (cred->oa_length == 0) {
PRINTF(("svcauth_gssapi: empty creds, failing\n"));
LOG_MISCERR("empty client credentials");
@@ -184,7 +184,7 @@ enum auth_stat gssrpc__svcauth_gssapi(
}
PRINTF(("svcauth_gssapi: decoding credentials\n"));
- xdrmem_create(&xdrs, cred->oa_base, cred->oa_length, XDR_DECODE);
+ xdrmem_create(&xdrs, cred->oa_base, cred->oa_length, XDR_DECODE);
memset(&creds, 0, sizeof(creds));
if (! xdr_authgssapi_creds(&xdrs, &creds)) {
PRINTF(("svcauth_gssapi: failed decoding creds\n"));
@@ -217,7 +217,7 @@ enum auth_stat gssrpc__svcauth_gssapi(
}
}
#endif
-
+
/*
* If this is an auth_msg and proc is GSSAPI_INIT, then create a
* client handle for this client. Otherwise, look up the
@@ -230,9 +230,9 @@ enum auth_stat gssrpc__svcauth_gssapi(
ret = AUTH_FAILED;
goto error;
}
-
+
PRINTF(("svcauth_gssapi: GSSAPI_INIT, creating client.\n"));
-
+
client_data = create_client();
if (client_data == NULL) {
PRINTF(("svcauth_gssapi: create_client failed\n"));
@@ -247,8 +247,8 @@ enum auth_stat gssrpc__svcauth_gssapi(
ret = AUTH_FAILED;
goto error;
}
-
- PRINTF(("svcauth_gssapi: incoming client_handle %d, len %d\n",
+
+ PRINTF(("svcauth_gssapi: incoming client_handle %d, len %d\n",
*((uint32_t *) creds.client_handle.value),
(int) creds.client_handle.length));
@@ -265,7 +265,7 @@ enum auth_stat gssrpc__svcauth_gssapi(
/* any response we send will use client_handle, so set it now */
call_res.client_handle.length = sizeof(client_data->key);
call_res.client_handle.value = (char *) &client_data->key;
-
+
/* mark this call as using AUTH_GSSAPI via client_data's SVCAUTH */
rqst->rq_xprt->xp_auth = &client_data->svcauth;
@@ -304,7 +304,7 @@ enum auth_stat gssrpc__svcauth_gssapi(
/*
* Process the call arg version number.
- *
+ *
* Set the krb5_gss backwards-compatibility mode based on client
* version. This controls whether the AP_REP message is
* encrypted with the session key (version 2+, correct) or the
@@ -369,7 +369,7 @@ enum auth_stat gssrpc__svcauth_gssapi(
* If accept_sec_context returns something other than
* success and GSS_S_FAILURE, then assume different
* credentials won't help and stop looping.
- *
+ *
* Note that there are really two cases here: (1) the client
* has a server_creds already, and (2) it does not. They
* are both written in the same loop so that there is only
@@ -384,7 +384,7 @@ enum auth_stat gssrpc__svcauth_gssapi(
PRINTF(("svcauth_gssapi: trying creds %d\n", i));
server_creds = server_creds_list[i];
}
-
+
/* Free previous output_token from loop */
if(i != 0) gss_release_buffer(&minor_stat, &output_token);
@@ -428,7 +428,7 @@ enum auth_stat gssrpc__svcauth_gssapi(
break;
}
}
-
+
gssstat = call_res.gss_major;
minor_stat = call_res.gss_minor;
@@ -448,7 +448,7 @@ enum auth_stat gssrpc__svcauth_gssapi(
call_res.gss_minor,
&rqst->rq_xprt->xp_raddr,
log_badauth_data);
-
+
gss_release_buffer(&minor_stat, &output_token);
svc_sendreply(rqst->rq_xprt, xdr_authgssapi_init_res,
(caddr_t) &call_res);
@@ -456,7 +456,7 @@ enum auth_stat gssrpc__svcauth_gssapi(
ret = AUTH_OK;
goto error;
}
-
+
if (output_token.length != 0) {
PRINTF(("svcauth_gssapi: got new output token\n"));
GSS_COPY_BUFFER(call_res.token, output_token);
@@ -468,7 +468,7 @@ enum auth_stat gssrpc__svcauth_gssapi(
(time_rec == GSS_C_INDEFINITE ?
INDEF_EXPIRE : time_rec) + time(0));
- PRINTF(("svcauth_gssapi: context established, isn %d\n",
+ PRINTF(("svcauth_gssapi: context established, isn %d\n",
client_data->seq_num));
if (auth_gssapi_seal_seq(client_data->context,
@@ -503,17 +503,17 @@ enum auth_stat gssrpc__svcauth_gssapi(
/* check the verifier */
PRINTF(("svcauth_gssapi: checking verifier, len %d\n",
verf->oa_length));
-
+
in_buf.length = verf->oa_length;
in_buf.value = verf->oa_base;
-
+
if (auth_gssapi_unseal_seq(client_data->context, &in_buf,
&seq_num) == FALSE) {
ret = AUTH_BADVERF;
LOG_MISCERR("internal error unsealing sequence number");
goto error;
}
-
+
if (seq_num != client_data->seq_num + 1) {
PRINTF(("svcauth_gssapi: expected isn %d, got %d\n",
client_data->seq_num + 1, seq_num));
@@ -521,12 +521,12 @@ enum auth_stat gssrpc__svcauth_gssapi(
(*log_badverf)(client_data->client_name,
client_data->server_name,
rqst, msg, log_badverf_data);
-
+
ret = AUTH_REJECTEDVERF;
goto error;
}
client_data->seq_num++;
-
+
PRINTF(("svcauth_gssapi: seq_num %d okay\n", seq_num));
/* free previous response verifier, if any */
@@ -534,7 +534,7 @@ enum auth_stat gssrpc__svcauth_gssapi(
gss_release_buffer(&minor_stat, &client_data->prev_verf);
client_data->prev_verf.length = 0;
}
-
+
/* prepare response verifier */
seq_num = client_data->seq_num + 1;
if (auth_gssapi_seal_seq(client_data->context, seq_num,
@@ -543,17 +543,17 @@ enum auth_stat gssrpc__svcauth_gssapi(
LOG_MISCERR("internal error sealing sequence number");
goto error;
}
-
+
client_data->seq_num++;
-
+
PRINTF(("svcauth_gssapi; response seq_num %d\n", seq_num));
-
+
rqst->rq_xprt->xp_verf.oa_flavor = AUTH_GSSAPI;
- rqst->rq_xprt->xp_verf.oa_base = out_buf.value;
+ rqst->rq_xprt->xp_verf.oa_base = out_buf.value;
rqst->rq_xprt->xp_verf.oa_length = out_buf.length;
/* save verifier so it can be freed next time */
- client_data->prev_verf.value = out_buf.value;
+ client_data->prev_verf.value = out_buf.value;
client_data->prev_verf.length = out_buf.length;
/*
@@ -590,7 +590,7 @@ enum auth_stat gssrpc__svcauth_gssapi(
/* done with call args */
xdr_free(xdr_authgssapi_init_arg, &call_arg);
-
+
if (gssstat != GSS_S_COMPLETE) {
AUTH_GSSAPI_DISPLAY_STATUS(("processing token",
gssstat, minor_stat));
@@ -604,7 +604,7 @@ enum auth_stat gssrpc__svcauth_gssapi(
case AUTH_GSSAPI_DESTROY:
PRINTF(("svcauth_gssapi: GSSAPI_DESTROY\n"));
-
+
PRINTF(("svcauth_gssapi: sending reply\n"));
svc_sendreply(rqst->rq_xprt, xdr_void, NULL);
*no_dispatch = TRUE;
@@ -634,7 +634,7 @@ enum auth_stat gssrpc__svcauth_gssapi(
(int) creds.client_handle.length));
xdr_free(xdr_authgssapi_creds, &creds);
}
-
+
PRINTF(("\n"));
return AUTH_OK;
@@ -644,7 +644,7 @@ error:
(int) creds.client_handle.length));
xdr_free(xdr_authgssapi_creds, &creds);
}
-
+
PRINTF(("\n"));
return ret;
}
@@ -664,7 +664,7 @@ static void cleanup(void)
}
exit(0);
-}
+}
/*
* Function: create_client
@@ -675,7 +675,7 @@ static void cleanup(void)
* Returns: the new client_data structure, or NULL on failure.
*
* Effects:
- *
+ *
* A new client_data is created and stored in the hash table and
* b-tree. A new key that is unique in the current database is
* chosen; this key should be used as the client's client_handle.
@@ -685,41 +685,41 @@ static svc_auth_gssapi_data *create_client(void)
client_list *c;
svc_auth_gssapi_data *client_data;
static int client_key = 1;
-
+
PRINTF(("svcauth_gssapi: empty creds, creating\n"));
client_data = (svc_auth_gssapi_data *) malloc(sizeof(*client_data));
if (client_data == NULL)
return NULL;
memset(client_data, 0, sizeof(*client_data));
- L_PRINTF(2, ("create_client: new client_data = %p\n",
+ L_PRINTF(2, ("create_client: new client_data = %p\n",
(void *) client_data));
-
+
/* set up client data structure */
client_data->established = 0;
client_data->context = GSS_C_NO_CONTEXT;
client_data->expiration = time(0) + INITIATION_TIMEOUT;
-
+
/* set up psycho-recursive SVCAUTH hack */
client_data->svcauth.svc_ah_ops = &svc_auth_gssapi_ops;
client_data->svcauth.svc_ah_private = (caddr_t) client_data;
client_data->key = client_key++;
-
+
c = (client_list *) malloc(sizeof(client_list));
if (c == NULL)
return NULL;
c->client = client_data;
c->next = NULL;
-
-
+
+
if (clients == NULL)
clients = c;
else {
c->next = clients;
clients = c;
}
-
+
PRINTF(("svcauth_gssapi: new handle %d\n", client_data->key));
L_PRINTF(2, ("create_client: done\n"));
@@ -773,18 +773,18 @@ static svc_auth_gssapi_data *get_client(gss_buffer_t client_handle)
{
client_list *c;
uint32_t handle;
-
+
memcpy(&handle, client_handle->value, 4);
-
+
L_PRINTF(2, ("get_client: looking for client %d\n", handle));
-
+
c = clients;
while (c) {
if (c->client->key == handle)
return c->client;
c = c->next;
}
-
+
L_PRINTF(2, ("get_client: client_handle lookup failed\n"));
return NULL;
}
@@ -825,7 +825,7 @@ static void destroy_client(svc_auth_gssapi_data *client_data)
if (gssstat != GSS_S_COMPLETE)
AUTH_GSSAPI_DISPLAY_STATUS(("deleting context", gssstat,
minor_stat));
-
+
gss_release_buffer(&minor_stat, &out_buf);
gss_release_name(&minor_stat, &client_data->client_name);
if (client_data->prev_verf.length != 0)
@@ -854,13 +854,13 @@ static void destroy_client(svc_auth_gssapi_data *client_data)
PRINTF(("destroy_client: client_handle delete failed\n"));
abort();
}
-
+
done:
-
+
L_PRINTF(2, ("destroy_client: client %d destroyed\n", client_data->key));
-
+
free(client_data);
-
+
#if 0 /*ifdef PURIFY*/
purify_watch_n(client_data, sizeof(*client_data), "rw");
#endif
@@ -894,10 +894,10 @@ static void clean_client(void)
c = clients;
while (c) {
client_data = c->client;
-
+
L_PRINTF(2, ("clean_client: client_data = %p\n",
(void *) client_data));
-
+
if (client_data->expiration < time(0)) {
PRINTF(("clean_client: client %d expired\n",
client_data->key));
@@ -926,28 +926,28 @@ bool_t svcauth_gssapi_set_names(
OM_uint32 gssstat, minor_stat;
gss_buffer_desc in_buf;
int i;
-
+
if (num == 0)
for (; names[num].name != NULL; num++)
;
server_creds_list = NULL;
server_name_list = NULL;
-
+
server_creds_list = (gss_cred_id_t *) malloc(num*sizeof(gss_cred_id_t));
if (server_creds_list == NULL)
goto fail;
server_name_list = (gss_name_t *) malloc(num*sizeof(gss_name_t));
if (server_name_list == NULL)
goto fail;
-
+
for (i = 0; i < num; i++) {
server_name_list[i] = 0;
server_creds_list[i] = 0;
}
server_creds_count = num;
-
+
for (i = 0; i < num; i++) {
in_buf.value = names[i].name;
in_buf.length = strlen(in_buf.value) + 1;
@@ -955,8 +955,8 @@ bool_t svcauth_gssapi_set_names(
PRINTF(("svcauth_gssapi_set_names: importing %s\n", names[i].name));
gssstat = gss_import_name(&minor_stat, &in_buf, names[i].type,
- &server_name_list[i]);
-
+ &server_name_list[i]);
+
if (gssstat != GSS_S_COMPLETE) {
AUTH_GSSAPI_DISPLAY_STATUS(("importing name", gssstat,
minor_stat));
diff --git a/src/lib/rpc/svc_auth_none.c b/src/lib/rpc/svc_auth_none.c
index 2df9580..ab9942e 100644
--- a/src/lib/rpc/svc_auth_none.c
+++ b/src/lib/rpc/svc_auth_none.c
@@ -1,6 +1,6 @@
/*
svc_auth_none.c
-
+
Copyright (c) 2000 The Regents of the University of Michigan.
All rights reserved.
@@ -70,6 +70,6 @@ gssrpc__svcauth_none(struct svc_req *rqst, struct rpc_msg *msg,
bool_t *no_dispatch)
{
rqst->rq_xprt->xp_auth = &svc_auth_none;
-
+
return (AUTH_OK);
}
diff --git a/src/lib/rpc/svc_auth_unix.c b/src/lib/rpc/svc_auth_unix.c
index 016644b..160188e 100644
--- a/src/lib/rpc/svc_auth_unix.c
+++ b/src/lib/rpc/svc_auth_unix.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -68,7 +68,7 @@ gssrpc__svcauth_unix(
register int i;
rqst->rq_xprt->xp_auth = &svc_auth_none;
-
+
area = (struct area *) rqst->rq_clntcred;
aup = &area->area_aup;
aup->aup_machname = area->area_machname;
@@ -130,7 +130,7 @@ done:
* Looks up longhand in a cache.
*/
/*ARGSUSED*/
-enum auth_stat
+enum auth_stat
gssrpc__svcauth_short(
struct svc_req *rqst,
struct rpc_msg *msg,
diff --git a/src/lib/rpc/svc_raw.c b/src/lib/rpc/svc_raw.c
index d2507ae..8ca65cb 100644
--- a/src/lib/rpc/svc_raw.c
+++ b/src/lib/rpc/svc_raw.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -143,7 +143,7 @@ svcraw_getargs(SVCXPRT *xprt, xdrproc_t xdr_args, void *args_ptr)
static bool_t
svcraw_freeargs(SVCXPRT *xprt, xdrproc_t xdr_args, void *args_ptr)
-{
+{
register struct svcraw_private *srp = svcraw_private;
register XDR *xdrs;
@@ -152,7 +152,7 @@ svcraw_freeargs(SVCXPRT *xprt, xdrproc_t xdr_args, void *args_ptr)
xdrs = &srp->xdr_stream;
xdrs->x_op = XDR_FREE;
return ((*xdr_args)(xdrs, args_ptr));
-}
+}
static void
svcraw_destroy(SVCXPRT *xprt)
diff --git a/src/lib/rpc/svc_run.c b/src/lib/rpc/svc_run.c
index b661f88..43d6f05 100644
--- a/src/lib/rpc/svc_run.c
+++ b/src/lib/rpc/svc_run.c
@@ -10,23 +10,23 @@ static char sccsid[] = "@(#)svc_run.c 1.1 87/10/13 Copyr 1984 Sun Micro";
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
diff --git a/src/lib/rpc/svc_simple.c b/src/lib/rpc/svc_simple.c
index 6ae85ce..64e720c 100644
--- a/src/lib/rpc/svc_simple.c
+++ b/src/lib/rpc/svc_simple.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -31,7 +31,7 @@
static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro";
#endif
-/*
+/*
* svc_simple.c
* Simplified front end to rpc.
*
@@ -65,7 +65,7 @@ registerrpc(
xdrproc_t outproc)
{
struct proglst *pl;
-
+
if (procnum == NULLPROC) {
(void) fprintf(stderr,
"can't reassign procedure number %d\n", NULLPROC);
@@ -109,7 +109,7 @@ universal(
char xdrbuf[UDPMSGSIZE];
struct proglst *pl;
- /*
+ /*
* enforce "procnum 0 is echo" convention
*/
if (rqstp->rq_proc == NULLPROC) {
@@ -146,4 +146,3 @@ universal(
(void) fprintf(stderr, "never registered prog %d\n", prog);
exit(1);
}
-
diff --git a/src/lib/rpc/svc_tcp.c b/src/lib/rpc/svc_tcp.c
index 46c207a..796627f 100644
--- a/src/lib/rpc/svc_tcp.c
+++ b/src/lib/rpc/svc_tcp.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -32,7 +32,7 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";
#endif
/*
- * svc_tcp.c, Server side for TCP/IP based RPC.
+ * svc_tcp.c, Server side for TCP/IP based RPC.
*
* Copyright (C) 1984, Sun Microsystems, Inc.
*
@@ -223,7 +223,7 @@ makefd_xprt(
{
register SVCXPRT *xprt;
register struct tcp_conn *cd;
-
+
#ifdef FD_SETSIZE
if (fd >= FD_SETSIZE) {
(void) fprintf(stderr, "svc_tcp: makefd_xprt: fd too high\n");
@@ -288,7 +288,7 @@ rendezvous_request(
set_cloexec_fd(sock);
if (getsockname(sock, (struct sockaddr *) &laddr, &llen) < 0)
return (FALSE);
-
+
/*
* make a new transporter (re-uses xprt)
*/
@@ -477,7 +477,7 @@ static bool_t svctcp_reply(
(struct tcp_conn *)(xprt->xp_p1);
register XDR *xdrs = &(cd->xdrs);
register bool_t stat;
-
+
xdrproc_t xdr_results;
caddr_t xdr_location;
bool_t has_args;
@@ -487,12 +487,12 @@ static bool_t svctcp_reply(
has_args = TRUE;
xdr_results = msg->acpted_rply.ar_results.proc;
xdr_location = msg->acpted_rply.ar_results.where;
-
+
msg->acpted_rply.ar_results.proc = xdr_void;
msg->acpted_rply.ar_results.where = NULL;
} else
has_args = FALSE;
-
+
xdrs->x_op = XDR_ENCODE;
msg->rm_xid = cd->x_id;
stat = FALSE;
@@ -530,4 +530,3 @@ static bool_t abortx_freeargs(
{
return abortx();
}
-
diff --git a/src/lib/rpc/svc_udp.c b/src/lib/rpc/svc_udp.c
index 232872d..a85bf9a 100644
--- a/src/lib/rpc/svc_udp.c
+++ b/src/lib/rpc/svc_udp.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -177,7 +177,7 @@ static enum xprt_stat
svcudp_stat(SVCXPRT *xprt)
{
- return (XPRT_IDLE);
+ return (XPRT_IDLE);
}
static bool_t
@@ -208,7 +208,7 @@ svcudp_recv(
else
return (FALSE);
}
-
+
xprt->xp_addrlen = sizeof(struct sockaddr_in);
rlen = recvfrom(xprt->xp_sock, rpc_buffer(xprt), (int) su->su_iosz,
0, (struct sockaddr *)&(xprt->xp_raddr), &(xprt->xp_addrlen));
@@ -239,7 +239,7 @@ static bool_t svcudp_reply(
register XDR *xdrs = &(su->su_xdrs);
register int slen;
register bool_t stat = FALSE;
-
+
xdrproc_t xdr_results;
caddr_t xdr_location;
bool_t has_args;
@@ -249,12 +249,12 @@ static bool_t svcudp_reply(
has_args = TRUE;
xdr_results = msg->acpted_rply.ar_results.proc;
xdr_location = msg->acpted_rply.ar_results.where;
-
+
msg->acpted_rply.ar_results.proc = xdr_void;
msg->acpted_rply.ar_results.where = NULL;
} else
has_args = FALSE;
-
+
xdrs->x_op = XDR_ENCODE;
XDR_SETPOS(xdrs, 0);
msg->rm_xid = su->su_xid;
@@ -337,7 +337,7 @@ svcudp_destroy(register SVCXPRT *xprt)
(type *) mem_alloc((unsigned) (sizeof(type) * (size)))
#define BZERO(addr, type, size) \
- memset(addr, 0, sizeof(type) * (int) (size))
+ memset(addr, 0, sizeof(type) * (int) (size))
/*
* An entry in the cache
@@ -360,7 +360,7 @@ struct cache_node {
/*
* Next node on the list, if there is a collision
*/
- cache_ptr cache_next;
+ cache_ptr cache_next;
};
@@ -384,11 +384,11 @@ struct udp_cache {
* the hashing function
*/
#define CACHE_LOC(transp, xid) \
- (xid % (SPARSENESS*((struct udp_cache *) su_data(transp)->su_cache)->uc_size))
+ (xid % (SPARSENESS*((struct udp_cache *) su_data(transp)->su_cache)->uc_size))
/*
- * Enable use of the cache.
+ * Enable use of the cache.
* Note: there is no disable.
*/
int
@@ -401,7 +401,7 @@ svcudp_enablecache(
if (su->su_cache != NULL) {
CACHE_PERROR("enablecache: cache already enabled");
- return(0);
+ return(0);
}
uc = ALLOC(struct udp_cache, 1);
if (uc == NULL) {
@@ -435,7 +435,7 @@ cache_set(
SVCXPRT *xprt,
uint32_t replylen)
{
- register cache_ptr victim;
+ register cache_ptr victim;
register cache_ptr *vicp;
register struct svcudp_data *su = su_data(xprt);
struct udp_cache *uc = (struct udp_cache *) su->su_cache;
@@ -449,9 +449,9 @@ cache_set(
victim = uc->uc_fifo[uc->uc_nextvictim];
if (victim != NULL) {
loc = CACHE_LOC(xprt, victim->cache_xid);
- for (vicp = &uc->uc_entries[loc];
- *vicp != NULL && *vicp != victim;
- vicp = &(*vicp)->cache_next)
+ for (vicp = &uc->uc_entries[loc];
+ *vicp != NULL && *vicp != victim;
+ vicp = &(*vicp)->cache_next)
;
if (*vicp == NULL) {
CACHE_PERROR("cache_set: victim not found");
@@ -485,7 +485,7 @@ cache_set(
victim->cache_prog = uc->uc_prog;
victim->cache_addr = uc->uc_addr;
loc = CACHE_LOC(xprt, victim->cache_xid);
- victim->cache_next = uc->uc_entries[loc];
+ victim->cache_next = uc->uc_entries[loc];
uc->uc_entries[loc] = victim;
uc->uc_fifo[uc->uc_nextvictim++] = victim;
uc->uc_nextvictim %= uc->uc_size;
@@ -531,4 +531,3 @@ cache_get(
uc->uc_addr = xprt->xp_raddr;
return(0);
}
-
diff --git a/src/lib/rpc/unit-test/client.c b/src/lib/rpc/unit-test/client.c
index 662a8c5..df7144a 100644
--- a/src/lib/rpc/unit-test/client.c
+++ b/src/lib/rpc/unit-test/client.c
@@ -74,7 +74,7 @@ main(argc, argv)
count = 1026;
auth_once = 0;
prot = NULL;
-
+
while ((c = getopt(argc, argv, "a:m:os:tu")) != -1) {
switch (c) {
case 'a':
@@ -120,20 +120,20 @@ main(argc, argv)
default:
usage();
}
-
+
/* client handle to rstat */
clnt = clnt_create(host, RPC_TEST_PROG, RPC_TEST_VERS_1, prot);
if (clnt == NULL) {
clnt_pcreateerror(whoami);
exit(1);
}
-
+
clnt->cl_auth = auth_gssapi_create_default(clnt, target);
if (clnt->cl_auth == NULL) {
clnt_pcreateerror(whoami);
exit(2);
}
-
+
/*
* Call the echo service multiple times.
*/
@@ -183,7 +183,7 @@ main(argc, argv)
echo_resp = rpc_test_echo_1(&echo_arg, clnt);
if (echo_resp == NULL)
clnt_perror(clnt, "Sequence number improperly reset");
-
+
/*
* Now simulate a lost server response, and see if
* auth_gssapi_refresh recovers.
@@ -193,7 +193,7 @@ main(argc, argv)
echo_resp = rpc_test_echo_1(&echo_arg, clnt);
if (echo_resp == NULL)
clnt_perror(clnt, "Auto-resynchronization failed");
-
+
/*
* Now make sure auto-resyncrhonization actually worked
*/
@@ -207,7 +207,7 @@ main(argc, argv)
* unique. Create another context from the same credentials; it
* should have the same expiration time and will cause the server
* to abort if the clients are not differentiated.
- *
+ *
* Test fix for secure-rpc/586, part 2: btree keys cannot be
* mutated in place. To test this: a second client, *with a
* later expiration time*, must be run. The second client should
@@ -238,7 +238,7 @@ main(argc, argv)
AUTH_DESTROY(clnt->cl_auth);
clnt->cl_auth = tmp_auth;
}
-
+
/*
* Try RPC calls with argument/result lengths [0, 1025]. Do
* this last, since it takes a while..
@@ -258,7 +258,7 @@ main(argc, argv)
"RPC_TEST_LENGTHS call %d response wrong\n", i);
gssrpc_xdr_free(xdr_wrapstring, echo_resp);
}
-
+
/* cycle from 1 to 255 */
buf[i] = (i % 255) + 1;
@@ -273,4 +273,3 @@ main(argc, argv)
CLNT_DESTROY(clnt);
exit(0);
}
-
diff --git a/src/lib/rpc/unit-test/server.c b/src/lib/rpc/unit-test/server.c
index e373a33..ee54465 100644
--- a/src/lib/rpc/unit-test/server.c
+++ b/src/lib/rpc/unit-test/server.c
@@ -68,7 +68,7 @@ main(int argc, char **argv)
extern int optind;
#ifdef POSIX_SIGNALS
struct sigaction sa;
-#endif
+#endif
names[0].name = SERVICE_NAME;
names[0].type = (gss_OID) gss_nt_service_name;
@@ -118,13 +118,13 @@ main(int argc, char **argv)
exit(1);
}
if (!svc_register(transp, RPC_TEST_PROG, RPC_TEST_VERS_1,
- rpc_test_prog_1_svc, prot)) {
+ rpc_test_prog_1_svc, prot)) {
fprintf(stderr,
"unable to register (RPC_TEST_PROG, RPC_TEST_VERS_1, %s).",
prot == IPPROTO_TCP ? "tcp" : "udp");
exit(1);
}
-
+
if (svcauth_gssapi_set_names(names, 0) == FALSE) {
fprintf(stderr, "unable to set gssapi names\n");
exit(1);
@@ -147,7 +147,7 @@ main(int argc, char **argv)
signal(SIGTERM, handlesig);
#endif
printf("running\n");
-
+
svc_run();
fprintf(stderr, "svc_run returned");
exit(1);
@@ -177,7 +177,7 @@ static void rpc_test_badverf(gss_name_t client, gss_name_t server,
printf("rpc_test server: bad verifier from %.*s at %s:%d for %.*s\n",
(int) client_name.length, (char *) client_name.value,
- inet_ntoa(rqst->rq_xprt->xp_raddr.sin_addr),
+ inet_ntoa(rqst->rq_xprt->xp_raddr.sin_addr),
ntohs(rqst->rq_xprt->xp_raddr.sin_port),
(int) server_name.length, (char *) server_name.value);
@@ -205,7 +205,7 @@ void rpc_test_badauth(OM_uint32 major, OM_uint32 minor,
struct sockaddr_in *addr, caddr_t data)
{
char *a;
-
+
/* Authentication attempt failed: <IP address>, <GSS-API error */
/* strings> */
@@ -220,7 +220,7 @@ void log_miscerr(struct svc_req *rqst, struct rpc_msg *msg,
char *error, char *data)
{
char *a;
-
+
a = inet_ntoa(rqst->rq_xprt->xp_raddr.sin_addr);
printf("Miscellaneous RPC error: %s, %s\n", a, error);
}
@@ -243,19 +243,19 @@ void log_badauth_display_status_1(OM_uint32 code, int type, int rec)
&msg_ctx, &msg);
if (gssstat != GSS_S_COMPLETE) {
if (!rec) {
- log_badauth_display_status_1(gssstat,GSS_C_GSS_CODE,1);
+ log_badauth_display_status_1(gssstat,GSS_C_GSS_CODE,1);
log_badauth_display_status_1(minor_stat,
GSS_C_MECH_CODE, 1);
} else
printf("GSS-API authentication error %.*s: "
- "recursive failure!\n", (int) msg.length,
+ "recursive failure!\n", (int) msg.length,
(char *)msg.value);
return;
}
-
- printf(", %.*s", (int) msg.length, (char *)msg.value);
+
+ printf(", %.*s", (int) msg.length, (char *)msg.value);
(void) gss_release_buffer(&minor_stat, &msg);
-
+
if (!msg_ctx)
break;
}
diff --git a/src/lib/rpc/xdr.c b/src/lib/rpc/xdr.c
index 5eb6eaa..ff67e90 100644
--- a/src/lib/rpc/xdr.c
+++ b/src/lib/rpc/xdr.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -74,7 +74,7 @@ void
xdr_free(xdrproc_t proc, void *objp)
{
XDR x;
-
+
x.x_op = XDR_FREE;
(*proc)(&x, objp);
}
@@ -501,7 +501,7 @@ xdr_int32(XDR *xdrs, int32_t *ip)
case XDR_ENCODE:
VALGRIND_CHECK_DEFINED(*ip);
l = *ip;
- return (xdr_long(xdrs, &l));
+ return (xdr_long(xdrs, &l));
case XDR_DECODE:
if (!xdr_long(xdrs, &l)) {
@@ -511,7 +511,7 @@ xdr_int32(XDR *xdrs, int32_t *ip)
return (TRUE);
case XDR_FREE:
- return (TRUE);
+ return (TRUE);
}
return (FALSE);
}
@@ -526,7 +526,7 @@ xdr_u_int32(XDR *xdrs, uint32_t *up)
case XDR_ENCODE:
VALGRIND_CHECK_DEFINED(*up);
ul = *up;
- return (xdr_u_long(xdrs, &ul));
+ return (xdr_u_long(xdrs, &ul));
case XDR_DECODE:
if (!xdr_u_long(xdrs, &ul)) {
@@ -536,7 +536,7 @@ xdr_u_int32(XDR *xdrs, uint32_t *up)
return (TRUE);
case XDR_FREE:
- return (TRUE);
+ return (TRUE);
}
return (FALSE);
}
@@ -661,8 +661,8 @@ xdr_string(XDR *xdrs, char **cpp, u_int maxsize)
return (FALSE);
}
-/*
- * Wrapper for xdr_string that can be called directly from
+/*
+ * Wrapper for xdr_string that can be called directly from
* routines like clnt_call
*/
bool_t
diff --git a/src/lib/rpc/xdr_alloc.c b/src/lib/rpc/xdr_alloc.c
index b0aa032..cbba857 100644
--- a/src/lib/rpc/xdr_alloc.c
+++ b/src/lib/rpc/xdr_alloc.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -61,7 +61,7 @@ static struct xdr_ops xdralloc_ops = {
/*
* The procedure xdralloc_create initializes a stream descriptor for a
- * memory buffer.
+ * memory buffer.
*/
void xdralloc_create(XDR *xdrs, enum xdr_op op)
{
diff --git a/src/lib/rpc/xdr_array.c b/src/lib/rpc/xdr_array.c
index 7d5745d..18dfac6 100644
--- a/src/lib/rpc/xdr_array.c
+++ b/src/lib/rpc/xdr_array.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -93,7 +93,7 @@ xdr_array(
return (TRUE);
*addrp = target = mem_alloc(nodesize);
if (target == NULL) {
- (void) fprintf(stderr,
+ (void) fprintf(stderr,
"xdr_array: out of memory\n");
return (FALSE);
}
@@ -106,7 +106,7 @@ xdr_array(
case XDR_ENCODE:
break;
}
-
+
/*
* now we xdr each element of array
*/
@@ -153,6 +153,5 @@ xdr_vector(
}
elptr += elemsize;
}
- return(TRUE);
+ return(TRUE);
}
-
diff --git a/src/lib/rpc/xdr_float.c b/src/lib/rpc/xdr_float.c
index 3e4805d..73faa72 100644
--- a/src/lib/rpc/xdr_float.c
+++ b/src/lib/rpc/xdr_float.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
diff --git a/src/lib/rpc/xdr_mem.c b/src/lib/rpc/xdr_mem.c
index 6908aa8..f54bb88 100644
--- a/src/lib/rpc/xdr_mem.c
+++ b/src/lib/rpc/xdr_mem.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -72,7 +72,7 @@ static struct xdr_ops xdrmem_ops = {
/*
* The procedure xdrmem_create initializes a stream descriptor for a
- * memory buffer.
+ * memory buffer.
*/
void
xdrmem_create(
diff --git a/src/lib/rpc/xdr_rec.c b/src/lib/rpc/xdr_rec.c
index 05e42e9..1a203d0 100644
--- a/src/lib/rpc/xdr_rec.c
+++ b/src/lib/rpc/xdr_rec.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -44,7 +44,7 @@ static char sccsid[] = "@(#)xdr_rec.c 1.21 87/08/11 Copyr 1984 Sun Micro";
* by n bytes of data, where n is contained in the header. The header
* is represented as a htonl(uint32_t). Thegh order bit encodes
* whether or not the fragment is the last fragment of the record
- * (1 => fragment is last, 0 => more fragments to follow.
+ * (1 => fragment is last, 0 => more fragments to follow.
* The other 31 bits encode the byte length of the fragment.
*/
@@ -147,8 +147,8 @@ xdrrec_create(
if (rstrm == NULL) {
(void)fprintf(stderr, "xdrrec_create: out of memory\n");
- /*
- * This is bad. Should rework xdrrec_create to
+ /*
+ * This is bad. Should rework xdrrec_create to
* return a handle, and in this case return NULL
*/
return;
@@ -256,7 +256,7 @@ xdrrec_getbytes(XDR *xdrs, caddr_t addr, u_int len)
current = (len < current) ? len : current;
if (! get_input_bytes(rstrm, addr, current))
return (FALSE);
- addr += current;
+ addr += current;
rstrm->fbtbc -= current;
len -= current;
}
@@ -270,7 +270,7 @@ xdrrec_putbytes(XDR *xdrs, caddr_t addr, u_int len)
register size_t current;
while (len > 0) {
- current = (size_t) ((long)rstrm->out_boundry -
+ current = (size_t) ((long)rstrm->out_boundry -
(long)rstrm->out_finger);
current = (len < current) ? len : current;
memmove(rstrm->out_finger, addr, current);
@@ -418,7 +418,7 @@ xdrrec_skiprecord(XDR *xdrs)
/*
* Look ahead fuction.
- * Returns TRUE iff there is no more input in the buffer
+ * Returns TRUE iff there is no more input in the buffer
* after consuming the rest of the current record.
*/
bool_t
@@ -472,7 +472,7 @@ static bool_t
flush_out(RECSTREAM *rstrm, bool_t eor)
{
register uint32_t eormask = (eor == TRUE) ? LAST_FRAG : 0;
- register uint32_t len = (u_long)(rstrm->out_finger) -
+ register uint32_t len = (u_long)(rstrm->out_finger) -
(u_long)(rstrm->frag_header) - BYTES_PER_XDR_UNIT;
*(rstrm->frag_header) = htonl(len | eormask);
@@ -510,7 +510,7 @@ get_input_bytes(RECSTREAM *rstrm, caddr_t addr, int len)
register size_t current;
while (len > 0) {
- current = (size_t)((long)rstrm->in_boundry -
+ current = (size_t)((long)rstrm->in_boundry -
(long)rstrm->in_finger);
if (current == 0) {
if (! fill_input_buf(rstrm))
@@ -546,7 +546,7 @@ skip_input_bytes(RECSTREAM *rstrm, int32_t cnt)
register int current;
while (cnt > 0) {
- current = (int)((long)rstrm->in_boundry -
+ current = (int)((long)rstrm->in_boundry -
(long)rstrm->in_finger);
if (current == 0) {
if (! fill_input_buf(rstrm))
diff --git a/src/lib/rpc/xdr_reference.c b/src/lib/rpc/xdr_reference.c
index 50a4fe4..323de5e 100644
--- a/src/lib/rpc/xdr_reference.c
+++ b/src/lib/rpc/xdr_reference.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
diff --git a/src/lib/rpc/xdr_sizeof.c b/src/lib/rpc/xdr_sizeof.c
index 3a1c1e1..85e394d 100644
--- a/src/lib/rpc/xdr_sizeof.c
+++ b/src/lib/rpc/xdr_sizeof.c
@@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
diff --git a/src/lib/rpc/xdr_stdio.c b/src/lib/rpc/xdr_stdio.c
index 471d9f2..9b2a590 100644
--- a/src/lib/rpc/xdr_stdio.c
+++ b/src/lib/rpc/xdr_stdio.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -122,7 +122,7 @@ static bool_t
xdrstdio_getbytes(XDR *xdrs, caddr_t addr, u_int len)
{
- if ((len != 0) && (fread(addr, (size_t)len, 1,
+ if ((len != 0) && (fread(addr, (size_t)len, 1,
(FILE *)xdrs->x_private) != 1))
return (FALSE);
return (TRUE);
@@ -132,7 +132,7 @@ static bool_t
xdrstdio_putbytes(XDR *xdrs, caddr_t addr, u_int len)
{
- if ((len != 0) && (fwrite(addr, (size_t)len, 1,
+ if ((len != 0) && (fwrite(addr, (size_t)len, 1,
(FILE *)xdrs->x_private) != 1))
return (FALSE);
return (TRUE);
@@ -147,7 +147,7 @@ xdrstdio_getpos(XDR *xdrs)
static bool_t
xdrstdio_setpos(XDR *xdrs, u_int pos)
-{
+{
return ((fseek((FILE *)xdrs->x_private, (long)pos, 0) < 0) ?
FALSE : TRUE);