version 1.1.2.1, 2007/01/04 06:57:35
|
version 1.1.2.2, 2007/01/11 20:48:24
|
|
|
#include <security/pam_appl.h> | #include <security/pam_appl.h> |
#include "Defines.h" | #include "Defines.h" |
| |
#define CIMSERVERA "cimservera" |
|
|
|
/* | /* |
**============================================================================== | **============================================================================== |
** | ** |
** cimservera |
|
** |
|
** This program is used to authenticate users with the "Basic PAM | ** This program is used to authenticate users with the "Basic PAM |
** Authentication" scheme. It was originally written to isolate memory | ** Authentication" scheme. It was originally written to isolate memory |
** PAM module errors to an external process. | ** PAM module errors to an external process. |
|
|
** | ** |
** CimserveraStart() | ** CimserveraStart() |
** | ** |
** Starts the cimservera program, returning a socket used to communicate |
** Starts the CIMSERVERA program, returning a socket used to communicate |
** with it. | ** with it. |
** | ** |
**============================================================================== | **============================================================================== |
|
|
int pair[2]; | int pair[2]; |
int pid; | int pid; |
| |
/* Get absolute path of "cimservera" program. */ |
/* Get absolute path of CIMSERVERA program. */ |
| |
char path[EXECUTOR_BUFFER_SIZE]; | char path[EXECUTOR_BUFFER_SIZE]; |
| |
|
|
struct pam_response** resp, | struct pam_response** resp, |
void* appdata_ptr) | void* appdata_ptr) |
{ | { |
|
/* Unused */ |
|
msg = 0; |
|
|
|
/* Unused */ |
|
appdata_ptr = 0; |
|
|
if (num_msg > 0) | if (num_msg > 0) |
{ | { |
*resp = (struct pam_response*)calloc( | *resp = (struct pam_response*)calloc( |
|
|
**============================================================================== | **============================================================================== |
*/ | */ |
| |
static int PAMAuthenticateInProcess(const char* username, const char* password) |
static int PAMAuthenticateInProcess( |
|
const char* username, const char* password) |
{ | { |
PAMData data; | PAMData data; |
struct pam_conv pconv; | struct pam_conv pconv; |