/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2016 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 <talloc.h>
#include <tevent.h>
#include <security/pam_appl.h>
#include <security/pam_modules.h>
#include "sbus/sssd_dbus.h"
#include "providers/data_provider/dp_private.h"
#include "providers/data_provider/dp_iface.h"
const char *request_name,
{
"Unable to acquire reply message");
return;
}
if (!dbret) {
"Unable to generate reply message");
return;
}
return;
}
struct sbus_request *sbus_req,
{
bool bret;
if (bret == false) {
return EINVAL;
}
return ENOMEM;
}
}
return EOK;
}
enum dp_targets *_target,
enum dp_methods *_method,
const char **_req_name)
{
const char *name;
case SSS_PAM_AUTHENTICATE:
name = "PAM Authenticate";
break;
case SSS_PAM_PREAUTH:
name = "PAM Preauth";
break;
case SSS_PAM_ACCT_MGMT:
target = DPT_ACCESS;
name = "PAM Account";
break;
case SSS_PAM_CHAUTHTOK_PRELIM:
target = DPT_CHPASS;
name = "PAM Chpass 1st";
break;
case SSS_PAM_CHAUTHTOK:
target = DPT_CHPASS;
name = "PAM Chpass 2nd";
break;
case SSS_PAM_OPEN_SESSION:
name = "PAM Open Session";
break;
case SSS_PAM_SETCRED:
name = "PAM Set Credentials";
break;
case SSS_PAM_CLOSE_SESSION:
name = "PAM Close Session";
break;
default:
name = "PAM Unsupported";
break;
}
/* Check that target is configured. */
if (target != DP_TARGET_SENTINEL
}
}
struct dp_pam_handler_state {
const char *request_name;
};
{
const char *req_name;
goto done;
}
return ret;
}
if (target == DP_TARGET_SENTINEL) {
/* Just send the result. Pam data are freed with this call. */
return EOK;
}
goto done;
}
done:
}
return ret;
}
{
return false;
}
return true;
}
return false;
}
{
return;
}
/* State and request related data are freed with sbus_req. */
return;
}
"Unable to process SELinux, killing request...");
return;
}
}
{
return;
}
/* State and request related data are freed with sbus_req. */
return;
}