Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/gssrpc
File: auth.h
/* @(#)auth.h 2.3 88/08/07 4.0 RPCSRC; from 1.17 88/02/08 SMI */
[0] Fix | Delete
/*
[1] Fix | Delete
* Copyright (c) 2010, Oracle America, Inc.
[2] Fix | Delete
*
[3] Fix | Delete
* All rights reserved.
[4] Fix | Delete
*
[5] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[6] Fix | Delete
* modification, are permitted provided that the following conditions are met:
[7] Fix | Delete
*
[8] Fix | Delete
* * Redistributions of source code must retain the above copyright
[9] Fix | Delete
* notice, this list of conditions and the following disclaimer.
[10] Fix | Delete
*
[11] Fix | Delete
* * Redistributions in binary form must reproduce the above copyright
[12] Fix | Delete
* notice, this list of conditions and the following disclaimer in
[13] Fix | Delete
* the documentation and/or other materials provided with the
[14] Fix | Delete
* distribution.
[15] Fix | Delete
*
[16] Fix | Delete
* * Neither the name of the "Oracle America, Inc." nor the names of
[17] Fix | Delete
* its contributors may be used to endorse or promote products
[18] Fix | Delete
* derived from this software without specific prior written permission.
[19] Fix | Delete
*
[20] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
[21] Fix | Delete
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
[22] Fix | Delete
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
[23] Fix | Delete
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
[24] Fix | Delete
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
[25] Fix | Delete
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
[26] Fix | Delete
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
[27] Fix | Delete
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
[28] Fix | Delete
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
[29] Fix | Delete
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
[30] Fix | Delete
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[31] Fix | Delete
*/
[32] Fix | Delete
[33] Fix | Delete
/*
[34] Fix | Delete
* auth.h, Authentication interface.
[35] Fix | Delete
*
[36] Fix | Delete
* The data structures are completely opaque to the client. The client
[37] Fix | Delete
* is required to pass a AUTH * to routines that create rpc
[38] Fix | Delete
* "sessions".
[39] Fix | Delete
*/
[40] Fix | Delete
#ifndef GSSRPC_AUTH_H
[41] Fix | Delete
#define GSSRPC_AUTH_H
[42] Fix | Delete
[43] Fix | Delete
#include <gssrpc/xdr.h>
[44] Fix | Delete
[45] Fix | Delete
GSSRPC__BEGIN_DECLS
[46] Fix | Delete
[47] Fix | Delete
#define MAX_AUTH_BYTES 400
[48] Fix | Delete
#define MAXNETNAMELEN 255 /* maximum length of network user's name */
[49] Fix | Delete
[50] Fix | Delete
/*
[51] Fix | Delete
* Status returned from authentication check
[52] Fix | Delete
*/
[53] Fix | Delete
enum auth_stat {
[54] Fix | Delete
AUTH_OK=0,
[55] Fix | Delete
/*
[56] Fix | Delete
* failed at remote end
[57] Fix | Delete
*/
[58] Fix | Delete
AUTH_BADCRED=1, /* bogus credentials (seal broken) */
[59] Fix | Delete
AUTH_REJECTEDCRED=2, /* client should begin new session */
[60] Fix | Delete
AUTH_BADVERF=3, /* bogus verifier (seal broken) */
[61] Fix | Delete
AUTH_REJECTEDVERF=4, /* verifier expired or was replayed */
[62] Fix | Delete
AUTH_TOOWEAK=5, /* rejected due to security reasons */
[63] Fix | Delete
/*
[64] Fix | Delete
* failed locally
[65] Fix | Delete
*/
[66] Fix | Delete
AUTH_INVALIDRESP=6, /* bogus response verifier */
[67] Fix | Delete
AUTH_FAILED=7, /* some unknown reason */
[68] Fix | Delete
/*
[69] Fix | Delete
* RPCSEC_GSS errors
[70] Fix | Delete
*/
[71] Fix | Delete
RPCSEC_GSS_CREDPROBLEM = 13,
[72] Fix | Delete
RPCSEC_GSS_CTXPROBLEM = 14
[73] Fix | Delete
};
[74] Fix | Delete
[75] Fix | Delete
union des_block {
[76] Fix | Delete
char c[8];
[77] Fix | Delete
};
[78] Fix | Delete
typedef union des_block des_block;
[79] Fix | Delete
extern bool_t xdr_des_block(XDR *, des_block *);
[80] Fix | Delete
[81] Fix | Delete
/*
[82] Fix | Delete
* Authentication info. Opaque to client.
[83] Fix | Delete
*/
[84] Fix | Delete
struct opaque_auth {
[85] Fix | Delete
enum_t oa_flavor; /* flavor of auth */
[86] Fix | Delete
caddr_t oa_base; /* address of more auth stuff */
[87] Fix | Delete
u_int oa_length; /* not to exceed MAX_AUTH_BYTES */
[88] Fix | Delete
};
[89] Fix | Delete
[90] Fix | Delete
[91] Fix | Delete
/*
[92] Fix | Delete
* Auth handle, interface to client side authenticators.
[93] Fix | Delete
*/
[94] Fix | Delete
struct rpc_msg;
[95] Fix | Delete
[96] Fix | Delete
typedef struct AUTH {
[97] Fix | Delete
struct opaque_auth ah_cred;
[98] Fix | Delete
struct opaque_auth ah_verf;
[99] Fix | Delete
union des_block ah_key;
[100] Fix | Delete
struct auth_ops {
[101] Fix | Delete
void (*ah_nextverf)(struct AUTH *);
[102] Fix | Delete
/* nextverf & serialize */
[103] Fix | Delete
int (*ah_marshal)(struct AUTH *, XDR *);
[104] Fix | Delete
/* validate varifier */
[105] Fix | Delete
int (*ah_validate)(struct AUTH *,
[106] Fix | Delete
struct opaque_auth *);
[107] Fix | Delete
/* refresh credentials */
[108] Fix | Delete
int (*ah_refresh)(struct AUTH *, struct rpc_msg *);
[109] Fix | Delete
/* destroy this structure */
[110] Fix | Delete
void (*ah_destroy)(struct AUTH *);
[111] Fix | Delete
/* encode data for wire */
[112] Fix | Delete
int (*ah_wrap)(struct AUTH *, XDR *,
[113] Fix | Delete
xdrproc_t, caddr_t);
[114] Fix | Delete
/* decode data from wire */
[115] Fix | Delete
int (*ah_unwrap)(struct AUTH *, XDR *,
[116] Fix | Delete
xdrproc_t, caddr_t);
[117] Fix | Delete
} *ah_ops;
[118] Fix | Delete
void *ah_private;
[119] Fix | Delete
} AUTH;
[120] Fix | Delete
[121] Fix | Delete
[122] Fix | Delete
/*
[123] Fix | Delete
* Authentication ops.
[124] Fix | Delete
* The ops and the auth handle provide the interface to the authenticators.
[125] Fix | Delete
*
[126] Fix | Delete
* AUTH *auth;
[127] Fix | Delete
* XDR *xdrs;
[128] Fix | Delete
* struct opaque_auth verf;
[129] Fix | Delete
*/
[130] Fix | Delete
#define AUTH_NEXTVERF(auth) \
[131] Fix | Delete
((*((auth)->ah_ops->ah_nextverf))(auth))
[132] Fix | Delete
#define auth_nextverf(auth) \
[133] Fix | Delete
((*((auth)->ah_ops->ah_nextverf))(auth))
[134] Fix | Delete
[135] Fix | Delete
#define AUTH_MARSHALL(auth, xdrs) \
[136] Fix | Delete
((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
[137] Fix | Delete
#define auth_marshall(auth, xdrs) \
[138] Fix | Delete
((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
[139] Fix | Delete
[140] Fix | Delete
#define AUTH_VALIDATE(auth, verfp) \
[141] Fix | Delete
((*((auth)->ah_ops->ah_validate))((auth), verfp))
[142] Fix | Delete
#define auth_validate(auth, verfp) \
[143] Fix | Delete
((*((auth)->ah_ops->ah_validate))((auth), verfp))
[144] Fix | Delete
[145] Fix | Delete
#define AUTH_REFRESH(auth, msg) \
[146] Fix | Delete
((*((auth)->ah_ops->ah_refresh))(auth, msg))
[147] Fix | Delete
#define auth_refresh(auth, msg) \
[148] Fix | Delete
((*((auth)->ah_ops->ah_refresh))(auth, msg))
[149] Fix | Delete
[150] Fix | Delete
#define AUTH_WRAP(auth, xdrs, xfunc, xwhere) \
[151] Fix | Delete
((*((auth)->ah_ops->ah_wrap))(auth, xdrs, \
[152] Fix | Delete
xfunc, xwhere))
[153] Fix | Delete
#define auth_wrap(auth, xdrs, xfunc, xwhere) \
[154] Fix | Delete
((*((auth)->ah_ops->ah_wrap))(auth, xdrs, \
[155] Fix | Delete
xfunc, xwhere))
[156] Fix | Delete
#define AUTH_UNWRAP(auth, xdrs, xfunc, xwhere) \
[157] Fix | Delete
((*((auth)->ah_ops->ah_unwrap))(auth, xdrs, \
[158] Fix | Delete
xfunc, xwhere))
[159] Fix | Delete
#define auth_unwrap(auth, xdrs, xfunc, xwhere) \
[160] Fix | Delete
((*((auth)->ah_ops->ah_unwrap))(auth, xdrs, \
[161] Fix | Delete
xfunc, xwhere))
[162] Fix | Delete
[163] Fix | Delete
#define AUTH_DESTROY(auth) \
[164] Fix | Delete
((*((auth)->ah_ops->ah_destroy))(auth))
[165] Fix | Delete
#define auth_destroy(auth) \
[166] Fix | Delete
((*((auth)->ah_ops->ah_destroy))(auth))
[167] Fix | Delete
[168] Fix | Delete
[169] Fix | Delete
#ifdef GSSRPC__IMPL
[170] Fix | Delete
/* RENAMED: should be _null_auth if we can use reserved namespace. */
[171] Fix | Delete
extern struct opaque_auth gssrpc__null_auth;
[172] Fix | Delete
#endif
[173] Fix | Delete
[174] Fix | Delete
/*
[175] Fix | Delete
* These are the various implementations of client side authenticators.
[176] Fix | Delete
*/
[177] Fix | Delete
[178] Fix | Delete
/*
[179] Fix | Delete
* Unix style authentication
[180] Fix | Delete
* AUTH *authunix_create(machname, uid, gid, len, aup_gids)
[181] Fix | Delete
* char *machname;
[182] Fix | Delete
* int uid;
[183] Fix | Delete
* int gid;
[184] Fix | Delete
* int len;
[185] Fix | Delete
* int *aup_gids;
[186] Fix | Delete
*/
[187] Fix | Delete
extern AUTH *authunix_create(char *machname, int uid, int gid, int len,
[188] Fix | Delete
int *aup_gids);
[189] Fix | Delete
extern AUTH *authunix_create_default(void); /* takes no parameters */
[190] Fix | Delete
extern AUTH *authnone_create(void); /* takes no parameters */
[191] Fix | Delete
extern AUTH *authdes_create();
[192] Fix | Delete
extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *);
[193] Fix | Delete
[194] Fix | Delete
#define AUTH_NONE 0 /* no authentication */
[195] Fix | Delete
#define AUTH_NULL 0 /* backward compatibility */
[196] Fix | Delete
#define AUTH_UNIX 1 /* unix style (uid, gids) */
[197] Fix | Delete
#define AUTH_SHORT 2 /* short hand unix style */
[198] Fix | Delete
#define AUTH_DES 3 /* des style (encrypted timestamps) */
[199] Fix | Delete
#define AUTH_GSSAPI 300001 /* GSS-API style */
[200] Fix | Delete
#define RPCSEC_GSS 6 /* RPCSEC_GSS */
[201] Fix | Delete
[202] Fix | Delete
GSSRPC__END_DECLS
[203] Fix | Delete
[204] Fix | Delete
#endif /* !defined(GSSRPC_AUTH_H) */
[205] Fix | Delete
[206] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function