backend_universal.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pam_kmux_options.h"
#include "backend_universal.h"
#include "helpers.h"
#include "msg.h"
Include dependency graph for backend_universal.c:

Functions

int universal_expand_query (char **command, const char **values, const char *query, const char *service, const char *user, const char *passwd, const char *rhost, const char *raddr, const modopt_t *options)
 Build a SQL-query.

Variables

pam_modopt_t pamod_options

Detailed Description

Common pam_kmux-backend-functions-implementation. In this file all common pam-kmux-backend-functions are implemented.

Author:
Julian Thome
Date:
2009-11-12

Function Documentation

int universal_expand_query ( char **  command,
const char **  values,
const char *  query,
const char *  service,
const char *  user,
const char *  passwd,
const char *  rhost,
const char *  raddr,
const modopt_t options 
)

Build a SQL-query.

This function build a valid SQL-query. Some variables like u for user or c for column_password are substitutet by their meaning.

Parameters:
command In this char array the resulting query will be stored.
values This parameter is needed if the database supports it to handel query-variables and their values separately (like Postgres do). In this case you can fill this array with the values where value[0] corresponds to the first variable in the query, value[1] corresponds to the second variable in the query ... and so on.
query The original query which is not expanded yet thus the given variables arent substituted by their meaning.
service Service name character array.
user Character array which contains username/uid of the user that tries to change password - only for using password in a SQL-query.
passwd Password parameter - only for using passw in a SQL-query.
rhost Value of PAM_RHOST - only for using rhost in a SQL-query.
raddr Remote Address - the ip of rhost - only for using raddr in a SQL-query.
options Struct which represents exactly one database connection - only for using options in a SQL-query.
Returns:
Nothing to return.

Variable Documentation

C-Structure which contains pam-module options. In this global variable the pam-module options like debug level or the path of the configuration file are stored.

Generated on Mon Apr 5 22:28:46 2010 for pam_kmux by  doxygen 1.6.3