Michael Rash
50b48147c0
This commit fixes two memory leaks and adds a common exit function.
...
The two memory leaks were found with the test suite running in
--enable-valgrind mode - here are the relevant error messages:
For fwknopd server GPG clean up:
==345== 9 bytes in 1 blocks are definitely lost in loss record 2 of 2
==345== at 0x4C2815C: malloc (vg_replace_malloc.c:236)
==345== by 0x52F6B81: strdup (strdup.c:43)
==345== by 0x10FA57: add_string_list_ent (access.c:308)
==345== by 0x110513: parse_access_file (access.c:387)
==345== by 0x10B5FB: main (fwknopd.c:193)
For fwknop client rc file processing:
==8045== 568 bytes in 1 blocks are still reachable in loss record 12 of 12
==8045== at 0x4C2815C: malloc (vg_replace_malloc.c:236)
==8045== by 0x50A53AA: __fopen_internal (iofopen.c:76)
==8045== by 0x10C3FF: process_rc (config_init.c:446)
==8045== by 0x10C8F6: config_init (config_init.c:671)
==8045== by 0x10AC9E: main (fwknop.c:62)
There is also a new clean_exit() function that makes it easier to ensure that
resources are deallocated upon existing.
2011-11-10 22:33:32 -05:00
Michael Rash
6388e8ac7f
added 'const' to function prototype vars where possible
...
Added the 'const' qualifier to function prototype variables where possible.
In addition, reduced some functions to file-scope with 'static' where possible.
Also made a few minor changes to remove extra whitespace, and fixed a bug
in create_fwknoprc() to ensure the new fwknoprc filehandle is closed.
2011-10-25 21:00:40 -04:00
Michael Rash
6f0d2c5091
minor typo fix
2011-10-13 20:29:37 -04:00
Michael Rash
87416c0cdf
Replaced all strcpy() calls with strlcpy()
...
OpenBSD especially gives compiler warnings whenever strcpy() is used. All such
calls have been replaced with strlcpy().
2011-09-09 22:09:37 -04:00
Michael Rash
db681fb791
minor commit to fix minor compilations warnings
2011-08-19 22:00:16 -04:00
Michael Rash
ca5f82c067
Removed legacy $Id$ tags from svn
...
$Id$ tags don't really mean anything to git so they have been removed from all
source files.
2011-06-18 20:53:40 -04:00
Damien Stuart
9d821548e7
Fixed bug where libfko would segfault if fko_get_spa_data() was called before fko_spa_data_final() was called (and successful). Added include of time.h in fko.h.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@306 510a4753-2344-4c79-9c09-4d669213fbeb
2010-12-05 14:57:01 +00:00
Damien Stuart
0f6ca00ac4
Updated the GPL blurb at the top of the source files. Added some missing copyright statements (Thanks to Franck Joncourt).
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@300 510a4753-2344-4c79-9c09-4d669213fbeb
2010-11-13 03:04:36 +00:00
Damien Stuart
781218e7e1
Bumped version to rc3 (even though we may go straight to release) and lib rev to 3.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@298 510a4753-2344-4c79-9c09-4d669213fbeb
2010-10-31 01:45:28 +00:00
Damien Stuart
a3bafdb364
Needed to bump libfko revision to 2 do identify as part of newer dist.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@295 510a4753-2344-4c79-9c09-4d669213fbeb
2010-10-30 16:19:54 +00:00
Damien Stuart
b0886a1d49
Updates and clean-up to address the many compiler warnings when compiled with -Wall. Also some autoconf updates
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@265 510a4753-2344-4c79-9c09-4d669213fbeb
2010-07-16 14:28:32 +00:00
Damien Stuart
3c5c8f1da7
Reverted last libfko change. Added set verify_sig flag when remote_ids are specified.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@256 510a4753-2344-4c79-9c09-4d669213fbeb
2010-07-11 13:55:44 +00:00
Damien Stuart
647fc3e64d
Removed checks for sig verification flag on gpg_sig info related functions.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@255 510a4753-2344-4c79-9c09-4d669213fbeb
2010-07-11 13:36:18 +00:00
Damien Stuart
9282a0fd29
Changed to fix possible double-free bug under some circumstances.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@210 510a4753-2344-4c79-9c09-4d669213fbeb
2010-03-14 03:45:03 +00:00
Damien Stuart
d24b19ec94
Updated TODO list (removed items that were compled and/or deprecated).
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@208 510a4753-2344-4c79-9c09-4d669213fbeb
2010-02-07 03:30:46 +00:00
Damien Stuart
4373172289
Tweaks to eliminate warnings on win32 build of libfko and client.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@207 510a4753-2344-4c79-9c09-4d669213fbeb
2010-02-06 19:27:54 +00:00
Damien Stuart
d0373a5b33
Fixed libfko so gpgme engine is gpg by default. Added functions to libfko to set/get path to gpgme engine. Fixed some memory leaks. Reworkd the get_user_pw routine. Added code in fwknopd to put back the "hQ" string on the front of incoming GPG-encypted message data. Removed the previously add pretty-print routine to configure. Updated configure to check for path to gpg executable. Updated docs accordingly.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@205 510a4753-2344-4c79-9c09-4d669213fbeb
2010-02-06 03:43:54 +00:00
Michael Rash
1092e6ef46
* Fixed a few minor warnings like the following:
...
cipher_funcs.c:85: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result
A few of these were in code in the lib/ directory, and required adding a
new error code 'FKO_ERROR_FILESYSTEM_OPERATION' and associated error
string 'Read/write bytes mismatch'.
git-svn-id: file:///home/mbr/svn/fwknop/trunk@195 510a4753-2344-4c79-9c09-4d669213fbeb
2010-01-16 14:59:36 +00:00
Damien Stuart
8c1261ca39
Fixed memory leak issue in libfko when fko_new_with_data() was called with a bad key. Added autoconf checks for gdbm with fallback to ndbm for server builds. Added digest cache capability using gdbm (in ndbm compatibility mode) or ndbm for replay detection.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@153 510a4753-2344-4c79-9c09-4d669213fbeb
2009-10-16 02:23:02 +00:00
Damien Stuart
8a06e36338
Removed the wipe_pw routine as it could result in segfaults when a static key is used.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@147 510a4753-2344-4c79-9c09-4d669213fbeb
2009-09-14 00:37:13 +00:00
Damien Stuart
a07decf1d9
Added some more stuff to deal with byte order identification on Solaris 10 x86 systems.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@142 510a4753-2344-4c79-9c09-4d669213fbeb
2009-09-09 01:38:03 +00:00
Damien Stuart
53b7fae8bb
Major rearrangement. Renamed directories: "fko" to "lib", "src" to "client". Added "common" and "server" directories. Setup autoconf to allow disabling the server and/or client builds.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@127 510a4753-2344-4c79-9c09-4d669213fbeb
2009-08-09 15:43:16 +00:00
Damien Stuart
1cdf9fd548
Re-arrangement of source tree.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@14 510a4753-2344-4c79-9c09-4d669213fbeb
2008-12-24 22:02:12 +00:00
Damien Stuart
a82c361e28
Another major re-write of the fwknop library.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@13 510a4753-2344-4c79-9c09-4d669213fbeb
2008-12-24 04:31:45 +00:00
Damien Stuart
deb85ddddf
Total re-arrangement for autoconf/automake implementation.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@12 510a4753-2344-4c79-9c09-4d669213fbeb
2008-12-21 19:11:51 +00:00