Share

vpopmail - virtual domains for qmail

Tracker: Patches

5 [in 5.4.18] Avoid a vpalias race condition - ID: 1573282
Last Update: Settings changed ( tomcollins )

Here's a patch, from the FreeBSD port of 5.4.17, to
avoid a race condition in scanning a domain directory
for .qmail-style aliases. In the current code, there is
a time of check vs. time of use race condition: the
valias_select_names() routine does an opendir / readdir
/ closedir loop, counts the files, allocates memory,
and then does another opendir / readdir / closedir
loop. If anybody should create a new alias in the
(admittedly small) interval between the two loops, bad
things might happen. This patch does everything in a
single loop, dynamically realloc(3)'ing the aliases
buffer as necessary.

If the patch does not come through for any reason, it
is also available at
http://people.freebsd.org/~roam/patches/vpopmail/vpalias-dynalloc-names.pat
ch


Peter Pentchev ( roamer ) - 2006-10-08 18:36

5

Closed

None

Rick Widmer

None

None

Public


Comment ( 1 )

Date: 2006-11-24 02:43
Sender: rwidmerProject Admin


Added to 5.4.18.


Attached File ( 1 )

Filename Description Download
vpalias-dynalloc-names.patch Dynamically allocate memory for listing the .qmail-style aliases Download

Changes ( 5 )

Field Old Value Date By
summary Avoid a vpalias race condition 2006-11-24 16:00 tomcollins
status_id Open 2006-11-24 02:43 rwidmer
assigned_to nobody 2006-11-24 02:43 rwidmer
close_date - 2006-11-24 02:43 rwidmer
File Added 197186: vpalias-dynalloc-names.patch 2006-10-08 18:36 roamer