kockpit/kockpitpam.cpp File Reference

#include "kockpitpam.h"
#include <stdio.h>
#include <string.h>
#include <regex.h>
#include <unistd.h>
#include <string>
#include <QMessageBox>
#include <pampassworddialog.h>
#include <iostream>
Include dependency graph for kockpitpam.cpp:

Functions

int change_password (const QString &service, const QString &user)
 Password changing.
int translator (int num_msg, const struct pam_message **msg, struct pam_response **resp, void *)
 Conversation function.

Variables

static struct pam_conv conv

Function Documentation

int change_password ( const QString &  service,
const QString &  user 
)

Password changing.

This function indicates the changin of a password using pam.

Parameters:
service PAM Service name.
user for which password should be changed.
Returns:
0 Success.
1 Failure.
int translator ( int  num_msg,
const struct pam_message **  msg,
struct pam_response **  resp,
void *  appdata_ptr 
)

Conversation function.

This conversation function is needed for allowing users to change their passwords.

Parameters:
num_msg Length of the array msg.
msg Array of pointers to pam_message structs which contains the message and their type respectively style.
resp Should point to an array of pam_response structures holding the application supplied text.
appdata_ptr Pointer to Application data.
Returns:
PAM_BUF_ERR Memory buffer error
PAM_CONV_ERR Conversation failure. The application should not set *resp.
PAM_SUCCESS Success.

Variable Documentation

struct pam_conv conv [static]
Initial value:
 {
    &translator,
    NULL
}
Generated on Wed Mar 24 09:58:13 2010 for kockpit by  doxygen 1.6.3