From d904f5637f15a50b15d543a67181647dce63c9cb Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Wed, 14 Jul 2010 02:58:51 +0000 Subject: [PATCH] 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 --- server/extcmd.c | 6 ------ server/fw_util.c | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/server/extcmd.c b/server/extcmd.c index 23b7f309..5d8ef7f8 100644 --- a/server/extcmd.c +++ b/server/extcmd.c @@ -79,12 +79,6 @@ _run_extcmd(uid_t user_uid, char *cmd, char *so_buf, size_t so_buf_sz, int timeo log_msg(LOG_ERR, "run_extcmd: fork failed: %s", strerror(errno)); return(EXTCMD_FORK_ERROR); } - if (pid > 0) - { - /* we are the parent - */ - wait(NULL); - } else if (pid == 0) { /* We are the child */ diff --git a/server/fw_util.c b/server/fw_util.c index c01435d4..d644053d 100644 --- a/server/fw_util.c +++ b/server/fw_util.c @@ -157,7 +157,7 @@ fw_dump_rules(fko_srv_options_t *opts) ); //printf("(%i) CMD: '%s'\n", i, cmd_buf); - res = run_extcmd(cmd_buf, NULL, 0, 0); + res = system(cmd_buf); /* Expect full success on this */ if(! EXTCMD_IS_SUCCESS(res))