summaryrefslogtreecommitdiff
path: root/monitor_wrap.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2018-07-13 13:38:10 +1000
committerDarren Tucker <dtucker@dtucker.net>2018-07-13 13:38:10 +1000
commit1dd32c23f2a85714dfafe2a9cc516971d187caa4 (patch)
tree196b13ef4b9d853e2e8e6d535b2b851574436c82 /monitor_wrap.c
parent7449c178e943e5c4f6c8416a4e41d93b70c11c9e (diff)
Fallout from buffer conversion in AUDIT_EVENTS.
Supply missing "int r" and fix error path for sshbuf_new().
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r--monitor_wrap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c
index 55b892b90..96636aede 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -946,11 +946,12 @@ void
946mm_audit_event(ssh_audit_event_t event) 946mm_audit_event(ssh_audit_event_t event)
947{ 947{
948 struct sshbuf *m; 948 struct sshbuf *m;
949 int r;
949 950
950 debug3("%s entering", __func__); 951 debug3("%s entering", __func__);
951 952
952 if ((m = sshbuf_new()) == NULL) 953 if ((m = sshbuf_new()) == NULL)
953 fatal("%s: buffer error: %s", __func__, ssh_err(r)); 954 fatal("%s: sshbuf_new failed", __func__);
954 if ((r = sshbuf_put_u32(m, event)) != 0) 955 if ((r = sshbuf_put_u32(m, event)) != 0)
955 fatal("%s: buffer error: %s", __func__, ssh_err(r)); 956 fatal("%s: buffer error: %s", __func__, ssh_err(r));
956 957
@@ -962,11 +963,12 @@ void
962mm_audit_run_command(const char *command) 963mm_audit_run_command(const char *command)
963{ 964{
964 struct sshbuf *m; 965 struct sshbuf *m;
966 int r;
965 967
966 debug3("%s entering command %s", __func__, command); 968 debug3("%s entering command %s", __func__, command);
967 969
968 if ((m = sshbuf_new()) == NULL) 970 if ((m = sshbuf_new()) == NULL)
969 fatal("%s: buffer error: %s", __func__, ssh_err(r)); 971 fatal("%s: sshbuf_new failed", __func__);
970 if ((r = sshbuf_put_cstring(m, command)) != 0) 972 if ((r = sshbuf_put_cstring(m, command)) != 0)
971 fatal("%s: buffer error: %s", __func__, ssh_err(r)); 973 fatal("%s: buffer error: %s", __func__, ssh_err(r));
972 974