diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2009-09-05 00:43:10 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2009-09-05 00:43:10 +0200 |
commit | 727d91f8a4d038f07618ceaafb073a2eb00eb749 (patch) | |
tree | 06a78e98ba2812f1d87fcf0e5e434c5183229497 /eurephiadm/commands/lastlog.c | |
parent | 0695956b4b419beaf1b596d69243c09d00bfa9f7 (diff) | |
download | eurephia-727d91f8a4d038f07618ceaafb073a2eb00eb749.tar.gz eurephia-727d91f8a4d038f07618ceaafb073a2eb00eb749.tar.xz eurephia-727d91f8a4d038f07618ceaafb073a2eb00eb749.zip |
Even more commenting. Now the complete eurephiadm should be documented.
Diffstat (limited to 'eurephiadm/commands/lastlog.c')
-rw-r--r-- | eurephiadm/commands/lastlog.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/eurephiadm/commands/lastlog.c b/eurephiadm/commands/lastlog.c index 374ff24..586801e 100644 --- a/eurephiadm/commands/lastlog.c +++ b/eurephiadm/commands/lastlog.c @@ -1,5 +1,5 @@ -/* usercerts.c -- eurephiadm lastlog command: - * Queries the lastlog table +/* lastlog.c -- eurephiadm lastlog command: + * Queries the lastlog table * * GPLv2 only - Copyright (C) 2009 * David Sommerseth <dazo@users.sourceforge.net> @@ -20,6 +20,15 @@ * */ +/** + * @file lastlog.c + * @author David Sommerseth <dazo@users.sourceforge.net> + * @date 2009-03-24 + * + * @brief eurephiadm lastlog command. Queries the lastlog database. + * + */ + #include <stdio.h> #include <string.h> #include <assert.h> @@ -29,7 +38,7 @@ #include <libxml/xpath.h> #endif -#define MODULE "eurephia::UserCerts" +#define MODULE "eurephia::LastLog" /**< Need to define the active module before including argparser.h */ #include <eurephia_nullsafe.h> #include <eurephia_context.h> #include <eurephia_log.h> @@ -46,11 +55,14 @@ #include "../xsltparser.h" +/** + * Help screen for the lastlog command + */ void help_Lastlog() { printf("eurephiadm::Lastlog\n\n" "This command will query the lastlog entries, which contains information\n" - "about all logins done with the eurephia-auth plugin.\n\n" + "about all logins done with the eurephia-auth plug-in.\n\n" "Valid arguments:\n" " * Filters:\n" " -c | --certid Certificate ID\n" @@ -72,6 +84,17 @@ void help_Lastlog() } +/** + * Main function for the lastlog command. Does the querying of the database and show the result + * + * @param ctx eurephiaCTX + * @param sess eurephiaSESSION of the current logged in user + * @param cfg eurephiaVALUES struct of the current configuration + * @param argc argument count for the eurephiadm command + * @param argv argument table for the eurephiadm command + * + * @return returns 0 on success, otherwise 1. + */ int cmd_Lastlog(eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int argc, char **argv) { xmlDoc *lastlog_xml = NULL, *srch_xml = NULL; |