Purpose
Indicates that the service dispatch routine cannot complete the remote procedure call due to insufficient authentication security parameters.
Library
C Library (libc.a)
Syntax
#include <rpc/rpc.h>
void svcerr_weakauth ( xprt)
SVCXPRT *xprt;
Description
The svcerr_weakauth subroutine is called by a service dispatch routine that cannot make the remote procedure call (RPC) because the supplied authentication parameters are insufficient for security reasons.
The svcerr_weakauth subroutine calls the svcerr_auth subroutine with the correct RPC service transport handle (the xprt parameter). The subroutine also sets the status of the RPC reply message to the AUTH_TOOWEAK condition as the authentication error (AUTH_ERR).
Parameters
Item | Description |
---|---|
xprt | Points to the RPC service transport handle. |
Purpose
Indicates that the service dispatch routine cannot complete the remote procedure call due to insufficient authentication security parameters.
Library
Network Services Library (libnsl.a)
Syntax
#include <rpc/rpc.h>
void svcerr_weakauth ( xprt)
const SVCXPRT *xprt;
Description
The svcerr_weakauth subroutine is called by a service dispatch routine that cannot make the remote procedure call (RPC) because the supplied authentication parameters are insufficient for security reasons.
The svcerr_weakauth subroutine calls the svcerr_auth subroutine with the correct RPC service transport handle (the xprt parameter). The subroutine also sets the status of the RPC reply message to the AUTH_TOOWEAK condition as the authentication error (RPC_AUTHERROR).
Parameters
Item | Description |
---|---|
xprt | Points to the RPC service transport handle. |
Examples
#include <rpc/rpc.h>
#include <stdlib.h>
#define PROG 0x3fffffffL
#define VERS 0x1L
static void sample_dispatch();
main()
{
char *nettype;
int no_of_handles;
nettype = "tcp";
/* Create RPC service handle and register with RPCBIND service */
if((no_of_handles = svc_create(sample_dispatch, PROG, VERS,nettype)) == 0)
{
fprintf(stdout,"Error in svc_create!");
exit(EXIT_FAILURE);
}
svc_run();
return 0;
}
/* following is the sample dispatch routine*/
static void sample_dispatch(struct svc_req *request, SVCXPRT *xprt)
{
int result;
enum auth_stat why;
/* Check for appropriate authentication */
/* If insufficient authentication security parameters then send reply to client */
svcerr_weakauth(xprt);
}