auth.h | auth.h | |||
---|---|---|---|---|
skipping to change at line 54 | skipping to change at line 54 | |||
*/ | */ | |||
#ifndef _TIRPC_AUTH_H | #ifndef _TIRPC_AUTH_H | |||
#define _TIRPC_AUTH_H | #define _TIRPC_AUTH_H | |||
#include <rpc/xdr.h> | #include <rpc/xdr.h> | |||
#include <rpc/clnt_stat.h> | #include <rpc/clnt_stat.h> | |||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | |||
#include <sys/socket.h> | #include <sys/socket.h> | |||
#include <sys/types.h> | #include <sys/types.h> | |||
#include <stdio.h> | ||||
#define MAX_AUTH_BYTES 400 | #define MAX_AUTH_BYTES 400 | |||
#define MAXNETNAMELEN 255 /* maximum length of network user's name */ | #define MAXNETNAMELEN 255 /* maximum length of network user's name */ | |||
/* | /* | |||
* Client side authentication/security data | * Client side authentication/security data | |||
*/ | */ | |||
typedef struct sec_data { | typedef struct sec_data { | |||
u_int secmod; /* security mode number e.g. in nfssec.conf */ | u_int secmod; /* security mode number e.g. in nfssec.conf */ | |||
skipping to change at line 247 | skipping to change at line 246 | |||
#define AUTH_VALIDATE(auth, verfp) \ | #define AUTH_VALIDATE(auth, verfp) \ | |||
((*((auth)->ah_ops->ah_validate))((auth), verfp)) | ((*((auth)->ah_ops->ah_validate))((auth), verfp)) | |||
#define auth_validate(auth, verfp) \ | #define auth_validate(auth, verfp) \ | |||
((*((auth)->ah_ops->ah_validate))((auth), verfp)) | ((*((auth)->ah_ops->ah_validate))((auth), verfp)) | |||
#define AUTH_REFRESH(auth, msg) \ | #define AUTH_REFRESH(auth, msg) \ | |||
((*((auth)->ah_ops->ah_refresh))(auth, msg)) | ((*((auth)->ah_ops->ah_refresh))(auth, msg)) | |||
#define auth_refresh(auth, msg) \ | #define auth_refresh(auth, msg) \ | |||
((*((auth)->ah_ops->ah_refresh))(auth, msg)) | ((*((auth)->ah_ops->ah_refresh))(auth, msg)) | |||
#if defined(__GNUC__) && defined(DEBUG) | ||||
#define auth_log_debug(fmt,args...) printf(stderr, fmt, args) | ||||
#else | ||||
#define auth_log_debug(fmt,args...) | ||||
#endif | ||||
#define AUTH_DESTROY(auth) \ | #define AUTH_DESTROY(auth) \ | |||
do { \ | do { \ | |||
int refs; \ | int refs; \ | |||
if ((refs = auth_put((auth))) == 0) \ | if ((refs = auth_put((auth))) == 0) \ | |||
((*((auth)->ah_ops->ah_destroy))(auth));\ | ((*((auth)->ah_ops->ah_destroy))(auth));\ | |||
auth_log_debug("%s: auth_put(), refs %d\n", \ | ||||
__func__, refs); \ | ||||
} while (0) | } while (0) | |||
#define auth_destroy(auth) \ | #define auth_destroy(auth) \ | |||
do { \ | do { \ | |||
int refs; \ | int refs; \ | |||
if ((refs = auth_put((auth))) == 0) \ | if ((refs = auth_put((auth))) == 0) \ | |||
((*((auth)->ah_ops->ah_destroy))(auth));\ | ((*((auth)->ah_ops->ah_destroy))(auth));\ | |||
auth_log_debug("%s: auth_put(), refs %d\n", \ | ||||
__func__, refs); \ | ||||
} while (0) | } while (0) | |||
#define AUTH_WRAP(auth, xdrs, xfunc, xwhere) \ | #define AUTH_WRAP(auth, xdrs, xfunc, xwhere) \ | |||
((*((auth)->ah_ops->ah_wrap))(auth, xdrs, \ | ((*((auth)->ah_ops->ah_wrap))(auth, xdrs, \ | |||
xfunc, xwhere)) | xfunc, xwhere)) | |||
#define auth_wrap(auth, xdrs, xfunc, xwhere) \ | #define auth_wrap(auth, xdrs, xfunc, xwhere) \ | |||
((*((auth)->ah_ops->ah_wrap))(auth, xdrs, \ | ((*((auth)->ah_ops->ah_wrap))(auth, xdrs, \ | |||
xfunc, xwhere)) | xfunc, xwhere)) | |||
#define AUTH_UNWRAP(auth, xdrs, xfunc, xwhere) \ | #define AUTH_UNWRAP(auth, xdrs, xfunc, xwhere) \ | |||
End of changes. 4 change blocks. | ||||
11 lines changed or deleted | 0 lines changed or added | |||
xdr.h | xdr.h | |||
---|---|---|---|---|
skipping to change at line 298 | skipping to change at line 298 | |||
* These are the "generic" xdr routines. | * These are the "generic" xdr routines. | |||
*/ | */ | |||
__BEGIN_DECLS | __BEGIN_DECLS | |||
extern bool_t xdr_void(void); | extern bool_t xdr_void(void); | |||
extern bool_t xdr_int(XDR *, int *); | extern bool_t xdr_int(XDR *, int *); | |||
extern bool_t xdr_u_int(XDR *, u_int *); | extern bool_t xdr_u_int(XDR *, u_int *); | |||
extern bool_t xdr_long(XDR *, long *); | extern bool_t xdr_long(XDR *, long *); | |||
extern bool_t xdr_u_long(XDR *, u_long *); | extern bool_t xdr_u_long(XDR *, u_long *); | |||
extern bool_t xdr_short(XDR *, short *); | extern bool_t xdr_short(XDR *, short *); | |||
extern bool_t xdr_u_short(XDR *, u_short *); | extern bool_t xdr_u_short(XDR *, u_short *); | |||
extern bool_t xdr_int8_t(XDR *, int8_t *); | ||||
extern bool_t xdr_u_int8_t(XDR *, uint8_t *); | ||||
extern bool_t xdr_uint8_t(XDR *, uint8_t *); | ||||
extern bool_t xdr_int16_t(XDR *, int16_t *); | extern bool_t xdr_int16_t(XDR *, int16_t *); | |||
extern bool_t xdr_u_int16_t(XDR *, u_int16_t *); | extern bool_t xdr_u_int16_t(XDR *, u_int16_t *); | |||
extern bool_t xdr_uint16_t(XDR *, uint16_t *); | ||||
extern bool_t xdr_int32_t(XDR *, int32_t *); | extern bool_t xdr_int32_t(XDR *, int32_t *); | |||
extern bool_t xdr_u_int32_t(XDR *, u_int32_t *); | extern bool_t xdr_u_int32_t(XDR *, u_int32_t *); | |||
extern bool_t xdr_uint32_t(XDR *, uint32_t *); | ||||
extern bool_t xdr_int64_t(XDR *, int64_t *); | extern bool_t xdr_int64_t(XDR *, int64_t *); | |||
extern bool_t xdr_u_int64_t(XDR *, u_int64_t *); | extern bool_t xdr_u_int64_t(XDR *, u_int64_t *); | |||
extern bool_t xdr_uint64_t(XDR *, uint64_t *); | ||||
extern bool_t xdr_quad_t(XDR *, int64_t *); | ||||
extern bool_t xdr_u_quad_t(XDR *, u_int64_t *); | ||||
extern bool_t xdr_bool(XDR *, bool_t *); | extern bool_t xdr_bool(XDR *, bool_t *); | |||
extern bool_t xdr_enum(XDR *, enum_t *); | extern bool_t xdr_enum(XDR *, enum_t *); | |||
extern bool_t xdr_array(XDR *, char **, u_int *, u_int, u_int, xdrproc_t); | extern bool_t xdr_array(XDR *, char **, u_int *, u_int, u_int, xdrproc_t); | |||
extern bool_t xdr_bytes(XDR *, char **, u_int *, u_int); | extern bool_t xdr_bytes(XDR *, char **, u_int *, u_int); | |||
extern bool_t xdr_opaque(XDR *, char *, u_int); | extern bool_t xdr_opaque(XDR *, char *, u_int); | |||
extern bool_t xdr_string(XDR *, char **, u_int); | extern bool_t xdr_string(XDR *, char **, u_int); | |||
extern bool_t xdr_union(XDR *, enum_t *, char *, const struct xdr_discrim *, xdrproc_t); | extern bool_t xdr_union(XDR *, enum_t *, char *, const struct xdr_discrim *, xdrproc_t); | |||
extern bool_t xdr_char(XDR *, char *); | extern bool_t xdr_char(XDR *, char *); | |||
extern bool_t xdr_u_char(XDR *, u_char *); | extern bool_t xdr_u_char(XDR *, u_char *); | |||
extern bool_t xdr_vector(XDR *, char *, u_int, u_int, xdrproc_t); | extern bool_t xdr_vector(XDR *, char *, u_int, u_int, xdrproc_t); | |||
End of changes. 4 change blocks. | ||||
0 lines changed or deleted | 8 lines changed or added | |||