]>
git.ipfire.org Git - thirdparty/mlmmj.git/log
Baptiste Daroussin [Wed, 5 Jan 2022 10:22:04 +0000 (11:22 +0100)]
prepstdreply: eliminate the temporary prepqstdreply
now every consumer have been converted to handle files relative to the
list directory
Baptiste Daroussin [Wed, 5 Jan 2022 10:00:27 +0000 (11:00 +0100)]
mailqueue: factorize the code opening a file in the queue
Baptiste Daroussin [Wed, 5 Jan 2022 09:03:35 +0000 (10:03 +0100)]
prepstdreply: duplicate and simplify
in the migration time duplicate the function to convert it into a
function which mainly manipulated file descriptors and prevent uselessly
reopening the queued file later
Baptiste Daroussin [Wed, 5 Jan 2022 08:20:09 +0000 (09:20 +0100)]
mlmmj-maintd: eliminate navigation in the repositories
This is not needed anymore as we use at function were possible
Baptiste Daroussin [Wed, 5 Jan 2022 08:19:41 +0000 (09:19 +0100)]
headers: xmalloc should always be included before mlmmj.h
Baptiste Daroussin [Tue, 4 Jan 2022 22:17:01 +0000 (23:17 +0100)]
cleanup: eliminate most of the concatsdtr use case
Baptiste Daroussin [Tue, 4 Jan 2022 22:03:37 +0000 (23:03 +0100)]
mlmmj-maintd: reduce memory manipulation
Baptiste Daroussin [Tue, 4 Jan 2022 21:35:40 +0000 (22:35 +0100)]
mlmmj-send: reduce memory manipulation
Baptiste Daroussin [Tue, 4 Jan 2022 21:04:19 +0000 (22:04 +0100)]
send_list: avoid memory allocation by using openat
Baptiste Daroussin [Tue, 4 Jan 2022 20:42:03 +0000 (21:42 +0100)]
mlmmj-process: convert to use struct mlmmj_list
Baptiste Daroussin [Tue, 4 Jan 2022 16:13:58 +0000 (17:13 +0100)]
tests: Add tests about check_smtpreply
Baptiste Daroussin [Fri, 17 Dec 2021 12:05:04 +0000 (13:05 +0100)]
Drop files which is supposed to be generated
Baptiste Daroussin [Fri, 17 Dec 2021 11:20:10 +0000 (12:20 +0100)]
test: add more tests
Baptiste Daroussin [Fri, 17 Dec 2021 11:19:56 +0000 (12:19 +0100)]
ctrlvalues: fix initialisation of the string list
Baptiste Daroussin [Fri, 17 Dec 2021 08:18:47 +0000 (09:18 +0100)]
mlmmj-maintd: use daemon(3) instead of home made version
Baptiste Daroussin [Fri, 17 Dec 2021 07:52:28 +0000 (08:52 +0100)]
Rework controls
Fix ctrlsizet by using the new strtouim instead of strtoim, size_t
is an unsigned.
Factorize ctrllong and ctrlint
Add test suite
Baptiste Daroussin [Thu, 16 Dec 2021 16:39:16 +0000 (17:39 +0100)]
strtoim: imporve robustness
Baptiste Daroussin [Thu, 16 Dec 2021 16:35:33 +0000 (17:35 +0100)]
Simplify code now that unsubscribe() support SUB_ALL
Baptiste Daroussin [Thu, 16 Dec 2021 16:25:06 +0000 (17:25 +0100)]
subscriber functions: add unit tests
Baptiste Daroussin [Thu, 16 Dec 2021 15:43:49 +0000 (16:43 +0100)]
unsubscribe: remove unused parameter
Baptiste Daroussin [Thu, 16 Dec 2021 14:21:56 +0000 (15:21 +0100)]
memory: use wrappers which abort() in case of failure
Baptiste Daroussin [Thu, 16 Dec 2021 13:57:47 +0000 (14:57 +0100)]
cleanup: replace itoa with snprintf(...%d...)
Baptiste Daroussin [Thu, 16 Dec 2021 13:07:53 +0000 (14:07 +0100)]
test: add unit test for mygetline
Baptiste Daroussin [Thu, 16 Dec 2021 12:37:40 +0000 (13:37 +0100)]
mail functions: factorize the code and add unit test
Baptiste Daroussin [Thu, 16 Dec 2021 11:28:01 +0000 (12:28 +0100)]
tests: add testing for strtoim family functions
Baptiste Daroussin [Thu, 16 Dec 2021 10:44:14 +0000 (11:44 +0100)]
mybasename: test and optimise
Eliminate the need for memory alloation for this function
Baptiste Daroussin [Thu, 16 Dec 2021 10:38:21 +0000 (11:38 +0100)]
tests: add missing test for chomp and add test for mydirname
Baptiste Daroussin [Thu, 16 Dec 2021 10:29:37 +0000 (11:29 +0100)]
random: ensure arc4random_uniform is used if possible
Baptiste Daroussin [Thu, 16 Dec 2021 10:23:57 +0000 (11:23 +0100)]
chomp: full test all chomp branches
Baptiste Daroussin [Thu, 9 Dec 2021 12:56:53 +0000 (13:56 +0100)]
tests: err_set_file is not portable
Use atf facilities instead
Baptiste Daroussin [Thu, 9 Dec 2021 09:18:58 +0000 (10:18 +0100)]
locking: remove lock wrappers, lock is now handled an open() time
Baptiste Daroussin [Thu, 9 Dec 2021 09:13:33 +0000 (10:13 +0100)]
mlmmj-send: get an exclusive lock at open time
Baptiste Daroussin [Thu, 9 Dec 2021 09:04:10 +0000 (10:04 +0100)]
mlmmj-process: eliminate 2 direct calls to mlmmj-send
Baptiste Daroussin [Thu, 9 Dec 2021 08:50:57 +0000 (09:50 +0100)]
send_list: stop executing mlmmj-send
Baptiste Daroussin [Thu, 9 Dec 2021 08:18:42 +0000 (09:18 +0100)]
mlmmj-maintd: mlmmjunsub is not necessary anymore
Baptiste Daroussin [Thu, 9 Dec 2021 08:14:51 +0000 (09:14 +0100)]
mlmmj-maintd: do not execute mlmmj-unsub
Baptiste Daroussin [Thu, 9 Dec 2021 08:07:22 +0000 (09:07 +0100)]
send_denymail: do not execute mlmmj-send
Baptiste Daroussin [Thu, 9 Dec 2021 07:56:40 +0000 (08:56 +0100)]
send_help: do not execute mlmmj-send
Baptiste Daroussin [Wed, 8 Dec 2021 17:07:35 +0000 (18:07 +0100)]
mlmmj-unsub: remove now unneeded headers
Baptiste Daroussin [Wed, 8 Dec 2021 17:01:39 +0000 (18:01 +0100)]
mlmmj-unsub: remove the check for the full path
mlmmj-unsub does not execute anyother program anymore, making this
check now useless
Baptiste Daroussin [Wed, 8 Dec 2021 16:57:46 +0000 (17:57 +0100)]
unsubscribe: fix conversion to *at functions
Baptiste Daroussin [Wed, 8 Dec 2021 16:29:38 +0000 (17:29 +0100)]
mlmmj-sub: add a test for auto unsubscription on subscruption
Baptiste Daroussin [Wed, 8 Dec 2021 09:31:59 +0000 (10:31 +0100)]
mlmmj-sub: stop forking mlmmj-unsub to unsubscribe people
Baptiste Daroussin [Wed, 8 Dec 2021 09:19:28 +0000 (10:19 +0100)]
unsubscribe: move the code for reusability
Baptiste Daroussin [Tue, 7 Dec 2021 10:01:47 +0000 (11:01 +0100)]
Factorize lowercase code
Baptiste Daroussin [Fri, 3 Dec 2021 17:05:41 +0000 (18:05 +0100)]
send_mail: stop executing mlmmj-send for sending a single email
instead of executing an external program, directly send the email
Baptiste Daroussin [Fri, 5 Nov 2021 09:17:45 +0000 (10:17 +0100)]
send_mails: extract code from mlmmj-send
Prepare the land for a refactoring of the send emails function, to avoid
having to call the mlmmj-send binary.
Baptiste Daroussin [Fri, 5 Nov 2021 09:40:08 +0000 (10:40 +0100)]
cleanup: use open_memstream
It simplifies the code handling the preparation of the body and the
headers from a mmap
Baptiste Daroussin [Thu, 4 Nov 2021 14:07:15 +0000 (15:07 +0100)]
prepstdreply: reduce memory allocation by using file descriptors
Baptiste Daroussin [Thu, 4 Nov 2021 13:49:54 +0000 (14:49 +0100)]
cleanup: remove dead code
Baptiste Daroussin [Thu, 4 Nov 2021 13:47:57 +0000 (14:47 +0100)]
mlmmj-sub: fix test when default text are not installed
Baptiste Daroussin [Thu, 4 Nov 2021 13:34:44 +0000 (14:34 +0100)]
mlmmj-unsub: eliminate useless memory duplication
Baptiste Daroussin [Thu, 4 Nov 2021 13:12:26 +0000 (14:12 +0100)]
genmsgid: use asprintf instead of snprintf + strdup
Baptiste Daroussin [Thu, 4 Nov 2021 11:09:10 +0000 (12:09 +0100)]
gendatestr: use strftime directly
Baptiste Daroussin [Thu, 4 Nov 2021 10:48:58 +0000 (11:48 +0100)]
testsuite: simple test for text formatting
Baptiste Daroussin [Wed, 3 Nov 2021 13:54:00 +0000 (14:54 +0100)]
text: point the test to the bundled location of the text files
Baptiste Daroussin [Wed, 3 Nov 2021 13:43:07 +0000 (14:43 +0100)]
text: use file descriptors when possible to avoid manipulating memory
Baptiste Daroussin [Wed, 3 Nov 2021 13:42:30 +0000 (14:42 +0100)]
text: add a very simple test to ensure open_text works
Baptiste Daroussin [Wed, 3 Nov 2021 10:54:27 +0000 (11:54 +0100)]
delimiter: now parsing delimiter is handled directly withing mlmmj_list
Baptiste Daroussin [Wed, 3 Nov 2021 10:53:27 +0000 (11:53 +0100)]
statctrl: convert to stdbool
Baptiste Daroussin [Wed, 3 Nov 2021 10:51:10 +0000 (11:51 +0100)]
testsuite: add tests for statctrl and mlmmj_list*
Baptiste Daroussin [Wed, 3 Nov 2021 10:48:39 +0000 (11:48 +0100)]
mlmmj_list: cleanup error handling
Baptiste Daroussin [Wed, 3 Nov 2021 08:12:14 +0000 (09:12 +0100)]
send_digest: directly dprint instead of allocating a temporary string
Baptiste Daroussin [Wed, 3 Nov 2021 08:11:10 +0000 (09:11 +0100)]
send_digest: prefer openat
Baptiste Daroussin [Wed, 3 Nov 2021 08:08:30 +0000 (09:08 +0100)]
send_digest: convert to mlmmj_list
While here use at function to open archives directly
Baptiste Daroussin [Wed, 3 Nov 2021 07:58:42 +0000 (08:58 +0100)]
more use helpers
Baptiste Daroussin [Tue, 2 Nov 2021 17:25:01 +0000 (18:25 +0100)]
controls: add a helper for conversion to long
Baptiste Daroussin [Tue, 2 Nov 2021 17:24:35 +0000 (18:24 +0100)]
clang: fix errors reported by clang
Baptiste Daroussin [Tue, 2 Nov 2021 17:16:28 +0000 (18:16 +0100)]
cleanup: use the ctrltimet helper
Baptiste Daroussin [Tue, 2 Nov 2021 17:13:45 +0000 (18:13 +0100)]
controls: add a helper to convert control to timet safely
Baptiste Daroussin [Tue, 2 Nov 2021 17:07:38 +0000 (18:07 +0100)]
mlmmj-maintd: convert delolder to file descriptor manipulation
Baptiste Daroussin [Tue, 2 Nov 2021 16:59:19 +0000 (17:59 +0100)]
concatstr -> myasprintf
Baptiste Daroussin [Tue, 2 Nov 2021 16:50:59 +0000 (17:50 +0100)]
mlmmj-maintd: simplify the code after the conversion to at functions
Baptiste Daroussin [Tue, 2 Nov 2021 16:36:40 +0000 (17:36 +0100)]
cleanup: eliminate some concatstr for file descriptor manipulation
Baptiste Daroussin [Tue, 2 Nov 2021 14:26:59 +0000 (15:26 +0100)]
cleanup: use dprintf earlier to avoid temporary memory allocation
Baptiste Daroussin [Tue, 2 Nov 2021 14:26:40 +0000 (15:26 +0100)]
cleanup: replace concatstr with asprintf
Baptiste Daroussin [Tue, 2 Nov 2021 14:22:14 +0000 (15:22 +0100)]
cleanup: use dprintf earlier to avoid temporary memory allocation
Baptiste Daroussin [Tue, 2 Nov 2021 14:17:05 +0000 (15:17 +0100)]
cleanup: replace concatstr with asprintf
Baptiste Daroussin [Tue, 2 Nov 2021 14:13:06 +0000 (15:13 +0100)]
cleanup: eliminate some concatstr for file descriptor manipulation
Baptiste Daroussin [Tue, 2 Nov 2021 13:59:24 +0000 (14:59 +0100)]
open_text*: convert to struct mlmmj_list
Baptiste Daroussin [Tue, 2 Nov 2021 13:52:16 +0000 (14:52 +0100)]
cleanup: replace some concatstr with standard asprintf
Baptiste Daroussin [Tue, 2 Nov 2021 13:42:55 +0000 (14:42 +0100)]
cleanup: replace strtol with safe function when possible
Baptiste Daroussin [Wed, 3 Nov 2021 09:14:25 +0000 (10:14 +0100)]
testsuite: add missing components for the suite to be able to run
Baptiste Daroussin [Tue, 2 Nov 2021 13:28:18 +0000 (14:28 +0100)]
cleanup: rewrite index file handling
Use openat to avoid memory manipulation
Use a safe strtoim function to convert from int
Baptiste Daroussin [Tue, 2 Nov 2021 11:18:21 +0000 (12:18 +0100)]
random: use arc4random on systems supporting it
Baptiste Daroussin [Tue, 2 Nov 2021 11:10:42 +0000 (12:10 +0100)]
cleanup: promote writen as a static function only for dumpfd2fd
Baptiste Daroussin [Tue, 2 Nov 2021 10:57:52 +0000 (11:57 +0100)]
cleanup: replace most writen with dprintf
Baptiste Daroussin [Thu, 28 Oct 2021 16:21:07 +0000 (18:21 +0200)]
mlmmj: get rid of getlistaddr code
Baptiste Daroussin [Thu, 28 Oct 2021 16:08:26 +0000 (18:08 +0200)]
control functions: refactor them and group them
Refactor the function to limit code duplication, and use modern C
function: getline, getdelim, etc.
Baptiste Daroussin [Thu, 28 Oct 2021 15:10:37 +0000 (17:10 +0200)]
mlmm-unsub: Add basic test suite
Baptiste Daroussin [Thu, 28 Oct 2021 15:10:00 +0000 (17:10 +0200)]
mlmmj-unsub: fix an issue when the reported subdir of pointer is NULL
Baptiste Daroussin [Thu, 28 Oct 2021 13:00:18 +0000 (15:00 +0200)]
sub/unsub: factorize the change uid code
Baptiste Daroussin [Thu, 28 Oct 2021 12:46:15 +0000 (14:46 +0200)]
subscription: use filedescriptors to check for subscription membership
Baptiste Daroussin [Thu, 28 Oct 2021 12:25:53 +0000 (14:25 +0200)]
mlmmj-*sub: eliminate most concatstr in favor of standard C function
Baptiste Daroussin [Thu, 28 Oct 2021 12:00:34 +0000 (14:00 +0200)]
myasprintf: mark as printf like for compilation checks
Baptiste Daroussin [Thu, 28 Oct 2021 11:53:27 +0000 (13:53 +0200)]
mlmmj-unsub: convert to use filedescriptors
While here, use O_EXLOCK to obtain the lock
Baptiste Daroussin [Thu, 28 Oct 2021 09:57:19 +0000 (11:57 +0200)]
mlmmj-sub: share code between sub and unsub
Baptiste Daroussin [Thu, 28 Oct 2021 09:56:59 +0000 (11:56 +0200)]
subscribers: add a function to factorize code between sub and unsub
Baptiste Daroussin [Thu, 28 Oct 2021 09:35:43 +0000 (11:35 +0200)]
mlmmj-sub: use modern C
Use O_APPEND instead of lseek,
Use dprintf instead of writen
Baptiste Daroussin [Thu, 28 Oct 2021 09:25:46 +0000 (11:25 +0200)]
mlmmj-sub: add testcase about appending a new subscriber