OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.35 / (download) - annotate - [select for diffs], Tue May 14 13:28:08 2024 UTC (2 weeks, 4 days ago) by op
Branch: MAIN
CVS Tags: HEAD
Changes since 1.34: +11 -11 lines
Diff to previous 1.34 (colored)

use C99 syntax for filling the table_backend structs; ok gilles@

Revision 1.34 / (download) - annotate - [select for diffs], Sun Feb 11 09:24:26 2024 UTC (3 months, 2 weeks ago) by op
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5
Changes since 1.33: +11 -63 lines
Diff to previous 1.33 (colored)

unify smtpd and makemap table parser

These are supposed to parse the same file format but have subtle
difference in the handling of comments, continuation lines and escaping.

Converge both to the simpler smtpd parser which doesn't handle
continuation lines nor escaping, and support comments only at the start
of the line.

improvements and ok millert@

Revision 1.33 / (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_4_BASE, OPENBSD_7_4, 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.32: +1 -15 lines
Diff to previous 1.32 (colored)

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

ok jung@

Revision 1.32 / (download) - annotate - [select for diffs], Fri Dec 28 14:21:02 2018 UTC (5 years, 5 months ago) by eric
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, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.31: +8 -1 lines
Diff to previous 1.31 (colored)

type static tables on the fly when the first element is added

ok gilles@

Revision 1.31 / (download) - annotate - [select for diffs], Fri Dec 28 11:11:36 2018 UTC (5 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

fix logging of list entries

Revision 1.30 / (download) - annotate - [select for diffs], Fri Dec 28 10:42:18 2018 UTC (5 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.29: +128 -62 lines
Diff to previous 1.29 (colored)

use private data structure for managing static table content

ok gilles@

Revision 1.29 / (download) - annotate - [select for diffs], Thu Dec 27 15:04:59 2018 UTC (5 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.28: +2 -5 lines
Diff to previous 1.28 (colored)

table_fetch() always expect a valid dst pointer.

ok gilles@

Revision 1.28 / (download) - annotate - [select for diffs], Thu Dec 27 14:23:41 2018 UTC (5 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.27: +41 -1 lines
Diff to previous 1.27 (colored)

introduce dump() and add() table methods, only implemented for static tables.

ok gilles@

Revision 1.27 / (download) - annotate - [select for diffs], Thu Dec 27 09:30:29 2018 UTC (5 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.26: +5 -7 lines
Diff to previous 1.26 (colored)

pass the table pointer to the lookup()/fecth() methods

ok gilles@

Revision 1.26 / (download) - annotate - [select for diffs], Thu Dec 27 08:57:03 2018 UTC (5 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.25: +4 -4 lines
Diff to previous 1.25 (colored)

change the close() method to take the table pointer

ok gilles

Revision 1.25 / (download) - annotate - [select for diffs], Thu Dec 27 08:08:06 2018 UTC (5 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.24: +5 -4 lines
Diff to previous 1.24 (colored)

Make the backend open method return an int to report success.
The implementation is responsible for setting the handle pointer
as needed.

ok gilles@

Revision 1.24 / (download) - annotate - [select for diffs], Wed Dec 26 20:13:43 2018 UTC (5 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.23: +4 -4 lines
Diff to previous 1.23 (colored)

reorder parameters for consistency

Revision 1.23 / (download) - annotate - [select for diffs], Wed Dec 26 14:15:13 2018 UTC (5 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.22: +5 -7 lines
Diff to previous 1.22 (colored)

get rid of the unused dict argument in table lookup and fetch api.

ok gilles@

Revision 1.22 / (download) - annotate - [select for diffs], Wed Dec 26 11:53:02 2018 UTC (5 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.21: +2 -1 lines
Diff to previous 1.21 (colored)

move the table backend name in the backend struct.
remove unused function.

ok gilles@

Revision 1.21 / (download) - annotate - [select for diffs], Sun Dec 23 15:53:24 2018 UTC (5 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.20: +17 -9 lines
Diff to previous 1.20 (colored)

Simplify the table backend interface: lookup results are returned
as strings, and parsing is handled by the upper layer.

ok gilles@

Revision 1.20 / (download) - annotate - [select for diffs], Thu Nov 1 10:47:46 2018 UTC (5 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.19: +4 -3 lines
Diff to previous 1.19 (colored)

introduce K_REGEX table type and table_regex_match(), unused for now

ok eric@

Revision 1.19 / (download) - annotate - [select for diffs], Sat Jun 16 19:41:26 2018 UTC (5 years, 11 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored)

rework the table API so that it takes a struct smtpd * context in parameter
of functions creating, looking up or destroying tables.

this is a first step in cleaning up parse.y so it doesn't have side effects
outside of parse_config(), bringing nothing but making code cleaner.

ok millert@

Revision 1.18 / (download) - annotate - [select for diffs], Thu May 24 11:38:24 2018 UTC (6 years ago) by gilles
Branch: MAIN
Changes since 1.17: +3 -2 lines
Diff to previous 1.17 (colored)

switch smtpd to new grammar

ok eric@

Revision 1.17 / (download) - annotate - [select for diffs], Tue Aug 29 07:37:11 2017 UTC (6 years, 9 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.16: +50 -14 lines
Diff to previous 1.16 (colored)

Change the table parser logic. If the table is untyped, determine
its type by examining the first entry: if it contains a separator, type
is "mapping", otherwise type is "list".  All entries are then parsed
according to the table type.  The "list" type can also be forced by using
the "@list" directive in a comment. This allows to define list of entries
containing a separator.

Also, log parse errors.

ok gilles@

Revision 1.16 / (download) - annotate - [select for diffs], Mon Aug 14 08:01:14 2017 UTC (6 years, 9 months ago) by eric
Branch: MAIN
Changes since 1.15: +10 -20 lines
Diff to previous 1.15 (colored)

remove useless indirection for reading the file content

ok gilles@

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jan 22 13:08:44 2016 UTC (8 years, 4 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.14: +5 -4 lines
Diff to previous 1.14 (colored)

add a log_warn() so that when smtpd fails to start due to a problem reading
the configuration file of a table, user actually understands what happens

diff by Alexis Vachette, ok jung@

Revision 1.14 / (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.13: +3 -3 lines
Diff to previous 1.13 (colored)

remove spaces after '!'

no binary change

ok millert

Revision 1.13 / (download) - annotate - [select for diffs], Tue Dec 22 07:52:52 2015 UTC (8 years, 5 months ago) by sunil
Branch: MAIN
Changes since 1.12: +12 -9 lines
Diff to previous 1.12 (colored)

Wrap long lines.

Ok gilles@ jung@

Revision 1.12 / (download) - annotate - [select for diffs], Tue Nov 24 07:40:26 2015 UTC (8 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

teach table_db and table_static about mailaddr maps (unused yet)

ok sunil@, ok jung@

Revision 1.11 / (download) - annotate - [select for diffs], Sun Oct 11 12:50:00 2015 UTC (8 years, 7 months ago) by sunil
Branch: MAIN
Changes since 1.10: +6 -12 lines
Diff to previous 1.10 (colored)

Convert some fgetln to getline.

Ok gilles@, giovanni@, millert@

Revision 1.10 / (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.9: +2 -1 lines
Diff to previous 1.9 (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.9 / (download) - annotate - [select for diffs], Tue Jul 8 13:49:09 2014 UTC (9 years, 10 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.8: +5 -5 lines
Diff to previous 1.8 (colored)

Update the table API: lookup functions can take an optional parameters
dictionnary (currently not set). While there, add a helper for forking
external backends, and remove unused table functions.

ok gilles@

Revision 1.8 / (download) - annotate - [select for diffs], Thu Nov 28 10:43:37 2013 UTC (10 years, 6 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.7: +4 -4 lines
Diff to previous 1.7 (colored)

unsigned char casts for ctype
ok gilles@

Revision 1.7 / (download) - annotate - [select for diffs], Mon Nov 18 11:47:16 2013 UTC (10 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

change dict_poproot() prototype: do not take key placeholder parameter as
it can't work that way.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Oct 28 18:50:23 2013 UTC (10 years, 7 months ago) by eric
Branch: MAIN
Changes since 1.5: +5 -1 lines
Diff to previous 1.5 (colored)

alias files may be empty

Revision 1.5 / (download) - annotate - [select for diffs], Fri May 24 17:03:14 2013 UTC (11 years ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.4: +88 -250 lines
Diff to previous 1.4 (colored)

sync with OpenSMTPD 5.3.2

ok gilles@

Revision 1.4 / (download) - annotate - [select for diffs], Fri Apr 12 18:22:49 2013 UTC (11 years, 1 month ago) by eric
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

replace MAX_LINE_SIZE and SMTP_LINE_MAX with SMTPD_MAXLINESIZE for
consistency and clarity.  Remove useless and confusing extra byte in
a few arrays based on this define.

ok gilles@

Revision 1.3 / (download) - annotate - [select for diffs], Wed Feb 13 14:34:43 2013 UTC (11 years, 3 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.2: +7 -3 lines
Diff to previous 1.2 (colored)

- when declaring a static table for userinfo, do not make username part of
  the value as it confuses users
  { gilles => gilles:10:100:/home } becomes { gilles => 10:100:/home }

ok eric, we'll discuss changes under the hood post-release

Revision 1.2 / (download) - annotate - [select for diffs], Tue Feb 5 15:23:40 2013 UTC (11 years, 3 months ago) by gilles
Branch: MAIN
Changes since 1.1: +5 -16 lines
Diff to previous 1.1 (colored)

unbreak broken smtpctl table update

fix by eric and I, ok eric@

Revision 1.1 / (download) - annotate - [select for diffs], Sat Jan 26 09:37:24 2013 UTC (11 years, 4 months ago) by gilles
Branch: MAIN

Sync with our smtpd repo:

* first bricks of ldap and sqlite support (not finished but both working)
* new table API to replace map API, all lookups are done through tables
* improved handling of temporary errors throughout the daemon
* improved scheduler and mta logic: connection reuse, optimizes batches
* improved queue: more tolerant to admin errors, new layout, less disk-IO
* improved memory usage under high load
* SSL certs/keys isolated to lookup process to avoid facing network
* VIRTUAL support improved, fully virtual setups possible now
* runtime tracing of processes through smtpctl trace
* ssl_privsep.c sync-ed with relayd
* ssl.c no longer contains smtpd specific interfaces
* smtpd-specific ssl bits moved to ssl_smtpd.c
* update mail address in copyright

FLUSH YOUR QUEUE. FLUSH YOUR QUEUE. FLUSH YOUR QUEUE. FLUSH YOUR QUEUE.

smtpd.conf(5) simplified, it will require adaptations

ok eric@

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.