bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
f5d1cfca5073424be87c85e40e893cea49257b75 |
|
11-Dec-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib: var-expand - handle \{ and \} correctly
Do not treat these as embedded braces |
20a8a12657a29df1fb397ae2892856f3726bb652 |
|
11-Dec-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib: Support nested keys in var_get_key_range_full
Fixes problems with %{if...}
failed: if: requires four or five parameters, got 1 |
857a9e1f1cf3a2241403bfb201421bb1a66038b1 |
|
07-Dec-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib: var-expand - Add table size and merge utility functions |
b3e71425659780a58cba2f1d84eceef5b4616762 |
|
24-Jul-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
var-expand: Add support for conditionals
%{if;value-a,op,value-b:true-value:false-value} |
75a6a96fd561e133189e232cfa52ce57121a6d49 |
|
31-Mar-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib: Fix strcasecmp mistake in var-expand |
5c00a22fcca7f68479a8768fec7ace7f679b344d |
|
23-Mar-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib: Add extension support for var-expand
This enables loading new var-expand features
using plugins. |
0306a3100b0fd42f00004bb728e2a9039e0a4846 |
|
23-Mar-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib: Check var_expand_long return value correctly |
2c2bcffb5d26ebf0c7cc0c6586feda4ce7967e98 |
|
23-Mar-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib: Fix whitespace in var-expand.c |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
efe78d3ba24fc866af1c79b9223dc0809ba26cad |
|
24-Dec-2016 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
global: Replaced all instances of memset(p, 0, sizeof(*p)) with the new i_zero() macro.
Used the following script:
C_FILES=`git ls-files *.c`
H_FILES=`git ls-files *.h`
for F in "$C_FILES $H_FILES"; do
echo "$F"
perl -p -i -e 's/safe_memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero_safe(&$1)/g' $F
perl -p -i -e 's/safe_memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero_safe($1)/g' $F
perl -p -i -e 's/memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero(&$1)/g' $F
perl -p -i -e 's/memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero($1)/g' $F
done |
2ac5f36aa7c2e7a07ba8815d43a6d7483f62e74c |
|
16-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Change string position/length from unsigned int to size_t
Mainly to avoid truncating >4GB strings, which might potentially cause
some security holes. Normally there are other limits, which prevent such
excessive strings from being created in the first place.
I'm sure this didn't find everything. Maybe everything could be found with
compiler warnings. -Wconversion kind of does it, but it gives way too many
unnecessary warnings.
These were mainly found with:
grep " = strlen"
egrep "unsigned int.*(size|len)" |
7c4af1fdcb1aa5ece9fd6c8a893789666ae29dbb |
|
02-Nov-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib: Add generic hashing support to var-expand
Enables use of
%{H;rounds=<rounds>,truncate=<bits>,salt=<salt>:field}
syntax in any variable expansion. H is any supported
hash algorithm or pkcs5 for PKCS#5 PBKDF2 using SHA256. |
e0dddec702cceb77536a659c71b1973a71c09192 |
|
02-Nov-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib: Do not consume {} inside %{} |
bcf1cf2afb9692b0db555e6ecf662a2fbd19793d |
|
02-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: API change - var_expand_func_table.func() can now return error.
None of the existing functions were changed to return errors (yet). |
0f5dc4da3982053036be65190e44bf28a67b1ca2 |
|
02-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: API change - var_expand*() now returns error string.
This allows callers to fail properly if the format string is invalid. |
7c3a801caa8daa9a7f57e61b4d1e63f02a51e7e4 |
|
02-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: var_expand() code cleanup - Moved short %v expansion to its own function. |
79fe1b28df44ba22b230326bee895583c1df5a28 |
|
01-Sep-2016 |
Stephan Bosch <stephan@dovecot.fi> |
lib: var-expand: Removed var_expand_table_build().
Replaced it with explicit table construction at the one place it was used.
Clang -Wvargargs complained about passing a char argument to va_start(). |
e539ff946adcbc68793adb6d9d84621dce3bf46b |
|
02-Aug-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: var_has_key() properly ignores key=='\0' now. |
7a556ac46f1f51ee29bc8aa92b5ffe05b004a8b8 |
|
02-Aug-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: var_get_key() didn't handle %{long_variables} correctly
This also fixes var_has_key()'s long_key handling. |
23bdbb7b1831785c6ba6df190f6369da882d2b9d |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Require comparisons to be strict boolean expressions
* No implicit integer -> boolean or pointer -> boolean conversions
* !expr can be used only if expr is boolean type
These were checked with a patched clang. It found various actual bugs,
which were fixed by the previous commits. |
0175d37a5ae5a4d146ca41b684bd38d9b03683cb |
|
30-May-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
Remove t_malloc in favour of t_malloc_no0
Using either t_malloc_no0 or t_malloc0 makes it clear whether the
allocated memory is zeroed or not. |
800bb686016278426c18f0d1529cf359ecb5f950 |
|
23-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: var_expand() now expands %{nonexistent} to UNSUPPORTED_VARIABLE_nonexistent
Earlier it was expanded to "nonexistent}", which looked more like a bug.
This change hopefully makes it clear enough to understand when a variable isn't
supported. |
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3 |
|
12-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: freshen copyright
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/' |
814bf67459ad405a157af0b8940602024d7fadfe |
|
23-Sep-2015 |
Teemu Huovila <teemu.huovila@dovecot.fi> |
Remove now-unnecessary direct stdlib.h #includes. |
e48f289d2e5b2546a2c5dcc90f7ab624cc58cca2 |
|
29-Aug-2015 |
Stephan Bosch <stephan@rename-it.nl> |
Removed all invocations of strtoll() and friends. |
654b46078129456bda90c5eb18014fb2858c302e |
|
28-Aug-2015 |
Timo Sirainen <tss@iki.fi> |
lib: If var_expand_with_funcs() function returns NULL, it should be treated the same as ""
The previous behavior was to return "%{foo:bar}" as "foo:bar}". |
7cb128dc4cae2a03a742f63ba7afee23c78e3af0 |
|
05-Jan-2015 |
Phil Carmody <phil@dovecot.fi> |
global: freshen copyright
Robomatically:
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-4]/$1-2015/g;s/ (201[0-4]) Dovecot/ $1-2015 Dovecot/'
Happy 2015 everyone!
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
6eb191b58bc8553a516bd1c9b0eccaa696d0f41f |
|
17-Mar-2014 |
Timo Sirainen <tss@iki.fi> |
liblib: Added negative %variable lengths to count backwards from the end of the value.
For example %0.-2 for "12345" returns "123".
Patch by Norbert Weinhold / Open-Xchange. |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
5ef75c870a01703df34ce44ab9a5324b2beabc78 |
|
06-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
var_expand(): Fixed initializing variable to %N |
9217571849eb99d1003e150e3165aedf06b07521 |
|
05-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
var_expand*(): Fixed %N to work the same with little and big endian CPUs.
Also use 64bit integer to do the MOD from, which should give somewhat better
value distribution than with 32bit. |
e95bc848767afa2e52cb988a6d3f5e5cc5933885 |
|
30-May-2013 |
Timo Sirainen <tss@iki.fi> |
var_expand(): Added %N, which is the same as %H except based on MD5.
This gives a better distribution of values than %H. |
5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294 |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Oops :) Update copyrights to 2013 without breaking all .c files. |
cca4ba2a504d70a9fe9fee37f8433997359de52c |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2013. |
3fc62f5a9b1646f0e385f0708c652fbd8b944ba9 |
|
07-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
var_expand*(): Don't use a data stack frame when expanding long %{variables}
This avoids potential crashes if the destination string is also allocated
from data stack and requires growing. |
4ee00532a265bdfb38539d811fcd12d51210ac35 |
|
19-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Array API changed: ARRAY_DEFINE(name, type) -> ARRAY(type) name
Easy way to update your existing code:
perl -i -pe 's:ARRAY_DEFINE\(([^,]+), *([^)]+)\);:ARRAY($2) $1;:' **/*.[ch] |
31a574fda352ef4f71dbff9c30e15e4744e132c0 |
|
25-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Added array_append_zero() to write a zero-filled record to an array.
Replaced (void)array_append_space() calls with it. |
b58cb4b59ccd78ee1c3e0df0bc13c300d1bec380 |
|
14-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
liblib: Added var_get_key_range() |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
93794594bc682b12353d2d0db08d91ae3e7c56c6 |
|
02-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
var_expand*(): Allow table to be NULL (when using only func_table). |
e130dc7c712a10215b1e6be56403bbb934826251 |
|
02-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
liblib: Added var_expand_with_funcs() to expand variables with function callbacks. |
d758298b3b6f1ebcd494392c0f20b0e119a9e85e |
|
09-Dec-2011 |
Timo Sirainen <tss@iki.fi> |
var_expand(): Added %{uid} and %{gid} variables. |
2e37d45867d081db150ab78dad303b9077aea24f |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
183bea41fa640dc8117f3eb45ff935cd81377a84 |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
771178a5c5285aa596723591271c8936c4007f1b |
|
05-Apr-2010 |
Timo Sirainen <tss@iki.fi> |
var_has_key(): Small code cleanup.
--HG--
branch : HEAD |
e59faf65ce864fe95dc00f5d52b8323cdbd0608a |
|
25-Jan-2010 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2010.
--HG--
branch : HEAD |
927d3977d5598f12ae18d4fa3f22b9e913f7dd46 |
|
23-Dec-2009 |
Timo Sirainen <tss@iki.fi> |
var_expand(): Added support for built-in host, pid and env:* variables.
--HG--
branch : HEAD |
45312f52ff3a3d4c137447be4c7556500c2f8bf2 |
|
06-Jan-2009 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2009.
--HG--
branch : HEAD |
f77ffa31038d46ca9c6d24d93e3d76c9aa8d4d0c |
|
13-Dec-2008 |
Timo Sirainen <tss@iki.fi> |
var_expand(): Added support for long %{variable} names.
--HG--
branch : HEAD |
5daf9fa081859b99c5082b680f3f8a70b82a76f0 |
|
25-Oct-2008 |
Timo Sirainen <tss@iki.fi> |
Added var_has_key().
--HG--
branch : HEAD |
546d3609e0811a147269ee9979eb90649445f5ac |
|
15-May-2008 |
Timo Sirainen <tss@iki.fi> |
Added %T = trim modifier.
--HG--
branch : HEAD |
76b43e4417bab52e913da39b5f5bc2a130d3f149 |
|
01-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2008.
--HG--
branch : HEAD |
89a126810703c666309310d0f3189e9834d70b5b |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Replaced my Copyright notices. The year range always ends with 2007 now.
My name was replaced with "Dovecot authors". In many cases I didn't really
even own the copyright, so this is more correct.
--HG--
branch : HEAD |
43d32cbe60fdaef2699d99f1ca259053e9350411 |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Renamed __attr_*__ to ATTR_*. Renamed __attrs_used__ to ATTRS_DEFINED.
--HG--
branch : HEAD |
3e859421cc59d28d4ba99f32830e3d0531334813 |
|
31-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
Added var_expand_table_build()
--HG--
branch : HEAD |
d35364f4d7d139b4150d290e14717e10f1ede4cd |
|
12-Nov-2006 |
Timo Sirainen <tss@iki.fi> |
Fixed zero padding handling and documented it. %0.1n shouldn't enable it,
and it really shouldn't stay for the next %variable. -sign also shouldn't
stay for the next variable.
--HG--
branch : HEAD |
28a57cc7b6f29cc55a4a586c80902b21daf5d55b |
|
15-Oct-2006 |
Timo Sirainen <tss@iki.fi> |
Added %D modified to return "sub.domain.org" as "sub,dc=domain,dc=org" (for
LDAP queries). Patch by Andrey Panin.
--HG--
branch : HEAD |
a40649829bce4c8de6210a2cb4a4b4cf5bb40da8 |
|
10-Aug-2006 |
Timo Sirainen <tss@iki.fi> |
Negative offsets count from the end of the string. Patch by Johannes Berg.
--HG--
branch : HEAD |
1036d2db2b718bdc5b10f0773dd01d62638e9ba9 |
|
12-Apr-2006 |
Timo Sirainen <tss@iki.fi> |
%M modifier returns string's MD5 sum. Patch by Ben Winslow
--HG--
branch : HEAD |
cd700cc7be045389dd1c948b2372b30ee99c5795 |
|
12-Apr-2006 |
Timo Sirainen <tss@iki.fi> |
%U modifier was actually lowercasing the string. Patch by Ben Winslow
--HG--
branch : HEAD |
6ef7e31619edfaa17ed044b45861d106a86191ef |
|
13-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Added "bool" type and changed all ints that were used as booleans to bool.
--HG--
branch : HEAD |
8e0f89885f2ce60961da9ae2d96d71c7109e6032 |
|
11-Sep-2005 |
Timo Sirainen <tss@iki.fi> |
Added 'R' reverse modifier.
--HG--
branch : HEAD |
869b0fa6ef7fc0326c9f75ae449e5a9f97a796e2 |
|
11-Sep-2005 |
Timo Sirainen <tss@iki.fi> |
Fix to hash modifier handling
--HG--
branch : HEAD |
bb979386852c7689dc66c0fce03319382f66d501 |
|
01-Sep-2005 |
Timo Sirainen <tss@iki.fi> |
Added 'H' hash modifier.
--HG--
branch : HEAD |
7cd08c67fde5371f662d8c95b30c341741950420 |
|
15-Dec-2004 |
Timo Sirainen <tss@iki.fi> |
Added support for multiple modifiers. Added %X = hex modifier. Prefixing
width value with '0' adds '0'-padding to the string if it's smaller than
width.
--HG--
branch : HEAD |
ee3cb11d230d549367a1213aefe4598345796256 |
|
15-Dec-2004 |
Timo Sirainen <tss@iki.fi> |
Auth cache key was built wrong if any modifiers were used for %vars.
Added var_get_key() function which skips over any modifiers and returns the
actual key.
--HG--
branch : HEAD |
55de1a4d11765e795ec96fddd4858b188be4b892 |
|
26-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Added support for %offset.width format in variables.
--HG--
branch : HEAD |
3b94ff5951db4d4eddb7a80ed4e3f61207202635 |
|
25-May-2004 |
Timo Sirainen <tss@iki.fi> |
Fixed var_expand() to take a table of variables rather than a few predefined
ones. Added support for modifiers.
--HG--
branch : HEAD |
4cb2599c5cdf27362a66ac475ce295409c093c92 |
|
27-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Added var_expand()
--HG--
branch : HEAD |