summaryrefslogtreecommitdiffstats
path: root/eurephiadm/eurephiadm.c
Commit message (Collapse)AuthorAgeFilesLines
* Correct ugly boundary checks in database initDavid Sommerseth2014-12-051-1/+1
| | | | | | | | The check if dbargc exceeds MAX_ARGUMENTS was done _after_ it was checked if the array element is NULL. This was not the intention. Signed-off-by: David Sommerseth <dazo@eurephia.org> (cherry picked from commit 51f8c8e930221cc5feeac4f84be5550b4e5be9dd)
* Updated copyright datesDavid Sommerseth2012-10-081-2/+2
| | | | Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* eurephiadm: Fixed some memory cleanup with libxml2 and libxsltDavid Sommerseth2012-10-081-1/+2
| | | | | | | | Valgrind complained about reachable buffers within the libxml2 and libxslt functions. Found some init and cleanup functions which needed to be called to solve this. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Fixed an overflow issue with memset() in eurephiadmDavid Sommerseth2010-07-301-1/+1
|
* Updated Copyright dates to include 2010David Sommerseth2010-07-301-2/+2
|
* Merge branch 'syslog'David Sommerseth2009-09-281-7/+3
|\
| * Added extra parameter to eurephia_log_init() to set log ident for syslogDavid Sommerseth2009-09-241-1/+1
| |
| * Rewritten the eurephia_log() to support syslog logging as wellDavid Sommerseth2009-09-241-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also simplified the initialisation of the logging module. By calling the eurephia_log_init(eurephiaCTX *, char *dest, int loglevel) function, a log context will be setup inside the eurephiaCTX. To close the log file, eurephia_log_close(eurephiaCTX *) must be called. The destination string to eurephia_log_init() can be: - stdout: Log everything to stdout - stderr: Log everything to stderr - none: Do no logging at all - syslog:<facility> Log via syslog. <facility> can be: user, local[0-7], daemon or authpriv. - Filename All logging goes to the given filename. If the filename string is not recognised by any of the reserved words above, it will be handled as a filename.
* | Reworked and unified admin authentication and registration functions to ↵David Sommerseth2009-09-281-20/+127
|/ | | | | | | | eDBadminAuthenticate() eDBadminAuth(), eDBadminValidateSession(), eDBadminRegisterLogin() and eDBadminLogout() are now unfied into one admin function, eDBadminAuthenticate(). This function receives all input as eurephia XML documents.
* Added debug logging of free_nullsafe() calls as wellDavid Sommerseth2009-09-071-4/+4
|
* Moved all malloc() operations over to a calloc wrapper, malloc_nullsafe()David Sommerseth2009-09-071-2/+2
| | | | This also improves debugging as well, if debug logging is enabled and log level is >= 40.
* Cleaned up and added some missing commentsDavid Sommerseth2009-09-051-1/+1
|
* Added doxygen comments for the main eurephiadm partsDavid Sommerseth2009-09-041-4/+100
|
* Fix error setting eurephiadm_xslt_path in eurephiadmDavid Sommerseth2009-03-291-5/+7
| | | | | | | In commit d7a8babb19bcc1107daff0cc5673bc32b0ed785b the check if the configuration value 'eurephiadm_xslt_path' was set in the database looked in the wrong configuration area. Fixed this and it now copies the value over from the database configuration.
* Prepared for linking in libxsltDavid Sommerseth2009-03-291-0/+5
| | | | | | | | | | | | Added two extra ./configure arguments, --xslt-path which defines the root directory for all eurephia specific XSLT templates (defaults to /usr/share/eurephia/xslt) and --eurephiadm-xslt which defines the path eurephiadm will use for its XSLT templates (defaults to /usr/share/eurephia/xslt/eurephiadm) Added an extra configuration paramet for eurephiadm (eurephiadm_xslt_path), which can be used to override the compiled in default values
* Further code cleanupDavid Sommerseth2009-03-261-1/+1
| | | | | Added in addition missing GPLv2 only remarks where it was missing from commit 0712bce6f387121e37501ec323e3da89ce4300c3
* Cleaned up the code a little bitDavid Sommerseth2009-03-261-1/+2
| | | | | Made sure we only include needed include files and checked that the copyright headers are equal and correct
* Use global EUREPHIAVERSION instead of the local EUREPHIADMVERSIONDavid Sommerseth2009-03-231-3/+1
|
* Fixed a memory leak on logoutDavid Sommerseth2008-12-121-0/+1
|
* Added username in config fileDavid Sommerseth2008-12-121-5/+10
| | | | | By adding username=<eurephiadm username>, the program will not ask about username when logging in, only password
* More improvements to eurephia_getopt(...)David Sommerseth2008-12-061-3/+1
| | | | | | Sending the argument incrementer as reference instead of as value. This way eurephia_getopt(...) can directly increase the incrementer on arguments with extra options.
* Fixed memory leak in parsing arguments for the eDBconnect(...) callDavid Sommerseth2008-12-061-0/+1
|
* Fixed the missing 'help' page when doing 'help help' or '-h help'David Sommerseth2008-12-041-1/+7
|
* BUGFIX: Corrected wrong --help|help command behaviourDavid Sommerseth2008-12-041-3/+4
|
* BUGFIX: Avoid showing (null) = (null) when no config params is set in dbDavid Sommerseth2008-12-041-1/+3
|
* Improved help functionalityDavid Sommerseth2008-12-041-0/+15
| | | | | | | | | | | | | | | | | | | | Now each command can (should!) add a help function. This is done by editing commands.h to add the function name for the function printing out the help text. Added help text for the config command. This help function will be called when eurephiadm is called with: eurephiadm -h <command> eurephiadm --help <command> eurephiadm help <command> In addition the command function should also parse arguments and call the help function when --help or -h argument is given, like eurephiadm config -h eurephaidm config --help
* Modified to work with new argparserDavid Sommerseth2008-12-041-7/+5
|
* Wrote a replacement getopt for eurephiadmDavid Sommerseth2008-12-041-18/+17
| | | | | | | | | | | | | | | This is because default getopt(...) is not flexible enough for eurephiadm. Example: eurephiadm -l test.log config -s var1 "value 1" eurephiadm config -s var2 value2 By using getopt in the eurephiadm.c, the -s argument will be parsed there as well, and it is no good solution how to just send arguments after the 'command' further to another argument parser. The new implementation is also not as feature rich as GNU getopt, but it is feature rich enough for the current needs.
* Added logging of commands being issuedDavid Sommerseth2008-12-031-0/+23
|
* BUGFIX: Logout works properly again and improved logout status changeDavid Sommerseth2008-12-031-1/+1
| | | | | | - cmd_Logout(...) used the wrong argv[] index for sessionkey. - Improved eDBadminValidateSession(...) to set status to '5' on sessions which are getting logged out due to missing privileges
* Show info when login failsDavid Sommerseth2008-12-031-0/+6
|
* Changed the logout behaviour to avoid login and/or access control check when ↵David Sommerseth2008-12-031-7/+10
| | | | user is about to logout
* Enhanced the access control by introducing access levelsDavid Sommerseth2008-12-021-5/+5
|
* Moved all declarations which has to do with commands into commands.hDavid Sommerseth2008-12-021-27/+0
|
* Added dumping of config settings in database as well as only config fileDavid Sommerseth2008-12-021-6/+19
|
* BUGFIX: cmd_Logout(...) interpreted eDBadminLogout(...) result wrongDavid Sommerseth2008-12-021-2/+2
|
* Added proper argument handling. Allowing log settings to be overridden by ↵David Sommerseth2008-12-021-12/+83
| | | | command line
* Prepared to have eurephiadm commands as one file per commandDavid Sommerseth2008-12-011-30/+42
| | | | | | | | under the commands/ directory. The declaration of each command is done in the commands.h file. Implemented changes from commit 525361b6dc382d5086e9e2b0539f3248ee239023 in eurephiadm as well. Reorganised and improved some comments as well.
* Implemented command handling. Missing argument handling yetDavid Sommerseth2008-12-011-7/+99
|
* Split eurephiadm.c into several filesDavid Sommerseth2008-12-011-343/+4
| | | | | | | | | | | | | | | | | | | | As the code size on eurephiadm.c have grown quite a lot, it was about time to split it into categories. client_config.[ch] Manages unified config file and filenames, including directory for these files. It also has the possibility to also override defaults via environment variables. It also contains a simple config file parser which puts the config values into an eurephiaVALUES struct. client_context.[ch] Functions for creating and destroying an eurephia context needed for proper implementation. client_session.[ch] Functions for creating and reopening old eurephia sessions, needed for proper implementation. Also went through all include statements, to make sure each file do not include more than absolutely needed.
* Added possibility to add comments in config file using #David Sommerseth2008-12-011-0/+9
|
* Removed unneeded debug infoDavid Sommerseth2008-12-011-1/+0
|
* BUGFIX: Fixed missing slash when env.var. EUREHPIA_DIR is usedDavid Sommerseth2008-12-011-1/+2
|
* BUGFIX: Do not try to parse config line if no separator ('=') is found.David Sommerseth2008-12-011-1/+6
|
* Changed the exit procedure when auto-logged out, to shutdown properlyDavid Sommerseth2008-11-301-2/+5
|
* Completed login/logout from eurephiadm. Added config file parser.David Sommerseth2008-11-301-19/+160
| | | | | | The config file parser will put all configuration parameters into an eurephiaVALUES stack. eGet_value(...) functions can be used for further processing.
* eurephiadm can now use eDBadminValidateSession(...) to use open session. ↵David Sommerseth2008-11-301-50/+64
| | | | Auto-logout implemented as well
* eurephiadm can now login properly and reads and writes session fileDavid Sommerseth2008-11-301-18/+124
|
* Completed the change of authentication model in database driverDavid Sommerseth2008-11-301-2/+77
| | | | | | Follow up of commit 103acd7c2e1467401f0795930be9140dc5ed47ff. Seems to work fine via both plugin mode and eurephiadm, regarding core dumping too.
* Updated the eurephiadm utility to manage simple loginDavid Sommerseth2008-11-291-2/+58
|