backend_universal.h File Reference

#include "pam_kmux_options.h"
Include dependency graph for backend_universal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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.

Detailed Description

This file specifies the functions which are used together by several backends.

Author:
Julian Thome
Date:
2009-11-11

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.
Generated on Mon Apr 5 22:28:46 2010 for pam_kmux by  doxygen 1.6.3