diff options
Diffstat (limited to 'libc/inet/rpc/auth_none.c')
-rw-r--r-- | libc/inet/rpc/auth_none.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/libc/inet/rpc/auth_none.c b/libc/inet/rpc/auth_none.c index cb30c40a7..05851025f 100644 --- a/libc/inet/rpc/auth_none.c +++ b/libc/inet/rpc/auth_none.c @@ -35,14 +35,14 @@ * credentials and verifiers to remote systems. */ -#define xdrmem_create __xdrmem_create -#define xdr_opaque_auth __xdr_opaque_auth - #define __FORCE_GLIBC #include <features.h> #include "rpc_private.h" -#define MAX_MARSHEL_SIZE 20 +libc_hidden_proto(xdrmem_create) +libc_hidden_proto(xdr_opaque_auth) + +#define MAX_MARSHAL_SIZE 20 /* * Authenticator operations routines @@ -53,7 +53,7 @@ static bool_t authnone_marshal (AUTH *, XDR *); static bool_t authnone_validate (AUTH *, struct opaque_auth *); static bool_t authnone_refresh (AUTH *); -static struct auth_ops ops = { +static const struct auth_ops ops = { authnone_verf, authnone_marshal, authnone_validate, @@ -61,9 +61,11 @@ static struct auth_ops ops = { authnone_destroy }; +/* Internal data and routines */ + struct authnone_private_s { AUTH no_client; - char marshalled_client[MAX_MARSHEL_SIZE]; + char marshalled_client[MAX_MARSHAL_SIZE]; u_int mcnt; }; #ifdef __UCLIBC_HAS_THREADS__ @@ -72,8 +74,9 @@ struct authnone_private_s { static struct authnone_private_s *authnone_private; #endif -AUTH attribute_hidden * -__authnone_create (void) +libc_hidden_proto(authnone_create) +AUTH * +authnone_create (void) { struct authnone_private_s *ap; XDR xdr_stream; @@ -90,9 +93,9 @@ __authnone_create (void) if (!ap->mcnt) { ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth; - ap->no_client.ah_ops = &ops; + ap->no_client.ah_ops = (struct auth_ops *)&ops; xdrs = &xdr_stream; - xdrmem_create (xdrs, ap->marshalled_client, (u_int) MAX_MARSHEL_SIZE, + xdrmem_create (xdrs, ap->marshalled_client, (u_int) MAX_MARSHAL_SIZE, XDR_ENCODE); (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_cred); (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_verf); @@ -101,9 +104,8 @@ __authnone_create (void) } return (&ap->no_client); } -strong_alias(__authnone_create,authnone_create) +libc_hidden_def(authnone_create) -/*ARGSUSED */ static bool_t authnone_marshal (AUTH *client attribute_unused, XDR *xdrs) { |