pam_sss.c revision fcef1231eea30ee9cdc75f3f39f4b9207a84ea1d
#define PAM_SM_AUTH
#define PAM_SM_ACCOUNT
#define PAM_SM_SESSION
#define PAM_SM_PASSWORD
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
#include <security/pam_modules.h>
#include <security/pam_misc.h>
#include "sss_cli.h"
struct pam_items {
const char* pam_service;
const char* pam_user;
const char* pam_tty;
const char* pam_ruser;
const char* pam_rhost;
const char* pam_authtok;
const char* pam_newauthtok;
const char* pamstack_authtok;
const char* pamstack_oldauthtok;
int pam_service_size;
int pam_user_size;
int pam_tty_size;
int pam_ruser_size;
int pam_rhost_size;
int pam_authtok_type;
int pam_authtok_size;
int pam_newauthtok_type;
int pam_newauthtok_size;
};
int ret;
return PAM_SUCCESS;
}
}
const char **argv) {
int ret;
int errnop;
struct sss_cli_req_data rd;
int pam_status;
char *domain;
D(("Hello pam_sssd: %d", task));
if (ret != PAM_SUCCESS) {
return ret;
}
pi.pam_authtok_size = 0;
pi.pam_newauthtok_size = 0;
/* according to pam_conv(3) only one message should be requested by conv to
* keep compatibility to Solaris. Therefore we make separate calls to request
* AUTHTOK and OLDAUTHTOK. */
D(("Malloc failed.\n"));
return PAM_SYSTEM_ERR;
}
conv->appdata_ptr);
if (ret != PAM_SUCCESS) {
pam_status = ret;
goto done;
}
D(("Empty password\n"));
} else {
}
}
if (task == SSS_PAM_CHAUTHTOK) {
D(("Malloc failed.\n"));
return PAM_SYSTEM_ERR;
}
conv->appdata_ptr);
if (ret != PAM_SUCCESS) {
pam_status = ret;
goto done;
}
D(("Empty password\n"));
} else {
}
}
sizeof(uint32_t);
D(("error during packet creation."));
goto done;
}
if (ret != NSS_STATUS_SUCCESS) {
D(("sss_pam_make_request failed."));
pam_status = ret;
goto done;
}
D(("response not in expected format."));
goto done;
}
D(("received: %s", domain));
} else {
D(("no user found, doing nothing"));
return PAM_SUCCESS;
}
done:
}
return pam_status;
}
const char **argv ) {
}
const char **argv ) {
}
const char **argv ) {
}
const char **argv ) {
}
const char **argv ) {
}
const char **argv ) {
}
#ifdef PAM_STATIC
/* static module data */
struct pam_module _pam_sssd_modstruct = {
"pam_sssd",
};
#endif