aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.am1
-rw-r--r--src/log_syslog.c6
-rw-r--r--src/pevent.c2
-rw-r--r--src/redirector.c2
4 files changed, 5 insertions, 6 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 6e2b390..8807040 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,6 @@
sbin_PROGRAMS = potd
potd_SOURCES = compat.c utils.c options.c log.c log_colored.c log_file.c socket.c pevent.c capabilities.c filesystem.c jail_packet.c jail.c forward.c redirector.c protocol.c protocol_ssh.c main.c
+potd_LDADD = @potd_LIBS@
if HAVE_SECCOMP
potd_SOURCES += pseccomp.c
endif
diff --git a/src/log_syslog.c b/src/log_syslog.c
index 3999d9b..72b71b5 100644
--- a/src/log_syslog.c
+++ b/src/log_syslog.c
@@ -81,7 +81,7 @@ void log_fmt_syslog(log_priority prio, const char *fmt, ...)
assert(fmt);
va_start(arglist, fmt);
switch (prio) {
- case DEBUG:
+ case LP_DEBUG:
LOG(LOG_DEBUG, fmt, arglist);
break;
case NOTICE:
@@ -118,7 +118,7 @@ void log_fmtex_syslog(log_priority prio, const char *srcfile,
va_end(arglist);
switch (prio) {
- case DEBUG:
+ case LP_DEBUG:
LOGEX(LOG_DEBUG, srcfile, line, out);
break;
case NOTICE:
@@ -152,7 +152,7 @@ void log_fmtexerr_syslog(log_priority prio, const char *srcfile,
va_end(arglist);
switch (prio) {
- case DEBUG:
+ case LP_DEBUG:
LOGEXERR(LOG_DEBUG, srcfile, line, out, saved_errno);
break;
case NOTICE:
diff --git a/src/pevent.c b/src/pevent.c
index bdfed24..276fe48 100644
--- a/src/pevent.c
+++ b/src/pevent.c
@@ -258,7 +258,7 @@ event_forward_connection(event_ctx *ctx, int dest_fd, on_data_cb on_data,
ev = &ctx->events[ctx->current_event];
read_buf = (event_buf *) ev->data.ptr;
- while (data_avail && ctx->active && !ctx->has_error) {
+ while (ctx->active && !ctx->has_error) {
saved_errno = 0;
siz = -1;
diff --git a/src/redirector.c b/src/redirector.c
index c2be5bc..3ba6bd6 100644
--- a/src/redirector.c
+++ b/src/redirector.c
@@ -468,7 +468,6 @@ client_io(event_ctx *ev_ctx, int src_fd, void *user_data)
} else return 0;
fwd_state = event_forward_connection(ev_ctx, dest_fd, NULL, NULL);
- saved_errno = errno;
switch (fwd_state_string(fwd_state, ev_cli->client_args,
ev_cli->fwd_sock))
@@ -480,7 +479,6 @@ client_io(event_ctx *ev_ctx, int src_fd, void *user_data)
return 1;
case CON_IN_ERROR:
case CON_OUT_ERROR:
- errno = saved_errno;
ev_ctx->active = 0;
return 0;
}