krb5_renew_tgt.c revision f3f9ce8024d7610439d6c70ddafab1ab025cf8a8
/*
SSSD
Kerberos 5 Backend Module -- Renew a TGT automatically
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 <security/pam_modules.h>
#include "providers/krb5/krb5_common.h"
#include "providers/krb5/krb5_auth.h"
#define INITIAL_TGT_TABLE_SIZE 10
struct renew_tgt_ctx {
struct tevent_context *ev;
struct tevent_timer *te;
};
struct renew_data {
};
struct auth_data {
};
{
struct auth_data);
struct tevent_req *req;
return;
}
}
{
struct auth_data);
int ret;
int pam_status = PAM_SYSTEM_ERR;
int dp_err;
if (ret) {
} else {
switch (pam_status) {
case PAM_SUCCESS:
break;
case PAM_AUTHINFO_UNAVAIL:
case PAM_AUTHTOK_LOCK_BUSY:
"will retry later.\n",
break;
default:
if (ret != HASH_SUCCESS) {
}
}
}
}
{
int ret;
unsigned long count;
size_t c;
struct renew_data *renew_data;
struct tevent_timer *te;
if (ret != HASH_SUCCESS) {
return ENOMEM;
}
for (c = 0; c < count; c++) {
} else {
} else {
}
}
}
if (ret != HASH_SUCCESS) {
}
}
}
}
return EOK;
}
static void renew_tgt_online_callback(void *private_data)
{
struct renew_tgt_ctx);
renew_tgt_ctx->added_to_online_callbacks = false;
}
struct tevent_timer *te,
{
struct renew_tgt_ctx);
}
{
int ret;
return;
}
renew_tgt_ctx->added_to_online_callbacks = true;
return;
}
"continue normal operation.\n"));
} else {
"Disabling automatic TGT renewal\n"));
return;
}
}
0);
}
return;
}
{
int ret;
return ENOMEM;
}
goto fail;
}
0);
goto fail;
}
return EOK;
fail:
return ret;
}
{
int ret;
"automatic renewal not available.\n"));
return EOK;
}
return EINVAL;
}
if (ccfile[0] == '/') {
goto done;
}
} else {
}
if (renew_data == NULL) {
goto done;
}
goto done;
}
}
goto done;
}
if (ret != HASH_SUCCESS) {
goto done;
}
done:
}
return ret;
}