Lines Matching refs:reauth

215     reauth_cache_t *reauth;  member
2296 clear_reauth_entry(reauth_entry_t *reauth, enum Context_type type, argument
2299 if (!reauth) return;
2301 if (reauth->authid) utils->free(reauth->authid);
2302 if (reauth->realm) utils->free(reauth->realm);
2303 if (reauth->nonce) utils->free(reauth->nonce);
2304 if (reauth->cnonce) utils->free(reauth->cnonce);
2307 if (reauth->u.c.serverFQDN) utils->free(reauth->u.c.serverFQDN);
2310 memset(reauth, 0, sizeof(reauth_entry_t));
2546 text->reauth = glob_context;
3060 unsigned val = hash(username) % text->reauth->size;
3063 if (sparams->utils->mutex_lock(text->reauth->mutex) == SASL_OK) { /* LOCK */
3064 if (text->reauth->e[val].authid &&
3065 !strcmp(username, text->reauth->e[val].authid)) {
3067 _plug_strdup(sparams->utils, text->reauth->e[val].realm,
3070 _plug_strdup(sparams->utils, (char *)text->reauth->e[val].nonce,
3073 _plug_strdup(sparams->utils, text->reauth->e[val].nonce,
3076 text->nonce_count = ++text->reauth->e[val].nonce_count;
3078 _plug_strdup(sparams->utils, (char *)text->reauth->e[val].cnonce,
3081 _plug_strdup(sparams->utils, text->reauth->e[val].cnonce,
3084 stext->timestamp = text->reauth->e[val].u.s.timestamp;
3086 sparams->utils->mutex_unlock(text->reauth->mutex); /* UNLOCK */
3396 if (text->reauth->timeout &&
3397 time(0) - stext->timestamp > text->reauth->timeout) {
3513 if (text->reauth->timeout &&
3514 sparams->utils->mutex_lock(text->reauth->mutex) == SASL_OK) { /* LOCK */
3515 unsigned val = hash(username) % text->reauth->size;
3522 clear_reauth_entry(&text->reauth->e[val], SERVER, sparams->utils);
3523 text->reauth->e[val].authid = username; username = NULL;
3524 text->reauth->e[val].realm = text->realm; text->realm = NULL;
3525 text->reauth->e[val].nonce = text->nonce; text->nonce = NULL;
3526 text->reauth->e[val].cnonce = cnonce; cnonce = NULL;
3528 if (text->nonce_count <= text->reauth->e[val].nonce_count) {
3530 clear_reauth_entry(&text->reauth->e[val], SERVER, sparams->utils);
3533 text->reauth->e[val].nonce_count = text->nonce_count;
3534 text->reauth->e[val].u.s.timestamp = time(0);
3540 clear_reauth_entry(&text->reauth->e[val], SERVER, sparams->utils);
3546 sparams->utils->mutex_unlock(text->reauth->mutex); /* UNLOCK */
3621 if (clientin && text->reauth->timeout) {
4778 text->reauth = glob_context;
4806 val = hash(params->serverFQDN) % text->reauth->size;
4807 if (params->utils->mutex_lock(text->reauth->mutex) == SASL_OK) { /* LOCK */
4808 if (text->reauth->e[val].u.c.serverFQDN &&
4809 !strcasecmp(text->reauth->e[val].u.c.serverFQDN,
4811 !strcmp(text->reauth->e[val].authid, oparams->authid)) {
4819 _plug_strdup(params->utils, text->reauth->e[val].realm,
4822 _plug_strdup(params->utils, (char *)text->reauth->e[val].nonce,
4825 _plug_strdup(params->utils, text->reauth->e[val].nonce,
4828 text->nonce_count = ++text->reauth->e[val].nonce_count;
4830 _plug_strdup(params->utils, (char *)text->reauth->e[val].cnonce,
4833 _plug_strdup(params->utils, text->reauth->e[val].cnonce,
4836 ctext->protection = text->reauth->e[val].u.c.protection;
4837 ctext->cipher = text->reauth->e[val].u.c.cipher;
4838 ctext->server_maxbuf = text->reauth->e[val].u.c.server_maxbuf;
4840 params->utils->mutex_unlock(text->reauth->mutex); /* UNLOCK */
5004 if (params->utils->mutex_lock(text->reauth->mutex) == SASL_OK) { /* LOCK */
5005 unsigned val = hash(params->serverFQDN) % text->reauth->size;
5010 clear_reauth_entry(&text->reauth->e[val], CLIENT, params->utils);
5012 &text->reauth->e[val].authid, NULL);
5013 text->reauth->e[val].realm = text->realm; text->realm = NULL;
5014 text->reauth->e[val].nonce = text->nonce; text->nonce = NULL;
5015 text->reauth->e[val].nonce_count = text->nonce_count;
5016 text->reauth->e[val].cnonce = text->cnonce; text->cnonce = NULL;
5018 &text->reauth->e[val].u.c.serverFQDN, NULL);
5019 text->reauth->e[val].u.c.protection = ctext->protection;
5020 text->reauth->e[val].u.c.cipher = ctext->cipher;
5021 text->reauth->e[val].u.c.server_maxbuf = ctext->server_maxbuf;
5032 clear_reauth_entry(&text->reauth->e[val], CLIENT, params->utils);
5038 params->utils->mutex_unlock(text->reauth->mutex); /* UNLOCK */
5056 unsigned val = hash(params->serverFQDN) % text->reauth->size;
5068 int reauth = 0; local
5071 if (params->utils->mutex_lock(text->reauth->mutex) == SASL_OK) { /* LOCK */
5072 reauth = text->reauth->e[val].u.c.serverFQDN &&
5073 !strcasecmp(text->reauth->e[val].u.c.serverFQDN,
5075 params->utils->mutex_unlock(text->reauth->mutex); /* UNLOCK */
5077 if (reauth) {
5107 if (params->utils->mutex_lock(text->reauth->mutex) == SASL_OK) { /* LOCK */
5108 clear_reauth_entry(&text->reauth->e[val], CLIENT, params->utils);
5110 params->utils->mutex_unlock(text->reauth->mutex); /* UNLOCK */