68#define debug(msg) printf("svcauth_des: %s\n", msg)
70#define USEC_PER_SEC ((u_long) 1000000L)
71#define BEFORE(t1, t2) timercmp(t1, t2, <)
76#define AUTHDES_CACHESZ 64
138 ixdr = (
long *)
msg->rm_call.cb_cred.oa_base;
165 ixdr = (
long *)
msg->rm_call.cb_verf.oa_base;
166 verf.adv_xtimestamp.key.high = (
u_long)*ixdr++;
167 verf.adv_xtimestamp.key.low = (
u_long)*ixdr++;
176 char pkey_data[1024];
180 debug(
"getpublickey");
187 debug(
"decryptsessionkey");
193 debug(
"bad nickname");
203 cryptbuf[0] = verf.adv_xtimestamp;
206 cryptbuf[1].
key.low = verf.adv_winverf;
207 ivec.
key.high = ivec.
key.low = 0;
216 debug(
"decryption failure");
223 ixdr = (
long *)cryptbuf;
241 if (winverf !=
window - 1) {
242 debug(
"window verifier mismatch");
248 debug(
"replayed credential");
258 debug(
"invalid usecs");
264 debug(
"timestamp before last seen");
270 debug(
"timestamp expired");
284 ixdr = (
long *)cryptbuf;
294 debug(
"encryption failure");
297 verf.adv_xtimestamp = cryptbuf[0];
302 ixdr = (
long *)
msg->rm_call.cb_verf.oa_base;
303 *ixdr++ = (
long)verf.adv_xtimestamp.key.high;
304 *ixdr++ = (
long)verf.adv_xtimestamp.key.low;
310 (
char *)ixdr -
msg->rm_call.cb_verf.oa_base;
330 debug(
"out of memory");
332 entry->key = *sessionkey;
393 for (
i = 1; prev !=
sid;
i++) {
418 if (
cp->key.key.high == hi &&
419 cp->key.key.low ==
key->key.low &&
435#if (defined(sun) || defined(vax) || defined(__FreeBSD__))
470 struct bsdcred *cred;
474 debug(
"invalid nickname");
479 cred = (
struct bsdcred *)
mem_alloc(
sizeof(
struct bsdcred));
481 cred->grouplen = INVALID;
483 if (cred->grouplen == INVALID) {
490 debug(
"unknown netname");
494 debug(
"missed ucred cache");
495 *uid = cred->uid = i_uid;
496 *gid = cred->gid = i_gid;
497 *grouplen = cred->grouplen = i_grouplen;
498 for (
i = i_grouplen - 1;
i >= 0;
i--) {
502 }
else if (cred->grouplen ==
UNKNOWN) {
514 *grouplen = cred->grouplen;
515 for (
i = cred->grouplen - 1;
i >= 0;
i--) {
528 ((
struct bsdcred *)cred)->grouplen = INVALID;
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
#define gettimeofday(tv, tz)
__BEGIN_DECLS int authdes_getucred(struct authdes_cred *, uid_t *, gid_t *, int *, gid_t *)
int cbc_crypt(char *key, char *buf, unsigned len, unsigned mode, char *ivec)
int ecb_crypt(char *key, char *buf, unsigned len, unsigned mode)
#define mem_free(ptr, bsize)
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
int getpublickey(char *netname, char *publickey) const
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
struct task_struct * current
static IHTMLWindow2 * window
int netname2user(netname, uid_t *uidp, gid_t *gidp, int *gidlenp, gid_t *gidlist)
static Real area(Real A[2], Real B[2], Real C[2])
struct opaque_auth xp_verf
struct authdes_fullname adc_fullname
enum authdes_namekind adc_namekind
static short * authdes_lru
int key_decryptsession_pk(const char *, netobj *, des_block *)
enum auth_stat _svcauth_des(struct svc_req *rqst, struct rpc_msg *msg)
static struct cache_entry * authdes_cache
static struct @185 svcauthdes_stats
static short cache_victim()
static short cache_spot()
struct des_block::@188 key
#define IXDR_GET_ENUM(buf, t)
#define IXDR_GET_U_LONG(buf)
#define BYTES_PER_XDR_UNIT
#define IXDR_GET_LONG(buf)
#define IXDR_PUT_LONG(buf, v)