/*
SSSD
Kerberos 5 Backend Module - Serialize the request of a user
Authors:
Sumit Bose <sbose@redhat.com>
Copyright (C) 2010 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <tevent.h>
#include <dhash.h>
#include <security/pam_modules.h>
#include "src/providers/krb5/krb5_auth.h"
struct queue_entry {
};
int pam_status, int dp_err);
{
} else {
qe->parent_req);
}
}
{
int pam_status;
int dp_err;
}
}
void *pvt)
{
return;
}
}
struct tevent_req *parent_req,
{
int ret;
&krb5_ctx->wait_queue_hash, 0, 0, 0, 0,
return ret;
}
}
switch (ret) {
case HASH_SUCCESS:
return EINVAL;
}
if (queue_entry == NULL) {
return ENOMEM;
}
break;
case HASH_ERROR_KEY_NOT_FOUND:
return ENOMEM;
}
if (ret != HASH_SUCCESS) {
return EIO;
}
break;
default:
return EIO;
}
return ENOENT;
} else {
return EOK;
}
}
{
int ret;
return;
}
switch (ret) {
case HASH_SUCCESS:
return;
}
"Wait queue for user [%s] is empty.\n", username);
} else {
} else {
return;
}
}
if (ret != HASH_SUCCESS) {
"Failed to remove wait queue for user [%s].\n",
username);
}
break;
case HASH_ERROR_KEY_NOT_FOUND:
"No wait queue for user [%s] found.\n", username);
break;
default:
}
return;
}
struct krb5_auth_queue_state {
int pam_status;
int dp_err;
};
struct tevent_context *ev,
{
return NULL;
}
"Request [%p] successfully added to wait queue "
goto immediate;
} else {
"Failed to add request to wait queue of user [%s], "
}
goto immediate;
}
}
return req;
}
{
return;
}
}
/* This is a violation of the tevent_req style. Ideally, the wait queue would
* be rewritten to the tevent_req style in the future, expose per-request recv
* and not hide the request underneath. But this function allows us to expose
* a tevent_req API for users of this module
*/
int pam_status,
int dp_err)
{
} else {
}
}
int *_pam_status,
int *_dp_err)
{
/* Returning values even on failure is not typical, but IPA password migration
* relies on receiving PAM_CRED_ERR even if the request fails..
*/
if (_pam_status) {
}
if (_dp_err) {
}
return EOK;
}