/*
SSSD
IPA Backend Module -- Authentication
Authors:
Sumit Bose <sbose@redhat.com>
Copyright (C) 2009 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/ldap/ldap_common.h"
#include "providers/ldap/sdap_async.h"
#include "providers/krb5/krb5_auth.h"
#include "providers/ipa/ipa_auth.h"
#include "providers/ipa/ipa_common.h"
#include "providers/ipa/ipa_config.h"
struct get_password_migration_flag_state {
char *ipa_realm;
bool password_migration;
};
struct tevent_context *ev,
struct sdap_id_ctx *sdap_id_ctx,
char *ipa_realm)
{
int ret;
return NULL;
}
struct get_password_migration_flag_state);
return NULL;
}
state->password_migration = false;
goto fail;
}
if (!subreq) {
goto fail;
}
return req;
fail:
return NULL;
}
{
struct tevent_req);
struct get_password_migration_flag_state);
if (ret) {
if (dp_error == DP_ERR_OFFLINE) {
"No IPA server is available, cannot get the "
"migration flag while offline\n");
} else {
"Failed to connect to IPA server: [%d](%s)\n",
}
return;
}
}
{
struct tevent_req);
struct get_password_migration_flag_state);
int ret;
if (ret) {
goto done;
}
state->password_migration = true;
}
done:
} else {
}
}
bool *password_migration)
{
struct get_password_migration_flag_state);
return EOK;
}
struct ipa_pam_auth_handler_state {
};
struct tevent_req *
struct ipa_auth_ctx *auth_ctx,
struct dp_req_params *params)
{
struct ipa_pam_auth_handler_state);
return NULL;
}
true);
goto immediately;
}
goto immediately;
}
return req;
/* TODO For backward compatibility we always return EOK to DP now. */
return req;
}
{
int dp_err;
char *realm;
goto done;
}
goto done;
}
realm);
goto done;
}
return;
}
done:
/* TODO For backward compatibility we always return EOK to DP now. */
}
{
bool password_migration = false;
goto done;
}
if (password_migration) {
true, CON_TLS_ON, true);
goto done;
}
return;
}
done:
/* TODO For backward compatibility we always return EOK to DP now. */
}
{
const char *dn;
int timeout;
goto done;
}
"starting password migration.\n");
goto done;
}
goto done;
}
goto done;
}
return;
done:
/* TODO For backward compatibility we always return EOK to DP now. */
}
{
switch (ret) {
case EOK:
break;
case ERR_AUTH_DENIED:
case ERR_AUTH_FAILED:
case ERR_PASSWORD_EXPIRED:
/* TODO: do we need to handle expired passwords? */
"password migration not possible.\n");
goto done;
default:
goto done;
}
"trying Kerberos authentication again.\n");
goto done;
}
return;
done:
/* TODO For backward compatibility we always return EOK to DP now. */
}
{
int dp_err;
}
/* TODO For backward compatibility we always return EOK to DP now. */
}
struct tevent_req *req,
{
return EOK;
}