Defines | Functions

users.c File Reference

eurephiadm users command. User account management command. More...

#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <errno.h>
#include <assert.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
#include <eurephia_nullsafe.h>
#include <eurephia_context.h>
#include <eurephia_log.h>
#include <eurephia_xml.h>
#include <eurephia_values_struct.h>
#include <eurephiadb_session_struct.h>
#include <eurephiadb_mapping.h>
#include <eurephiadb_driver.h>
#include <certinfo.h>
#include "../argparser.h"
#include "../get_console_input.h"
#include "../parse_certificate_files.h"
#include "../xsltparser.h"
Include dependency graph for users.c:

Go to the source code of this file.

Defines

#define MODULE   "eurephia::Users"

Functions

int register_certificate (eurephiaCTX *ctx, int depth, const char *digest, const char *cname, const char *org, const char *email)
void display_users_help (int page)
int help_Users2 (eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int argc, char **argv)
void help_Users ()
int list_users (eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int argc, char **argv)
int show_user (eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int argc, char **argv)
int account_activation (eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int argc, char **argv)
int add_user (eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int argc, char **argv)
int cmd_Users (eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int argc, char **argv)

Detailed Description

eurephiadm users command. User account management command.

Author:
David Sommerseth <dazo@users.sourceforge.net>
Date:
2008-12-01

Definition in file users.c.


Define Documentation

#define MODULE   "eurephia::Users"

Need to define the active module before including argparser.h

Definition at line 42 of file users.c.


Function Documentation

int account_activation ( eurephiaCTX ctx,
eurephiaSESSION sess,
eurephiaVALUES cfg,
int  argc,
char **  argv 
)

This function handles activation, deactivation and deletion of an account

Parameters:
ctx eurephiaCTX
sess eurephiaSESSION of the current logged in user
cfg eurephiaVALUES struct of the current configuration
argc argument count for the eurephiadm command
argv argument table for the eurephiadm command
Returns:
returns 0 on success, otherwise 1.

< flag for extracting user account information

Definition at line 450 of file users.c.

Here is the call graph for this function:

int add_user ( eurephiaCTX ctx,
eurephiaSESSION sess,
eurephiaVALUES cfg,
int  argc,
char **  argv 
)

users add mode. Creates a new user account.

Parameters:
ctx eurephiaCTX
sess eurephiaSESSION of the current logged in user
cfg eurephiaVALUES struct of the current configuration
argc argument count for the eurephiadm command
argv argument table for the eurephiadm command
Returns:
returns 0 on success, otherwise 1.

Definition at line 745 of file users.c.

Here is the call graph for this function:

int cmd_Users ( eurephiaCTX ctx,
eurephiaSESSION sess,
eurephiaVALUES cfg,
int  argc,
char **  argv 
)

Main function for the users command.

Parameters:
ctx eurephiaCTX
sess eurephiaSESSION of the current logged in user
cfg eurephiaVALUES struct of the current configuration
argc argument count for the eurephiadm command
argv argument table for the eurephiadm command
Returns:
returns 0 on success, otherwise 1.

Definition at line 1046 of file users.c.

Here is the call graph for this function:

void display_users_help ( int  page  ) 

Help screens for the users command

Parameters:
page which help screen to display

Definition at line 71 of file users.c.

Here is the caller graph for this function:

void help_Users (  ) 

Help screen wrapper. Used by cmd_Help()

Definition at line 185 of file users.c.

Here is the call graph for this function:

int help_Users2 ( eurephiaCTX ctx,
eurephiaSESSION sess,
eurephiaVALUES cfg,
int  argc,
char **  argv 
)

Help screen wrapper for the users help function.

Parameters:
ctx eurephiaCTX
sess eurephiaSESSION of the current logged in user
cfg eurephiaVALUES struct of the current configuration
argc argument count for the eurephiadm command
argv argument table for the eurephiadm command
Returns:
returns 0 on success, otherwise 1.

Definition at line 165 of file users.c.

Here is the call graph for this function:

int list_users ( eurephiaCTX ctx,
eurephiaSESSION sess,
eurephiaVALUES cfg,
int  argc,
char **  argv 
)

users list mode. Lists all registered users.

Parameters:
ctx eurephiaCTX
sess eurephiaSESSION of the current logged in user
cfg eurephiaVALUES struct of the current configuration
argc argument count for the eurephiadm command
argv argument table for the eurephiadm command
Returns:
returns 0 on success, otherwise 1.

Definition at line 201 of file users.c.

Here is the call graph for this function:

int register_certificate ( eurephiaCTX ctx,
int  depth,
const char *  digest,
const char *  cname,
const char *  org,
const char *  email 
)

Forward declaration of a function already found in certificates.c

Internal certs command, does the proper register request against the eurephia database.

Parameters:
ctx eurephiaCTX
depth Certificate depth of the certificate
digest Certificate SHA1 fingerprint (digest)
cname X.509 Common Name value of the certificate
org X.509 Organisation value of the certificate
email X.509 emailAddress value of the certificate
Returns:
Returns the certid reference to the certificate on successful registration, otherwise 0.

Definition at line 167 of file certificates.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int show_user ( eurephiaCTX ctx,
eurephiaSESSION sess,
eurephiaVALUES cfg,
int  argc,
char **  argv 
)

users show mode. Show account information for a particular user

Parameters:
ctx eurephiaCTX
sess eurephiaSESSION of the current logged in user
cfg eurephiaVALUES struct of the current configuration
argc argument count for the eurephiadm command
argv argument table for the eurephiadm command
Returns:
returns 0 on success, otherwise 1.

< flag for extracting user account information

< flag for extracting certificate information

< flag for extracting information from attempts log

< flag for extracting information from blacklist log

< flag for extracting lastlog information

< flag for extracting user account information

< flag for extracting certificate information

< flag for extracting lastlog information

< flag for extracting information from attempts log

< flag for extracting information from blacklist log

Definition at line 278 of file users.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines