aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamadm
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-07-30 21:18:57 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-07-30 21:18:57 +0100
commitec8ec4c6d0daf956f58a5c26d9a5bd8be082fa3f (patch)
tree6918e63c4b2188f745d64d0d7a419a8b75c51e97 /src/rspamadm
parente92d01d68c4d119d5df9b8d3533aa737a3496732 (diff)
downloadrspamd-ec8ec4c6d0daf956f58a5c26d9a5bd8be082fa3f.tar.gz
rspamd-ec8ec4c6d0daf956f58a5c26d9a5bd8be082fa3f.zip
[Minor] Remove assertion
Diffstat (limited to 'src/rspamadm')
-rw-r--r--src/rspamadm/signtool.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rspamadm/signtool.c b/src/rspamadm/signtool.c
index 03f6ac60e..555937966 100644
--- a/src/rspamadm/signtool.c
+++ b/src/rspamadm/signtool.c
@@ -344,7 +344,13 @@ rspamadm_sign_file (const gchar *fname, struct rspamd_cryptobox_keypair *kp)
}
rspamd_snprintf (sigpath, sizeof (sigpath), "%s%s", fname, suffix);
- g_assert (write (fd_sig, sig, rspamd_cryptobox_signature_bytes (mode)) != -1);
+
+ if (write (fd_sig, sig, rspamd_cryptobox_signature_bytes (mode)) == -1) {
+ rspamd_fprintf (stderr, "cannot write signature to %s: %s\n", sigpath,
+ strerror (errno));
+ exit (errno);
+ }
+
close (fd_sig);
munmap (map, st.st_size);