From 6c050b481ca8b8d812d74de5ee6630ab3954f7a6 Mon Sep 17 00:00:00 2001 From: Damien Stuart Date: Sat, 12 Feb 2011 13:18:31 +0000 Subject: [PATCH] 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 --- Makefile.am | 1 + server/extcmd.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 0d719422..5011940c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -73,6 +73,7 @@ EXTRA_DIST = \ python/README \ python/setup.py \ python/fkomodule.c \ + python/fko.py \ win32/config.h \ win32/fwknop-client.vcproj \ win32/getopt.c \ diff --git a/server/extcmd.c b/server/extcmd.c index c4db8c54..734df0a2 100644 --- a/server/extcmd.c +++ b/server/extcmd.c @@ -96,6 +96,7 @@ _run_extcmd(uid_t user_uid, char *cmd, char *so_buf, size_t so_buf_sz, int timeo int retval = 0; char so_read_buf[IO_READ_BUF_LEN]; pid_t pid; + int res; if(so_buf == NULL) { @@ -122,7 +123,8 @@ _run_extcmd(uid_t user_uid, char *cmd, char *so_buf, size_t so_buf_sz, int timeo exit(EXTCMD_SETUID_ERROR); } } - exit(WEXITSTATUS(system(cmd))); + res = system(cmd); + exit(WEXITSTATUS(res)); } /* Retval is forced to 0 as we don't care about the exit status of