summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Sowden <jeremy@azazel.net>2021-11-21 20:41:37 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2021-11-23 14:24:53 +0100
commitefbbcb757fef41caf18f789861b3141cee3be753 (patch)
tree45cea0fbc19c2bf4a6f4904e172179f50e027f08
parenta59912ecc812b00fe14c8a571a1683f154fd4d94 (diff)
ulogd: fix order of log arguments
If `daemon` fails during start-up, ulogd attempts to print `errno` and `strerror(errno)` to the log. However, the arguments are the wrong way round. Swap them. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/ulogd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ulogd.c b/src/ulogd.c
index a31b355..97da4fc 100644
--- a/src/ulogd.c
+++ b/src/ulogd.c
@@ -1569,7 +1569,7 @@ int main(int argc, char* argv[])
if (daemonize){
if (daemon(0, 0) < 0) {
ulogd_log(ULOGD_FATAL, "can't daemonize: %s (%d)\n",
- errno, strerror(errno));
+ strerror(errno), errno);
warn_and_exit(daemonize);
}
}