proxy_child.c revision 9acfb09f7969a69f58bd45c856b01700541853ca
fdbad18e66c0e293f94694458d47df305f050c71Christian Maeder Pam Proxy Child
b96b500ba4430269d97a08f07de87838278e9c5dChristian Maeder Sumit Bose <sbose@redhat.com>
5214cf3742dc626a7efc5ec851db09bf0ff1f579Christian Maeder Copyright (C) 2010 Red Hat
5214cf3742dc626a7efc5ec851db09bf0ff1f579Christian Maeder This program is free software; you can redistribute it and/or modify
along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <dlfcn.h>
#include "popt.h"
#include "sbus/sssd_dbus.h"
#include "providers/dp_backend.h"
struct pc_ctx {
const char *identity;
const char *conf_path;
const char *pam_target;
void *appdata_ptr) {
const char *password;
sizeof(struct pam_response));
for (i=0; i < num_msg; i++) {
case PAM_PROMPT_ECHO_OFF:
goto failed;
return PAM_SUCCESS;
return PAM_CONV_ERR;
void *appdata_ptr) {
const char *password;
sizeof(struct pam_response));
for (i=0; i < num_msg; i++) {
case PAM_PROMPT_ECHO_OFF:
goto failed;
return PAM_SUCCESS;
return PAM_CONV_ERR;
int ret;
int pam_status;
pam_target));
case SSS_PAM_AUTHENTICATE:
case SSS_PAM_SETCRED:
case SSS_PAM_ACCT_MGMT:
case SSS_PAM_OPEN_SESSION:
case SSS_PAM_CLOSE_SESSION:
case SSS_PAM_CHAUTHTOK:
case SSS_PAM_CHAUTHTOK_PRELIM:
return EOK;
void *user_data;
if (!user_data) {
goto done;
if (!pc_ctx) {
goto done;
if (!reply) {
goto done;
if (!ret) {
goto done;
goto done;
if (!ret) {
goto done;
return EOK;
done:
char *sbus_address;
int ret;
return ENOMEM;
return ret;
return ret;
return EOK;
int retval;
return ENOMEM;
if (!ret) {
return EIO;
return retval;
int ret;
if (!ctx) {
return ENOMEM;
return ENOMEM;
return ret;
return ret;
return EOK;
int opt;
int ret;
long id;
switch(opt) {
if (id == 0) {