OpenBSD CVS

CVS log for src/usr.sbin/smtpd/queue_fs.c


[BACK] Up to [local] / src / usr.sbin / smtpd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.23 / (download) - annotate - [select for diffs], Wed May 31 16:51:46 2023 UTC (12 months ago) by op
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.22: +2 -1 lines
Diff to previous 1.22 (colored)

add missing include of time.h

spotted after a report on OpenSMTPD-portable.  While here include
sys/time.h in smtpd.h, as noted in event_init(3), since it includes
event.h.

ok millert@

Revision 1.22 / (download) - annotate - [select for diffs], Mon Jun 14 17:58:16 2021 UTC (2 years, 11 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.21: +1 -9 lines
Diff to previous 1.21 (colored)

add required headers for smtpd.h and remove unnecessary ones in other files.

ok jung@

Revision 1.21 / (download) - annotate - [select for diffs], Wed May 26 18:08:55 2021 UTC (3 years ago) by eric
Branch: MAIN
Changes since 1.20: +4 -5 lines
Diff to previous 1.20 (colored)

replaces calls to err(3)/errx(3) with fatal()/fatalx() from log.c
for code that runs in the daemon.

ok florian@ millert@

Revision 1.20 / (download) - annotate - [select for diffs], Tue Feb 25 17:03:13 2020 UTC (4 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.19: +2 -3 lines
Diff to previous 1.19 (colored)

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.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:51 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Dec 30 23:09:58 2018 UTC (5 years, 5 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.17: +1 -2 lines
Diff to previous 1.17 (colored)

Delete unnecessary <libgen.h> #includes

ok deraadt@

Revision 1.17 / (download) - annotate - [select for diffs], Thu May 31 21:06:12 2018 UTC (6 years ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

remove 'where' parameter from all x*() functions in utils.c, it doesn't
really help us with anything, propagate the change in codebase

ok millert@

Revision 1.16 / (download) - annotate - [select for diffs], Mon May 14 15:23:05 2018 UTC (6 years ago) by gilles
Branch: MAIN
Changes since 1.15: +2 -91 lines
Diff to previous 1.15 (colored)

kill corrupt / uncorrupt queue mechanism as it has never been usable and it
will be made irrelevant when the new config comes up soon

ok eric@

Revision 1.15 / (download) - annotate - [select for diffs], Tue Oct 10 05:03:52 2017 UTC (6 years, 7 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.14: +3 -5 lines
Diff to previous 1.14 (colored)

Use clock_gettime(CLOCK_REALTIME) instead of gettimeofday+TIMEVAL_TO_TIMESPEC

ok jung@

Revision 1.14 / (download) - annotate - [select for diffs], Wed Dec 30 11:40:30 2015 UTC (8 years, 5 months ago) by jung
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored)

d_namlen is not portable, there is no reason to keep a delta with -portable and
it is not even "optimizing" things, this is a startup loop which will not bring
any benefit at runtime. thus, change it and reduce diff to -portable.

ok gilles sunil

Revision 1.13 / (download) - annotate - [select for diffs], Mon Dec 28 22:08:30 2015 UTC (8 years, 5 months ago) by jung
Branch: MAIN
Changes since 1.12: +9 -9 lines
Diff to previous 1.12 (colored)

remove spaces after '!'

no binary change

ok millert

Revision 1.12 / (download) - annotate - [select for diffs], Mon Dec 14 10:22:12 2015 UTC (8 years, 5 months ago) by jung
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

remove trailing whitespace

ok sunil gilles

Revision 1.11 / (download) - annotate - [select for diffs], Thu Nov 5 09:14:31 2015 UTC (8 years, 6 months ago) by sunil
Branch: MAIN
Changes since 1.10: +46 -1 lines
Diff to previous 1.10 (colored)

Implement smtpctl uncorrupt <msgid>

"uncorrupt" moves envelopes from corrupt bucket back to the queue
for further discovery by the daemon.

After correcting the corrupt envelopes, admin could now...

# smtpctl uncorrupt msgid
# smtpctl discover msgid

to schedule the messages.

Ok gilles@

Revision 1.10 / (download) - annotate - [select for diffs], Thu Oct 29 10:25:36 2015 UTC (8 years, 7 months ago) by sunil
Branch: MAIN
Changes since 1.9: +66 -1 lines
Diff to previous 1.9 (colored)

Implement smtpctl discover <evpid|msgid>.

discover subcommand schedules envelopes manually moved to the queue.
It triggers a queue walk searching for envelopes with the given id,
schedules them and informs the user number of envelopes scheduled.
Admins no longer would need to restart the daemon to discover
manually moved messages.

Ok gilles@

Revision 1.9 / (download) - annotate - [select for diffs], Mon Oct 12 22:29:49 2015 UTC (8 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.8: +1 -4 lines
Diff to previous 1.8 (colored)

do not call sync() when committing a message, it's not helping in any way

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jan 20 17:37:54 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.7: +16 -16 lines
Diff to previous 1.7 (colored)

use <limits.h> comprehensively.  For now try to push <> includes to
each .c file, and out of the .h files.  To avoid overinclude.
ok gilles, in principle.  If this has been done right, -portable should
become easier to maintain.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:21 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +2 -3 lines
Diff to previous 1.6 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.6 / (download) - annotate - [select for diffs], Tue Jul 8 15:45:32 2014 UTC (9 years, 10 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.5: +6 -3 lines
Diff to previous 1.5 (colored)

various queue improvements:

- add a "close" hook to the backend API.
- improve the sync() pattern in queue_fs: only sync at commit
  time and not for every envelope creation
- various fixes to the experimental external queue API.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Apr 19 13:48:57 2014 UTC (10 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.4: +14 -8 lines
Diff to previous 1.4 (colored)

(void) cast strlcpy/strlcat/snprintf that cannot truncate

Revision 1.4 / (download) - annotate - [select for diffs], Thu Dec 26 17:25:32 2013 UTC (10 years, 5 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

bcopy -> memmove
bzero -> memset

Revision 1.3 / (download) - annotate - [select for diffs], Wed Nov 6 10:07:29 2013 UTC (10 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.2: +10 -8 lines
Diff to previous 1.2 (colored)

fix assertion that could lead to orphaned messages left in the queue
after all envelopes are gone.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Oct 26 12:27:59 2013 UTC (10 years, 7 months ago) by eric
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

%i -> %d in format strings

Revision 1.1 / (download) - annotate - [select for diffs], Fri Jul 19 20:37:07 2013 UTC (10 years, 10 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4

Assorted queue improvements:
- cleanup the internal queue backend API and get rid of the QOP_* thing.
- implement a queue_proc backend
- rename queue_fsqueue.c to queue_fs
- enable support for queue encryption
- add an envelope cache
- better logging and error reporting

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.