]> git.ipfire.org Git - thirdparty/mlmmj.git/log
thirdparty/mlmmj.git
2 years agoportability: fix a portable difference between linux and freebsd
Baptiste Daroussin [Wed, 18 Jan 2023 10:20:53 +0000 (11:20 +0100)] 
portability: fix a portable difference between linux and freebsd

on linux writing to the first entry of a pipe returns EBADF

2 years agorework dumpfd2fd to make fallback more easily testable
Baptiste Daroussin [Tue, 10 Jan 2023 12:52:19 +0000 (13:52 +0100)] 
rework dumpfd2fd to make fallback more easily testable

shm are not easy to use in a portable manner

2 years agoMake --enable-coverage compatible with gcc
Baptiste Daroussin [Tue, 10 Jan 2023 08:24:58 +0000 (09:24 +0100)] 
Make --enable-coverage compatible with gcc

2 years agoSplit dump2fd unit test to ease debugging
Baptiste Daroussin [Tue, 10 Jan 2023 07:54:01 +0000 (08:54 +0100)] 
Split dump2fd unit test to ease debugging

2 years agogetline: portability issue.
Baptiste Daroussin [Mon, 9 Jan 2023 14:58:59 +0000 (15:58 +0100)] 
getline: portability issue.

If getline() fails always make sure the buffer is freeed and set to NULL

This fixes an issue with getlistdelim().

2 years agomemory: plug more memory leaks
Baptiste Daroussin [Mon, 9 Jan 2023 14:25:09 +0000 (15:25 +0100)] 
memory: plug more memory leaks

2 years agomlmmj-maintd: plug memory leak
Baptiste Daroussin [Mon, 9 Jan 2023 13:51:26 +0000 (14:51 +0100)] 
mlmmj-maintd: plug memory leak

2 years agoexec_and_wait: plug memory leak
Baptiste Daroussin [Mon, 9 Jan 2023 13:48:36 +0000 (14:48 +0100)] 
exec_and_wait: plug memory leak

2 years agomlmmj-bounce: fix using the wrong variable
Baptiste Daroussin [Mon, 9 Jan 2023 13:45:41 +0000 (14:45 +0100)] 
mlmmj-bounce: fix using the wrong variable

2 years agoOnly linux shm requires -lrt
Baptiste Daroussin [Mon, 9 Jan 2023 13:40:42 +0000 (14:40 +0100)] 
Only linux shm requires -lrt

2 years agoFix left shifting issues noticed by sanitizer
Baptiste Daroussin [Mon, 9 Jan 2023 13:40:16 +0000 (14:40 +0100)] 
Fix left shifting issues noticed by sanitizer

2 years agomemory: plug leak
Baptiste Daroussin [Mon, 9 Jan 2023 13:26:48 +0000 (14:26 +0100)] 
memory: plug leak

2 years agomlmmj-bounce: do now lowercase twice the email address
Baptiste Daroussin [Mon, 9 Jan 2023 13:18:12 +0000 (14:18 +0100)] 
mlmmj-bounce: do now lowercase twice the email address

2 years agomemory: fix user after free
Baptiste Daroussin [Mon, 9 Jan 2023 09:02:23 +0000 (10:02 +0100)] 
memory: fix user after free

2 years agoAdd switch to enable building with ASAN and UBSAN
Baptiste Daroussin [Mon, 9 Jan 2023 09:01:53 +0000 (10:01 +0100)] 
Add switch to enable building with ASAN and UBSAN

2 years agoportability: avoid using fdclose() which does not exists on linux
Baptiste Daroussin [Mon, 9 Jan 2023 08:31:38 +0000 (09:31 +0100)] 
portability: avoid using fdclose() which does not exists on linux

2 years agoportability: fix again sys/limits.h -> limits.h
Baptiste Daroussin [Mon, 9 Jan 2023 08:25:20 +0000 (09:25 +0100)] 
portability: fix again sys/limits.h -> limits.h

2 years agoEliminate some use of concatstr
Baptiste Daroussin [Thu, 5 Jan 2023 14:49:16 +0000 (15:49 +0100)] 
Eliminate some use of concatstr

2 years agolog_oper: fix regression and add unit test
Baptiste Daroussin [Thu, 5 Jan 2023 14:09:05 +0000 (15:09 +0100)] 
log_oper: fix regression and add unit test

2 years agolog_oper: rework
Baptiste Daroussin [Thu, 5 Jan 2023 13:35:50 +0000 (14:35 +0100)] 
log_oper: rework

use file descriptor and do not use an intermediary variable before
writting the logs, as a side effect it drop the limitation of 256 chars
per lines

2 years agoRemove dead code
Baptiste Daroussin [Thu, 5 Jan 2023 12:02:55 +0000 (13:02 +0100)] 
Remove dead code

2 years agoinindexfile: small cleanups
Baptiste Daroussin [Thu, 5 Jan 2023 12:02:16 +0000 (13:02 +0100)] 
inindexfile: small cleanups

2 years agoinit_sockfd: remove MLMMJ_TESTING, we now have a testsuite for that
Baptiste Daroussin [Thu, 5 Jan 2023 11:59:19 +0000 (12:59 +0100)] 
init_sockfd: remove MLMMJ_TESTING, we now have a testsuite for that

2 years agoAdd testsuite for controls and incindexfile
Baptiste Daroussin [Thu, 5 Jan 2023 11:57:33 +0000 (12:57 +0100)] 
Add testsuite for controls and incindexfile

2 years agodumpfd2fd: test more edge cases
Baptiste Daroussin [Thu, 5 Jan 2023 10:40:14 +0000 (11:40 +0100)] 
dumpfd2fd: test more edge cases

2 years agowriten: eliminate code which is not used anymore
Baptiste Daroussin [Thu, 5 Jan 2023 09:49:47 +0000 (10:49 +0100)] 
writen: eliminate code which is not used anymore

2 years agodumpfd2fd: use copy_file_range if available (add testsuite for it)
Baptiste Daroussin [Thu, 5 Jan 2023 09:44:34 +0000 (10:44 +0100)] 
dumpfd2fd: use copy_file_range if available (add testsuite for it)

2 years agorandom-int: really use arc4random_uniform
Baptiste Daroussin [Thu, 5 Jan 2023 08:43:44 +0000 (09:43 +0100)] 
random-int: really use arc4random_uniform

2 years agomlmmj-list: simple modernization of the code no change expected
Baptiste Daroussin [Thu, 5 Jan 2023 08:38:52 +0000 (09:38 +0100)] 
mlmmj-list: simple modernization of the code no change expected

2 years agomlmmj-list: simplify code replacing mmap with getline();
Baptiste Daroussin [Thu, 5 Jan 2023 08:30:35 +0000 (09:30 +0100)] 
mlmmj-list: simplify code replacing mmap with getline();

2 years agomlmmj-list: constify variables
Baptiste Daroussin [Thu, 5 Jan 2023 08:25:13 +0000 (09:25 +0100)] 
mlmmj-list: constify variables

2 years agomlmmj-list: use file descriptors where possible
Baptiste Daroussin [Thu, 5 Jan 2023 08:24:09 +0000 (09:24 +0100)] 
mlmmj-list: use file descriptors where possible

2 years agomlmmj-list: add simple testsuite
Baptiste Daroussin [Thu, 5 Jan 2023 08:03:14 +0000 (09:03 +0100)] 
mlmmj-list: add simple testsuite

2 years agoctrlvalues: rework to use fd and getline()
Baptiste Daroussin [Wed, 4 Jan 2023 15:15:01 +0000 (16:15 +0100)] 
ctrlvalues: rework to use fd and getline()

This simplifies the code and reduce the memory allocation

2 years agoFix build with coverage for contrib code
Baptiste Daroussin [Tue, 3 Jan 2023 14:02:54 +0000 (15:02 +0100)] 
Fix build with coverage for contrib code

2 years agoReplace struct strlist with strlist based on on tllist
Baptiste Daroussin [Tue, 3 Jan 2023 13:48:26 +0000 (14:48 +0100)] 
Replace struct strlist with strlist based on on tllist

2 years agoReplace custom struct email_contianer with generic strlist
Baptiste Daroussin [Tue, 3 Jan 2023 11:13:10 +0000 (12:13 +0100)] 
Replace custom struct email_contianer with generic strlist

2 years agoImport tllist, this will be used as a general purpose list mechanism
Baptiste Daroussin [Tue, 3 Jan 2023 09:25:10 +0000 (10:25 +0100)] 
Import tllist, this will be used as a general purpose list mechanism

2 years agoctrlvalue: Cleanup unused headers
Baptiste Daroussin [Wed, 28 Dec 2022 19:09:41 +0000 (20:09 +0100)] 
ctrlvalue: Cleanup unused headers

2 years agoRename getaddrsfromfd into getaddrsfromfile to reflect code change
Baptiste Daroussin [Wed, 28 Dec 2022 16:49:37 +0000 (17:49 +0100)] 
Rename getaddrsfromfd into getaddrsfromfile to reflect code change

2 years agogetaddrsfromfd: complete the test
Baptiste Daroussin [Wed, 28 Dec 2022 16:43:32 +0000 (17:43 +0100)] 
getaddrsfromfd: complete the test

Add a test case for empty lines
Add a test case for 0 max number of entries

2 years agogetaddrsfromfd: rewrite using getline
Baptiste Daroussin [Wed, 28 Dec 2022 16:40:46 +0000 (17:40 +0100)] 
getaddrsfromfd: rewrite using getline

It simplifies the code

2 years agogetaddrsfromfd: add a test suite
Baptiste Daroussin [Wed, 28 Dec 2022 16:15:55 +0000 (17:15 +0100)] 
getaddrsfromfd: add a test suite

2 years agoRewrite find_subscriber using getline(3) instead of mmap
Baptiste Daroussin [Wed, 28 Dec 2022 15:42:12 +0000 (16:42 +0100)] 
Rewrite find_subscriber using getline(3) instead of mmap

It simplifies greatly the code

2 years agois_subbed: only keep the filedescriptor aware version
Baptiste Daroussin [Wed, 28 Dec 2022 15:25:34 +0000 (16:25 +0100)] 
is_subbed: only keep the filedescriptor aware version

2 years agoAdd test suite for getlistdelim and getlistaddr
Baptiste Daroussin [Wed, 28 Dec 2022 15:14:50 +0000 (16:14 +0100)] 
Add test suite for getlistdelim and getlistaddr

2 years agoConvert textcontent and ctrlcontent to ctrlvalue
Baptiste Daroussin [Wed, 28 Dec 2022 13:51:51 +0000 (14:51 +0100)] 
Convert textcontent and ctrlcontent to ctrlvalue

2 years agogetlistdelim/getlistaddr: rewrite to make use of ctrlvalue()
Baptiste Daroussin [Wed, 28 Dec 2022 12:06:54 +0000 (13:06 +0100)] 
getlistdelim/getlistaddr: rewrite to make use of ctrlvalue()

2 years agostatctrl: ensure relative the ctrl file descriptor
Baptiste Daroussin [Wed, 28 Dec 2022 11:52:56 +0000 (12:52 +0100)] 
statctrl: ensure relative the ctrl file descriptor

2 years agoctrlvalue: use filedescriptor to access the content of the control directory
Baptiste Daroussin [Wed, 28 Dec 2022 11:24:44 +0000 (12:24 +0100)] 
ctrlvalue: use filedescriptor to access the content of the control directory

2 years agotohdr: to not use an intermediary variable to write the to header
Baptiste Daroussin [Wed, 28 Dec 2022 09:40:48 +0000 (10:40 +0100)] 
tohdr: to not use an intermediary variable to write the to header

2 years agoTests: add a test suite for the mail sending functions
Baptiste Daroussin [Wed, 28 Dec 2022 09:28:25 +0000 (10:28 +0100)] 
Tests: add a test suite for the mail sending functions

2 years agoIsolate functions to send email in order to be able to reuse them
Baptiste Daroussin [Tue, 27 Dec 2022 16:18:07 +0000 (17:18 +0100)] 
Isolate functions to send email in order to be able to reuse them

While here add a test function for do_bouncemail and fix an issue
which could allow to crash mlmmj-send.
Stop forking in do_bouncemail, it is not necessary

2 years ago100% testing on endsmtp
Baptiste Daroussin [Tue, 27 Dec 2022 14:49:30 +0000 (15:49 +0100)] 
100% testing on endsmtp

2 years agosmtp: add more test
Baptiste Daroussin [Tue, 27 Dec 2022 14:42:24 +0000 (15:42 +0100)] 
smtp: add more test

2 years agomlmmj-bounce: make sure mlmmj-bounce is never called directly
Baptiste Daroussin [Tue, 27 Dec 2022 13:29:25 +0000 (14:29 +0100)] 
mlmmj-bounce: make sure mlmmj-bounce is never called directly

2 years agofactorize the code to save the last bounced mail
Baptiste Daroussin [Tue, 27 Dec 2022 13:04:02 +0000 (14:04 +0100)] 
factorize the code to save the last bounced mail

2 years agomlmmj-send: allow to be run from absolute path
Baptiste Daroussin [Tue, 27 Dec 2022 11:37:37 +0000 (12:37 +0100)] 
mlmmj-send: allow to be run from absolute path

mlmmj-send does not call anymore any external program

2 years agomlmmj-send: use file descriptors when easily possible
Baptiste Daroussin [Tue, 27 Dec 2022 11:06:30 +0000 (12:06 +0100)] 
mlmmj-send: use file descriptors when easily possible

2 years agomlmmj-bounce: factorize code to make it reusable
Baptiste Daroussin [Tue, 27 Dec 2022 11:00:53 +0000 (12:00 +0100)] 
mlmmj-bounce: factorize code to make it reusable

Add test suite for mlmmj-bounce

2 years agoadd is_subbedat which deals with file descriptors
Baptiste Daroussin [Tue, 27 Dec 2022 09:13:58 +0000 (10:13 +0100)] 
add is_subbedat which deals with file descriptors

2 years agoRemove useless variable in test
Baptiste Daroussin [Tue, 27 Dec 2022 08:27:03 +0000 (09:27 +0100)] 
Remove useless variable in test

2 years agosmtp: add simple tests about initsmtp and endsmtp
Baptiste Daroussin [Tue, 27 Dec 2022 08:25:09 +0000 (09:25 +0100)] 
smtp: add simple tests about initsmtp and endsmtp

2 years agoIsolate smtp code to allow reuse and add test for it
Baptiste Daroussin [Mon, 26 Dec 2022 16:26:35 +0000 (17:26 +0100)] 
Isolate smtp code to allow reuse and add test for it

2 years agoFix use after free
Baptiste Daroussin [Mon, 26 Dec 2022 15:57:54 +0000 (16:57 +0100)] 
Fix use after free

2 years agoapply fgetlistdelim
Baptiste Daroussin [Mon, 26 Dec 2022 15:57:06 +0000 (16:57 +0100)] 
apply fgetlistdelim

2 years agofgetlistdelim, read the delimiter from control with fd
Baptiste Daroussin [Mon, 26 Dec 2022 15:53:27 +0000 (16:53 +0100)] 
fgetlistdelim, read the delimiter from control with fd

2 years agoapply fgetlistaddr
Baptiste Daroussin [Mon, 26 Dec 2022 15:43:32 +0000 (16:43 +0100)] 
apply fgetlistaddr

2 years agofgetlistaddr: add a filedescriptor only version of getlistaddr
Baptiste Daroussin [Mon, 26 Dec 2022 15:35:43 +0000 (16:35 +0100)] 
fgetlistaddr: add a filedescriptor only version of getlistaddr

which reduces memory manipulation

2 years agoSimplify genlistfqdn and add test for it
Baptiste Daroussin [Mon, 26 Dec 2022 15:29:50 +0000 (16:29 +0100)] 
Simplify genlistfqdn and add test for it

2 years agoFix genlistname regression and add a test
Baptiste Daroussin [Mon, 26 Dec 2022 15:26:53 +0000 (16:26 +0100)] 
Fix genlistname regression and add a test

2 years agomlmmj-unsub: use file descriptors where possible
Baptiste Daroussin [Mon, 26 Dec 2022 15:09:10 +0000 (16:09 +0100)] 
mlmmj-unsub: use file descriptors where possible

2 years agomlmmjsub: use open_subscriber_directory
Baptiste Daroussin [Mon, 26 Dec 2022 14:57:17 +0000 (15:57 +0100)] 
mlmmjsub: use open_subscriber_directory

2 years agomlmmj-sub: preopen listdir and control dir
Baptiste Daroussin [Mon, 26 Dec 2022 14:53:30 +0000 (15:53 +0100)] 
mlmmj-sub: preopen listdir and control dir

It allows to manipulate reduce the close/open dance on those file
descriptors and reduce memory manipulation

2 years agostatctrl: add a version of statctrl using file descriptors
Baptiste Daroussin [Mon, 26 Dec 2022 14:49:41 +0000 (15:49 +0100)] 
statctrl: add a version of statctrl using file descriptors

2 years agomlmmj-sub: stop manipulating memory when subscribing
Baptiste Daroussin [Mon, 26 Dec 2022 14:35:14 +0000 (15:35 +0100)] 
mlmmj-sub: stop manipulating memory when subscribing

prefer file descriptors

2 years agomlmmj-sub: stop forking mlmmj-unsub to unscrubscribe
Baptiste Daroussin [Mon, 26 Dec 2022 14:23:52 +0000 (15:23 +0100)] 
mlmmj-sub: stop forking mlmmj-unsub to unscrubscribe

2 years agomlmmj-sub: add tests to check unsubscribtion of extra subscriptions
Baptiste Daroussin [Mon, 26 Dec 2022 14:17:39 +0000 (15:17 +0100)] 
mlmmj-sub: add tests to check unsubscribtion of extra subscriptions

2 years agotests: remove useless lines
Baptiste Daroussin [Mon, 26 Dec 2022 14:10:27 +0000 (15:10 +0100)] 
tests: remove useless lines

2 years agomlmmj-sub: add a couple of test with -b
Baptiste Daroussin [Mon, 26 Dec 2022 14:08:45 +0000 (15:08 +0100)] 
mlmmj-sub: add a couple of test with -b

2 years agois_subbed: do not manipulate memory, prefer file descriptor
Baptiste Daroussin [Mon, 26 Dec 2022 13:56:23 +0000 (14:56 +0100)] 
is_subbed: do not manipulate memory, prefer file descriptor

2 years agolistcontrol: factorize subscribtion confirmation code
Baptiste Daroussin [Mon, 26 Dec 2022 13:32:57 +0000 (14:32 +0100)] 
listcontrol: factorize subscribtion confirmation code

2 years agostatctrl: fix typo
Baptiste Daroussin [Mon, 26 Dec 2022 13:16:36 +0000 (14:16 +0100)] 
statctrl: fix typo

2 years agostatctrl: convert to stdbool and eliminate the use of concatstr
Baptiste Daroussin [Mon, 26 Dec 2022 13:10:35 +0000 (14:10 +0100)] 
statctrl: convert to stdbool and eliminate the use of concatstr

2 years agomlmmj-sub: eliminate useless intermediary variable
Baptiste Daroussin [Mon, 26 Dec 2022 13:10:04 +0000 (14:10 +0100)] 
mlmmj-sub: eliminate useless intermediary variable

2 years agomlmmj-unsub: readd lines removed by accidents
Baptiste Daroussin [Mon, 26 Dec 2022 12:49:01 +0000 (13:49 +0100)] 
mlmmj-unsub: readd lines removed by accidents

2 years agotests: fix init_sock on linux
Baptiste Daroussin [Mon, 5 Dec 2022 13:04:22 +0000 (14:04 +0100)] 
tests: fix init_sock on linux

2 years agotests: split digests and skip test which cannot be run as root
Baptiste Daroussin [Mon, 5 Dec 2022 12:27:08 +0000 (13:27 +0100)] 
tests: split digests and skip test which cannot be run as root

2 years agotests: split mlmmj-maintd "basic" tests to ease maintenance
Baptiste Daroussin [Mon, 5 Dec 2022 12:21:03 +0000 (13:21 +0100)] 
tests: split mlmmj-maintd "basic" tests to ease maintenance

2 years agotests: skip tests that cannot be passed as root, when run as root
Baptiste Daroussin [Mon, 5 Dec 2022 09:52:28 +0000 (10:52 +0100)] 
tests: skip tests that cannot be passed as root, when run as root

2 years agotests: split too long mlmmj-maintd tests to ease debug
Baptiste Daroussin [Mon, 5 Dec 2022 09:48:10 +0000 (10:48 +0100)] 
tests: split too long mlmmj-maintd tests to ease debug

2 years agoChangeuid: only change uid if actually needed
Baptiste Daroussin [Mon, 5 Dec 2022 09:11:57 +0000 (10:11 +0100)] 
Changeuid: only change uid if actually needed

2 years agoconfigure.ac: remove useless checks
Baptiste Daroussin [Mon, 5 Dec 2022 08:29:12 +0000 (09:29 +0100)] 
configure.ac: remove useless checks

2 years agoRevert "web: remove perl and php frontend"
Baptiste Daroussin [Mon, 5 Dec 2022 08:13:05 +0000 (09:13 +0100)] 
Revert "web: remove perl and php frontend"

This reverts commit 15152c0f3087e6fbfeac616d44915a6edd033c9d.

Keep the contrib for now, we will do the cleanup later

2 years agoweb: remove perl and php frontend
Baptiste Daroussin [Fri, 2 Dec 2022 16:08:41 +0000 (17:08 +0100)] 
web: remove perl and php frontend

I have no intention to maintain them

2 years agocleanup: eliminate unused parameter
Baptiste Daroussin [Fri, 2 Dec 2022 15:55:47 +0000 (16:55 +0100)] 
cleanup: eliminate unused parameter

2 years agoRelease 1.4.0.a1 RELEASE_1_4_0a1
Baptiste Daroussin [Fri, 2 Dec 2022 14:09:27 +0000 (15:09 +0100)] 
Release 1.4.0.a1

2 years agoModernize automake
Baptiste Daroussin [Fri, 2 Dec 2022 14:19:20 +0000 (15:19 +0100)] 
Modernize automake

2 years agoincindexfile: fix typo
Baptiste Daroussin [Fri, 2 Dec 2022 12:56:01 +0000 (13:56 +0100)] 
incindexfile: fix typo

2 years agolocking: use a more portable mechanism
Baptiste Daroussin [Fri, 2 Dec 2022 12:55:17 +0000 (13:55 +0100)] 
locking: use a more portable mechanism