diff options
author | millert <millert@openbsd.org> | 2020-02-25 17:03:13 +0000 |
---|---|---|
committer | millert <millert@openbsd.org> | 2020-02-25 17:03:13 +0000 |
commit | 3f3634fce3f3e8dfbf39b3584a7df521b7e9efaa (patch) | |
tree | fecb9394aca78d54740b85d6b655fe0d6450df5b | |
parent | Cast argument of ctype(3) macros to unsigned char, not int. (diff) | |
download | OpenSMTPD-3f3634fce3f3e8dfbf39b3584a7df521b7e9efaa.tar.xz OpenSMTPD-3f3634fce3f3e8dfbf39b3584a7df521b7e9efaa.zip |
fsqueue_envelope_dump() returns 0 on temporary failure, not -1.
We should only exit the loop that creates the queue file if we
successfully created the file or we've exceeded the max number of
tries. From gilles@ based on feedback from Qualys.
-rw-r--r-- | queue_fs.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: queue_fs.c,v 1.19 2019/06/28 13:32:51 deraadt Exp $ */ +/* $OpenBSD: queue_fs.c,v 1.20 2020/02/25 17:03:13 millert Exp $ */ /* * Copyright (c) 2011 Gilles Chehade <gilles@poolp.org> @@ -228,8 +228,7 @@ queue_fs_envelope_create(uint32_t msgid, const char *buf, size_t len, fsqueue_envelope_incoming_path(*evpid, path, sizeof(path)); - r = fsqueue_envelope_dump(path, buf, len, 0, 0); - if (r >= 0) + if ((r = fsqueue_envelope_dump(path, buf, len, 0, 0)) != 0) goto done; } r = 0; |