Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6241:17e056f924cb HEAD
Store cache_key via auth_cache_parse_key() which adds TABs between the
%variables, making it safer.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 09 Aug 2007 14:34:41 +0300 |
parents | 3a1ff50a57b7 |
children | 40e324d83d2b |
files | src/auth/passdb-bsdauth.c src/auth/passdb-pam.c src/auth/passdb-vpopmail.c |
diffstat | 3 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/passdb-bsdauth.c Thu Aug 09 13:39:08 2007 +0300 +++ b/src/auth/passdb-bsdauth.c Thu Aug 09 14:34:41 2007 +0300 @@ -56,7 +56,8 @@ if (strncmp(args, "cache_key=", 10) == 0) { module->cache_key = - p_strdup(auth_passdb->auth->pool, args + 10); + auth_cache_parse_key(auth_passdb->auth->pool, + args + 10); } return module; }
--- a/src/auth/passdb-pam.c Thu Aug 09 13:39:08 2007 +0300 +++ b/src/auth/passdb-pam.c Thu Aug 09 14:34:41 2007 +0300 @@ -17,6 +17,7 @@ #include "network.h" #include "passdb.h" #include "safe-memset.h" +#include "auth-cache.h" #include <stdlib.h> @@ -290,8 +291,8 @@ module->pam_setcred = TRUE; else if (strncmp(t_args[i], "cache_key=", 10) == 0) { module->module.cache_key = - p_strdup(auth_passdb->auth->pool, - t_args[i] + 10); + auth_cache_parse_key(auth_passdb->auth->pool, + t_args[i] + 10); } else if (strcmp(t_args[i], "blocking=yes") == 0) { /* ignore, for backwards compatibility */ } else if (strcmp(t_args[i], "failure_show_msg=yes") == 0) {
--- a/src/auth/passdb-vpopmail.c Thu Aug 09 13:39:08 2007 +0300 +++ b/src/auth/passdb-vpopmail.c Thu Aug 09 14:34:41 2007 +0300 @@ -136,7 +136,8 @@ if (strncmp(args, "cache_key=", 10) == 0) { module->cache_key = - p_strdup(auth_passdb->auth->pool, args + 10); + auth_cache_parse_key(auth_passdb->auth->pool, + args + 10); } return module; }