/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugins.d/mandos-client.c

  • Committer: Teddy Hogeborn
  • Date: 2015-07-05 18:36:23 UTC
  • mto: This revision was merged to the branch mainline in revision 759.
  • Revision ID: teddy@recompile.se-20150705183623-k7yokhi0wpvs61iw
Add plugin for mandos-client to add and delete local routes.

* Makefile (LIBNL3_CFLAGS, LIBNL3_LIBS): New; add for netlink library.
  (PLUGIN_HELPERS): Add "plugin-helpers/mandos-client-iprouteadddel".
  (plugin-helpers/mandos-client-iprouteadddel): New.
* plugin-helpers/mandos-client-iprouteadddel.c: New.
* plugins.d/mandos_client (add_remove_local_route): Rename
                                                    "remove_arg" to
                                                    "delete_arg".  All
                                                    users changed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
710
710
  int ret;
711
711
  char helper[] = "mandos-client-iprouteadddel";
712
712
  char add_arg[] = "add";
713
 
  char remove_arg[] = "remove";
 
713
  char delete_arg[] = "delete";
714
714
  char *pluginhelperdir = getenv("MANDOSPLUGINHELPERDIR");
715
715
  if(pluginhelperdir == NULL){
716
716
    if(debug){
791
791
#pragma GCC diagnostic ignored "-Wcast-qual"
792
792
#endif
793
793
    if(fexecve(helper_fd, (char *const [])
794
 
               { helper, add ? add_arg : remove_arg, (char *)address,
 
794
               { helper, add ? add_arg : delete_arg, (char *)address,
795
795
                   interface, NULL }, environ) == -1){
796
796
#ifdef __GNUC__
797
797
#pragma GCC diagnostic pop