ab5c28d0976c4e89d503f1fe9b1568f9a125e176 |
|
05-Dec-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
auth: Fix 'Password mismatch' casing consistency |
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 |
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. |
0dffa25d211be541ee3c953b23566a1a990789df |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: unsigned int:1 -> bool:1
perl -i -pe 's/unsigned int ([^,:;]+):1;/bool $1:1;/' **/*.[ch] |
74674a53a72dab535c61f455b2246ef2797844ea |
|
11-Feb-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
auth: Moved cache_key from passdb_module to auth_passdb.
This is in preparation for the next changeset, which moves
default/override_fields also to auth_passdb. |
814bf67459ad405a157af0b8940602024d7fadfe |
|
23-Sep-2015 |
Teemu Huovila <teemu.huovila@dovecot.fi> |
Remove now-unnecessary direct stdlib.h #includes. |
38ceb710e2bc957a66a75c68957cb87746682a75 |
|
29-May-2015 |
Timo Sirainen <tss@iki.fi> |
auth: Added %{passdb:field} and %{userdb:field} variables
The field expands to either the passdb or userdb extra field.
You can also use %{passdb:field:defaultvalue} where if field doesn't exist,
it's expanded to defaultvalue. Note that an empty value means that the field
still exists and it's not expanded to defaultvalue. |
6135260095e1704ed6edff9d00bdfc043c11429c |
|
17-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
auth: Use special AUTH_SUBSYS_DB/MECH parameters as auth_request_log*() subsystem.
This avoids hardcoded strings all over the place and also allows assigning
the correct passdb/userdb name for log messages generated by generic
passdb/userdb code, which doesn't know exactly where it was called from. |
ed3c4faf5ddf559818e4a3f7efc0f53f97396227 |
|
22-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
auth: Use a common auth_request_log_unknown_user() for logging "unknown user" entries. |
91a58087aa77d102ede3960fe99f78afe42d09eb |
|
06-Aug-2013 |
Timo Sirainen <tss@iki.fi> |
net_ip2addr() changed to return "" instead of NULL on failure.
Pretty much everything in the code assumed that it would never fail, which
it normally doesn't except if the ip_addr was created for UNIX sockets. |
bdd36cfdba3ff66d25570a9ff568d69e1eb543cf |
|
03-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
Renamed network.[ch] to net.[ch].
The function prefixes already started with net_ instead of network_.
And icecap wants to use network.h for other purpose. :) |
3a7113e3e2dac0e333e1a3f62af7d682896f59c6 |
|
20-Jan-2012 |
Timo Sirainen <tss@iki.fi> |
auth: Make idle_kill work with auth worker processes. |
9261dbf0675204898c6557591c7aa376e23a52b2 |
|
07-Apr-2010 |
Timo Sirainen <tss@iki.fi> |
Started using str_to_*() functions instead of libc's ones.
--HG--
branch : HEAD |
9ed2951bd0bb1878a27437d7c00611b2baadd614 |
|
13-Mar-2010 |
Timo Sirainen <tss@iki.fi> |
auth: Initial support for per-protocol auth settings.
Currently the list of services is hard-coded. This should be changed so that
config lookup returns the service names.
--HG--
branch : HEAD |
849969f639a00eab26791db3cb1b66430420c0cd |
|
13-Mar-2010 |
Timo Sirainen <tss@iki.fi> |
auth: passdb/userdb backends no longer know about struct auth_passdb/auth_userdb.
--HG--
branch : HEAD |
1d22eaac93de41319918a1fc6de42bb302e25c1a |
|
13-Mar-2010 |
Timo Sirainen <tss@iki.fi> |
auth: auth_userdb and auth_passdb no longer has pointer to struct auth.
--HG--
branch : HEAD |
7bafda1813454621e03615e83d55bccfa7cc56bd |
|
04-Dec-2009 |
Timo Sirainen <tss@iki.fi> |
Removed MEMBER() macro. Require C99 style struct initializer.
--HG--
branch : HEAD |
4eefe9b81c6d282cf94bd8c1469fe69767496736 |
|
27-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
pam: Fixed compiler warning with BSDs.
--HG--
branch : HEAD |
08d6658a4e2ec8104cd1307f6baa75fdb07a24f8 |
|
05-May-2009 |
Mark Washenberger <none@none> |
Renamed headers to prevent collision if they were flattened on an install.
--HG--
branch : HEAD |
dc02ecaf500ed002d394e4297f528f172052545d |
|
06-Apr-2009 |
Timo Sirainen <tss@iki.fi> |
pam: Compiling fix.
--HG--
branch : HEAD |
eaad7add88d618f1a40120b6ca5e8f98819a1161 |
|
04-Feb-2009 |
Timo Sirainen <tss@iki.fi> |
auth_debug_passwords=yes: Log password for PAM lookups.
--HG--
branch : HEAD |
798cfe56c9871262770384da1239162b3800cce1 |
|
16-Dec-2008 |
Timo Sirainen <tss@iki.fi> |
Replaced auth_worker_max_request_count setting with passdb pam { args = max_requests=n }
--HG--
branch : HEAD |
dd93aba1901a457346990f49c54a738947dc7128 |
|
02-Dec-2008 |
Timo Sirainen <tss@iki.fi> |
Fail if trying to give unknown parameters to passdb/userdb.
Also changed error messages to be consistent.
--HG--
branch : HEAD |
08d3152eb3a72fe1a65563b16368f5ba313e81cf |
|
06-Oct-2008 |
Timo Sirainen <tss@iki.fi> |
Solaris: Compile fix for previous PAM changes.
--HG--
branch : HEAD |
5050d07c10dd5c6e22831c1bb8eeba1fe150ad2e |
|
05-Oct-2008 |
Timo Sirainen <tss@iki.fi> |
PAM: Attempt to give better error messages.
Detect missing /etc/pam.d/service file and log it as an error the first time
after startup. Don't return "unknown user" and "password mismatch" as errors
but informational messages.
--HG--
branch : HEAD |
d5abbb932a0a598f002da39a8b3326643b1b5efc |
|
24-Sep-2008 |
Timo Sirainen <tss@iki.fi> |
Separate "unknown passdb/userdb X" and "support for X not compiled in" error messages.
--HG--
branch : HEAD |
eddd9bf1a1369aea4a2715f6be1137da6d17d293 |
|
05-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Replaced t_push/t_pop calls with T_FRAME*() macros.
--HG--
branch : HEAD |
eb9e1428a31ff3abf7c3eaf7aafc95eede90e86b |
|
09-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Store cache_key via auth_cache_parse_key() which adds TABs between the
%variables, making it safer.
--HG--
branch : HEAD |
3040fc1feaae09b8d13618ab1b51cc12ddcd77d5 |
|
07-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
PAM lookups are now always done in auth worker processes.
--HG--
branch : HEAD |
a222472d5ab8b7452edd60de81889dbccaa194a4 |
|
07-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Make sure we don't crash if PAM message is NULL and debug is enabled.
--HG--
branch : HEAD |
ea74f721698b38bbec83fbe8d386b7443ff52f52 |
|
07-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Added failure_show_msg=yes parameter to PAM. If set, the first line of PAM
password query is shown to user if authentication fails. This is useful with
pam_otp.
--HG--
branch : HEAD |
7f11920a1b53f3b50f8d30b9072cae03d7312c0d |
|
06-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Code cleanups. Also if auth_debug is enabled, log PAM messages.
--HG--
branch : HEAD |
b5080cf636d4d741b4ba80ab1b809d67fbef1934 |
|
06-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Removed AUTH_PAM_USERPASS code, which was never used.
--HG--
branch : HEAD |
aa24e78b470836b9820fb3e05fb7f1c30d134252 |
|
04-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Crashfix if PAM returns a reply but the process doesn't die.
--HG--
branch : HEAD |
f3320355fd745b102d4ada491e21363729921e67 |
|
27-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
FIXME comment update
--HG--
branch : HEAD |
47105f1b61d75e6f0a236961af2f6a1e6101901a |
|
03-Apr-2007 |
Timo Sirainen <tss@iki.fi> |
Lowercase the PAM service name when calling with "args = *". Linux PAM did
this internally already, but at least BSD didn't.
--HG--
branch : HEAD |
871ec63cffdd0d7e4d0d85ac39f3806ea27bc8b2 |
|
03-Apr-2007 |
Timo Sirainen <tss@iki.fi> |
Set PAM_RUSER.
--HG--
branch : HEAD |
9502cd2fcd3206e0db68ebe68aa2b824e2552ee6 |
|
26-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
removed unneeded include
--HG--
branch : HEAD |
6c46568fae90840f82435be91d4364d23209cf70 |
|
10-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
PAM service name supports variables now.
--HG--
branch : HEAD |
00bde9ae9eab9e720462bf6ec9a4dd85e88c3bbf |
|
10-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
Added more debug logging.
--HG--
branch : HEAD |
b5e7d1588d2a7b2a4e9dd952c6804eb5abac8bc9 |
|
22-Feb-2007 |
Timo Sirainen <tss@iki.fi> |
PAM dead-child timeout function was called 1000 times too often.
--HG--
branch : HEAD |
c483a995bd24a3d37146d180b9f85213d103b6c7 |
|
12-Feb-2007 |
Timo Sirainen <tss@iki.fi> |
Added blocking=yes to PAM passdb to use auth workers instead of forking a
new process for each lookup.
--HG--
branch : HEAD |
df42bc02b7fc5c00be437716ad49d4d5ab0049cd |
|
12-Feb-2007 |
Timo Sirainen <tss@iki.fi> |
If PAM child process hasn't responded in two minutes, send KILL signal to
it.
--HG--
branch : HEAD |
2cfe9983ce7a6280636ee12beccc2e865111967b |
|
15-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Replaced void *context from a lot of callbacks with the actual context
type. Also added/fixed some context type checks.
--HG--
branch : HEAD |
af49a1e869826ea9d1ac8da13cc78df3ec62801d |
|
03-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Set default_pass_scheme so that cache_key works instead of just
assert-crashing.
--HG--
branch : HEAD |
35136dd2baf8dc30e4e754294ed81ff48e8c1e64 |
|
08-Nov-2006 |
Timo Sirainen <tss@iki.fi> |
Added auth_request_set_credentials() to modify credentials in passdb and
implemented it for SQL passdb. Added passdb_need_set_credentials boolean to
mechanisms to indicate that it's required (OTP will need it). Patch by
Andrey Panin.
--HG--
branch : HEAD |
cb7f2110910f560ac775caead01c16f537e620ee |
|
11-Aug-2006 |
Timo Sirainen <tss@iki.fi> |
Set SIGCHLD handler in init, not in preinit when lib_signals_init() hasn't
yet been called.
--HG--
branch : HEAD |
1e1ce4654c9ec4749bd8054416287b4a2ff568b9 |
|
10-Aug-2006 |
Timo Sirainen <tss@iki.fi> |
Use SIGCHLD handler to check for killed child processes instead of a timeout
loop.
--HG--
branch : HEAD |
86bea1f8bffc2d98196f8655eecea9174c4f458a |
|
16-Jun-2006 |
Timo Sirainen <tss@iki.fi> |
If password is expired, give "Password expired" error. Currently works only
with PAM. Also added "unknown user" PAM return value handling.
--HG--
branch : HEAD |
f153c0c2c4f52ecb93046bb33f5d951b6aac59fe |
|
15-Jun-2006 |
Timo Sirainen <tss@iki.fi> |
Set PAM_TTY.
--HG--
branch : HEAD |
314d2706554f606cf008f019d1bc03bcdd290f82 |
|
15-Jun-2006 |
Timo Sirainen <tss@iki.fi> |
Don't call pam_setcred() unless setcred=yes PAM passdb argument was given.
--HG--
branch : HEAD |
26fe1288175f3590edb7f2eb8ed9db6352cc2cec |
|
07-Feb-2006 |
Timo Sirainen <tss@iki.fi> |
Call io_remove() earlier.
--HG--
branch : HEAD |
c219ebd0dd861c68dfe84903191c48b75e5c85e9 |
|
05-Feb-2006 |
Timo Sirainen <tss@iki.fi> |
If error message from PAM was over ~500 bytes, we crashed. Probably never
happened. Also use PIPE_BUF instead of hardcoded 512 bytes.
--HG--
branch : HEAD |
d35be384f4977c5a2f81f676a0fca8c202b2b784 |
|
21-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Removed #ifdef PAM_RHOST, it should be everywhere
--HG--
branch : HEAD |
d5cebe7f98e63d4e2822863ef2faa4971e8b3a5d |
|
14-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
deinit, unref, destroy, close, free, etc. functions now take a pointer to
their data pointer, and set it to NULL. This makes double-frees less likely
to cause security holes.
--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 |
6d2eb530d3a5c424e3de21e60a4c689383b20779 |
|
13-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Compiler warning fix
--HG--
branch : HEAD |
98e41754c2f6cee6ab1fb07be207963bd38e85f3 |
|
13-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Check write()'s return value
--HG--
branch : HEAD |
714af786b95457703f620ff9e9e7618b5d426167 |
|
25-Dec-2005 |
Timo Sirainen <tss@iki.fi> |
PAM: Changed -session to session=yes to be more consistent with other
parameters. Check that invalid parameters aren't given. Added a few
examples to configuration file.
--HG--
branch : HEAD |
b321df9603081896b70ec44635af96d674a9839a |
|
16-Oct-2005 |
Timo Sirainen <tss@iki.fi> |
Separated passdb_module's interface and the actual data struct. Now it's
possible to have multiple passdbs of same type but with different settings.
--HG--
branch : HEAD |
9fe7632c6d7c1a22623f98a58f497680741f5949 |
|
16-Oct-2005 |
Timo Sirainen <tss@iki.fi> |
Make auth caching work with non-sql/ldap passdbs too.
--HG--
branch : HEAD |
01ac83a86f9f29741b585205eefeec9c0c546f8b |
|
12-Oct-2005 |
Timo Sirainen <tss@iki.fi> |
Fixed some printf-type mismatches
--HG--
branch : HEAD |
72fe7206d6a695fee2dc43c390b38e1d39b9b543 |
|
22-Jul-2005 |
Timo Sirainen <tss@iki.fi> |
Open/close PAM session if -session option is given. Patch by Pasi Sj�m.
--HG--
branch : HEAD |
2fbc2a7c65d30e46803195ebb4547176b85c22c7 |
|
12-Jul-2005 |
Timo Sirainen <tss@iki.fi> |
Removed direct config.h including. I'm not sure why it was done before,
probably to reduce compile times a few milliseconds. Ugly anyway..
--HG--
branch : HEAD |
2c54f8d4eb457f138d297ed25d5c01fc39403a29 |
|
14-Jun-2005 |
Timo Sirainen <tss@iki.fi> |
Allow PAM to modify username.
--HG--
branch : HEAD |
8afe3f0e832b8b3483b692205bbd59c0110a20fd |
|
13-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
If we run out of memory, exit with FATAL_OUTOFMEM status instead of dumping
core. Also changed a few other i_panic() calls to others.
--HG--
branch : HEAD |
66d2db642fe24d555d113ba463e446b038d476ef |
|
28-Feb-2005 |
Timo Sirainen <tss@iki.fi> |
Restructuring of auth code. Balancer auth processes were a bad idea. Usually
the balancer itself took as much CPU as the actual workers because it acted
as a proxy.
Now auth worker means different thing: they're used to execute blocking
passdb and userdb queries. Currently just MySQL (PAM and checkpassword in
TODO).
--HG--
branch : HEAD |
e4d34f2fbee451219599d71505594df704093ce3 |
|
26-Feb-2005 |
Timo Sirainen <tss@iki.fi> |
Moved cache handling from sql/ldap-specific code to generic auth-request
code. Did some small optimizations on the way.
--HG--
branch : HEAD |
49e513d090753ccbf95560b2f3a21f081a5b6c51 |
|
08-Jan-2005 |
Timo Sirainen <tss@iki.fi> |
Added auth_request_log_*().
--HG--
branch : HEAD |
1f1e81aab38d833d1c9cdc244c91fd762e0080d4 |
|
06-Dec-2004 |
Timo Sirainen <tss@iki.fi> |
Added name variable for userdb_module and passdb_module and changed their
initialization a bit.
--HG--
branch : HEAD |
87cc5e9025e7fb6408f0de64c48d2d2897773ba5 |
|
19-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
s/protocol/service/ in authentication
--HG--
branch : HEAD |
08aea01ef9a9d20703e0fcf8618e6195c0037a44 |
|
20-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
Added preinit() call to userdb/passdbs, which is called before dropping
privileges. init() is called after. SQL/LDAP now parses the config file in
preinit, but does the actual connecting only in init(). This fixes LDAP
crashing at startup.
--HG--
branch : HEAD |
76e793b8004e62aa664d7510be2f4399fbaca02b |
|
15-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Set PAM_RHOST for PAM if it's known.
--HG--
branch : HEAD |
0373a24e97602b4c394e93a70b75f45e5869fa51 |
|
31-May-2004 |
Timo Sirainen <tss@iki.fi> |
Logging changes. Make sure we don't write control characters to log and also
log IP address.
--HG--
branch : HEAD |
6d701b8abc45d6d3881ee19ffc6f38b23d35eea5 |
|
29-May-2004 |
Timo Sirainen <tss@iki.fi> |
Don't use hardcoded protocol list for auth process, string is just fine.
--HG--
branch : HEAD |
67e26a26c8be946f99a699265139ac5e3409b92c |
|
24-Sep-2003 |
Timo Sirainen <tss@iki.fi> |
Alignment fix
--HG--
branch : HEAD |
cd466fe7b84b0223735a6469c7f7bc225f65996d |
|
21-Sep-2003 |
Timo Sirainen <tss@iki.fi> |
data_stack_pool split into two: unsafe_data_stack_pool which works like
before, and a new one which verifies that stack frame stays the same
whenever the pool is accessed.
--HG--
branch : HEAD |
3522670ffa0e64078cc687a5e91bbfd8bd42847d |
|
07-Sep-2003 |
Timo Sirainen <tss@iki.fi> |
Strict aliasing fix
--HG--
branch : HEAD |
68d76bc6de2d923d03955e49d563d6e4629b86bf |
|
22-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
Fixed crash if login process connection died while there were some auth
requests.
--HG--
branch : HEAD |
67b2c958f6de410bc86b68edc669b28b02c933f4 |
|
26-Jun-2003 |
Timo Sirainen <tss@iki.fi> |
Using "*" as PAM service name now uses imap/pop3 service.
--HG--
branch : HEAD |
1781e057a60ae780ced3bf2f249d951419568e8e |
|
25-Jun-2003 |
Timo Sirainen <tss@iki.fi> |
Call waitpid() until no processes are left, instead of one per second.
--HG--
branch : HEAD |
846b120c1509152c15307dd801c079425121548c |
|
25-Jun-2003 |
Timo Sirainen <tss@iki.fi> |
Use "dovecot" service rather than "imap".
--HG--
branch : HEAD |
a1c1f2ae8e1465829921e318f0df7758099fd18d |
|
19-Jun-2003 |
Timo Sirainen <tss@iki.fi> |
Fork new process for each PAM check. Not exactly fast, but we have to do it
so we don't block when incorrect password is given. We could try reusing the
processes though..
--HG--
branch : HEAD |
473080c7c0d25ddfdf77e7dfa0ba8f73c6c669d5 |
|
18-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
Added default_pass_scheme to LDAP. Support for more password schemes. Merged
password checking code with LDAP and passwd-file, so both support the same
schemes now.
--HG--
branch : HEAD |
5bd741c5a2d7997769ba8dbf94ea846e6c2c32ef |
|
08-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
OpenPAM uses const too.
--HG--
branch : HEAD |
7d6389e4053c2dac1fb37180b5756b00785983dc |
|
02-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
auth process fixes, LDAP seems to be working (with the kludge define or
fixed libldap)
--HG--
branch : HEAD |
22535a9e685e29214082878e37a267157044618e |
|
27-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Async userdb and passdb interface.
--HG--
branch : HEAD |
25757faf029c369a8318349dafe952e2358df1d8 |
|
27-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
We have now separate "userdb" and "passdb". They aren't tied to each others
in any way, so it's possible to use whatever user database with whatever
password database.
Added "static" userdb, which uses same uid/gid for everyone and generates
home directory from given template. This could be useful with PAM, although
insecure since everyone uses same uid.
Not too well tested, and userdb/passdb API still needs to be changed to
asynchronous for sql/ldap/etc lookups.
--HG--
branch : HEAD |