Jonathan Bennett
3378ba2423
Add Doxygen headers for server files
2016-01-01 02:09:59 +00:00
Michael Rash
a85b081f79
copyright update
2015-12-23 14:34:51 -05:00
Michael Rash
998fb96f0b
promote argv handling functions to fko_util (avoids duplication across client and server)
2015-12-16 18:59:10 -08:00
Michael Rash
d681485e29
[server] add sudo support, closes #159
2015-07-22 04:08:58 -07:00
Michael Rash
cd18570f71
[server] default to not returning partial line when collecting the output of an external command
2015-07-10 22:45:44 -04:00
Michael Rash
012d1cf888
[server] interim commit towards a fix for --no-ipt-check rule detection
...
This is a significant commit for issue #162 where fwknopd is not properly
detecting rules (particularly NAT rules) on systems running older versions
of iptables where -C support is not offered. A new capability of searching
the output of an external command and getting the first matching line was
added with the search_extcmd_getline() function.
2015-07-05 20:47:06 -04:00
Michael Rash
ff052bf74f
[server] disable external command execution in AFL fuzzing mode
2015-06-01 19:57:49 -07:00
Michael Rash
a8879231c3
[server] add run_extcmd_write() call in code coverage mode
2014-11-06 20:24:33 -05:00
Michael Rash
04f8b9669a
[server] check number of cmd args even when execvpe() is not available
2014-11-05 23:19:51 -05:00
Michael Rash
50009115b3
[server] bug fix to close write filehandle in _run_extcmd_write()
2014-11-01 12:03:49 -04:00
Michael Rash
34e38fe39e
[server] first pass at eliminating popen() write calls with run_extcmd_write() (used for PF firewalls)
2014-10-28 21:28:21 -04:00
Michael Rash
b7785a9304
[server] extend run_extcmd() to allow the caller to specify whether to collect stderr
2014-10-07 21:01:17 -04:00
Michael Rash
ed9e1ac236
added setgid() call for command execution along with CMD_EXEC_GROUP access.conf var
2014-10-07 16:18:14 -04:00
Michael Rash
248c4b301e
added configure detection of execvpe() - doesn't exist on Mac OS X yet
2014-10-06 20:04:00 -04:00
Michael Rash
652b8cb80e
[server] have run_extcmd() collect process exit status for calling function (in addition to return value)
2014-10-05 20:21:05 -04:00
Michael Rash
a47ddfcb1e
[server] added WIFEXITED(status) check for external commands run via execvpe()
2014-10-04 21:14:49 -04:00
Michael Rash
87f3bbdd23
[server] hex_dump() '%' bug fix, minor verbose criteria update
2014-10-04 16:40:44 -04:00
Michael Rash
d71f386971
[server] add search_extcmd() to replace all popen() calls with the execvpe() no env strategy
2014-10-04 10:31:15 -04:00
Michael Rash
e271442aa9
[server] first cut at converting iptables commands to use execvpe()
2014-10-03 21:58:51 -04:00
Michael Rash
9e990c9be0
fix header non-ascii chars, and introduce test suite support for detecting this in source files
2014-03-14 09:14:35 -04:00
Michael Rash
bfdbb8f260
Updated authorship and copyright information
...
This commit updates all authorship and copyright information to include a
standard header that references the AUTHORS and CREDITS file. This standard
header was written by the Debian legal team at the request of Franck Joncourt.
2014-03-04 17:53:10 -05:00
Franck Joncourt
c2e1a00154
s/GNU Public/GNU General Public/g
2013-06-30 22:21:22 +02:00
Michael Rash
382099e85a
Updated copyright dates, removed NEWS file in favor of the ChangeLog
2013-06-02 14:07:01 -04:00
Michael Rash
52462e7dba
Use {0} initializer for all stack allocated char arrays
...
Lots of places in the code were already using {0} to initialize stack char
arrays, but memset() was being used as well. This commit removes all
unnecessary memset() calls against char arrays that are already initialized
via {0} (which sets all members to zero for such arrays).
2013-05-21 22:00:15 -04:00
Michael Rash
8d980ae686
remove dead code caught by Coverity
2013-05-07 23:02:49 -04: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
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
6c050b481c
Added python/fko.py to Makefile.am so it is also included in distributions. Minor tweak to address compile error on Mac os X.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@311 510a4753-2344-4c79-9c09-4d669213fbeb
2011-02-12 13:18:31 +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
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
Michael Rash
d904f5637f
removed additional wait() call from run_extcmd(), updated --fw-list to just use system() to execute the iptables listing commands
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@261 510a4753-2344-4c79-9c09-4d669213fbeb
2010-07-14 02:58:51 +00:00
Michael Rash
6f4ff9cb69
added --fw-list arg to the fwknopd daemon to list all current firewall rules for any running fwknopd process
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@260 510a4753-2344-4c79-9c09-4d669213fbeb
2010-07-13 04:09:07 +00:00
Damien Stuart
5f1f0650ea
Put locale code back in. More cleanup of config directives and options.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@231 510a4753-2344-4c79-9c09-4d669213fbeb
2010-07-04 13:34:31 +00:00
Damien Stuart
b6c57aa6a0
Changed the way running external commands are hanlded to address issues with it not working on some systems/configurations. Just using system and popen and fw commands are run with stdout and stderr tied to gether.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@230 510a4753-2344-4c79-9c09-4d669213fbeb
2010-07-03 02:07:28 +00:00
Damien Stuart
b7ede1625d
Added support for COMMAND_MSG requests. Also added CMD_EXEC_USER to access.conf to allow for fwknopd to setuid to the specified user before running the command. Other minor tweaks.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@226 510a4753-2344-4c79-9c09-4d669213fbeb
2010-06-29 01:00:11 +00:00
Damien Stuart
b57ada4c16
More updates to take care of warnings on Ubuntu systems (fixes for common sense warnings that should have come up om my Fedora system but didn't).
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@223 510a4753-2344-4c79-9c09-4d669213fbeb
2010-06-22 01:28:49 +00:00
Damien Stuart
68b171ddd4
More tweaks. Added SIGCHLD handler and code to try to restart the TCP server if it dies for whatever reason.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@221 510a4753-2344-4c79-9c09-4d669213fbeb
2010-06-21 03:24:27 +00:00
Damien Stuart
aad2daadbf
First cut at creating access rules and removing them when they expire (not sure I like this implementation but it is a start).
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@214 510a4753-2344-4c79-9c09-4d669213fbeb
2010-05-17 01:27:26 +00:00
Damien Stuart
0008cdc86c
Minor tweaks to firewall rules processing and external command execution code.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@212 510a4753-2344-4c79-9c09-4d669213fbeb
2010-04-14 01:59:02 +00:00
Damien Stuart
83a10b96f6
Started firewall rule processing. Added rule initialization. Added some of the initial routines for external command execution with ability to capture stdout, stderr, and exit status.
...
git-svn-id: file:///home/mbr/svn/fwknop/trunk@211 510a4753-2344-4c79-9c09-4d669213fbeb
2010-04-12 12:41:57 +00:00