[dovecot-cvs] dovecot/src/auth auth-request-handler.c, 1.12.2.7, 1.12.2.8 auth-stream.c, 1.2, 1.2.2.1 auth-stream.h, 1.1, 1.1.2.1 passdb-blocking.c, 1.10.2.2, 1.10.2.3 userdb-prefetch.c, 1.3.2.1, 1.3.2.2
tss at dovecot.org
tss at dovecot.org
Tue Jan 16 13:18:54 UTC 2007
- Previous message: [dovecot-cvs] dovecot/src/auth auth-request-handler.c, 1.21, 1.22 auth-stream.c, 1.2, 1.3 auth-stream.h, 1.1, 1.2 passdb-blocking.c, 1.13, 1.14 userdb-prefetch.c, 1.4, 1.5
- Next message: [dovecot-cvs] dovecot/src/auth auth-cache.c, 1.17.2.3, 1.17.2.4 auth-request.c, 1.58.2.16, 1.58.2.17 auth-request.h, 1.27.2.2, 1.27.2.3 userdb-ldap.c, 1.40.2.3, 1.40.2.4 userdb-passwd-file.c, 1.22.2.1, 1.22.2.2 userdb-passwd.c, 1.18.2.1, 1.18.2.2 userdb-sql.c, 1.14.2.3, 1.14.2.4 userdb-vpopmail.c, 1.21.2.1, 1.21.2.2 userdb.h, 1.25.2.1, 1.25.2.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv18360
Modified Files:
Tag: branch_1_0
auth-request-handler.c auth-stream.c auth-stream.h
passdb-blocking.c userdb-prefetch.c
Log Message:
extra_fields == NULL and empty extra_fields (reset after each passdb
lookup) should be treated the same. Fixes some assert crashes.
Index: auth-request-handler.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-request-handler.c,v
retrieving revision 1.12.2.7
retrieving revision 1.12.2.8
diff -u -d -r1.12.2.7 -r1.12.2.8
--- auth-request-handler.c 9 Dec 2006 15:11:33 -0000 1.12.2.7
+++ auth-request-handler.c 16 Jan 2007 13:18:21 -0000 1.12.2.8
@@ -117,7 +117,7 @@
auth_stream_reply_export(request->extra_fields);
if (!request->proxy) {
- if (extra_fields == NULL)
+ if (auth_stream_is_empty(request->extra_fields))
return NULL;
/* we only wish to remove all fields prefixed with "userdb_" */
Index: auth-stream.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-stream.c,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- auth-stream.c 14 Feb 2006 17:43:04 -0000 1.2
+++ auth-stream.c 16 Jan 2007 13:18:21 -0000 1.2.2.1
@@ -73,3 +73,8 @@
{
return str_c(reply->str);
}
+
+bool auth_stream_is_empty(struct auth_stream_reply *reply)
+{
+ return reply == NULL || str_len(reply->str) == 0;
+}
Index: auth-stream.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-stream.h,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -d -r1.1 -r1.1.2.1
--- auth-stream.h 8 Aug 2005 09:20:16 -0000 1.1
+++ auth-stream.h 16 Jan 2007 13:18:21 -0000 1.1.2.1
@@ -10,5 +10,6 @@
void auth_stream_reply_import(struct auth_stream_reply *reply, const char *str);
const char *auth_stream_reply_export(struct auth_stream_reply *reply);
+bool auth_stream_is_empty(struct auth_stream_reply *reply);
#endif
Index: passdb-blocking.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-blocking.c,v
retrieving revision 1.10.2.2
retrieving revision 1.10.2.3
diff -u -d -r1.10.2.2 -r1.10.2.3
--- passdb-blocking.c 17 Oct 2006 11:26:41 -0000 1.10.2.2
+++ passdb-blocking.c 16 Jan 2007 13:18:21 -0000 1.10.2.3
@@ -87,7 +87,7 @@
}
if (*reply != '\0') {
- i_assert(request->extra_fields == NULL);
+ i_assert(auth_stream_is_empty(request->extra_fields));
for (tmp = t_strsplit(reply, "\t"); *tmp != NULL; tmp++) {
p = strchr(*tmp, '=');
@@ -122,7 +122,7 @@
{
string_t *str;
- i_assert(request->extra_fields == NULL);
+ i_assert(auth_stream_is_empty(request->extra_fields));
str = t_str_new(64);
str_printfa(str, "PASSV\t%u\t", request->passdb->id);
@@ -154,7 +154,7 @@
{
string_t *str;
- i_assert(request->extra_fields == NULL);
+ i_assert(auth_stream_is_empty(request->extra_fields));
str = t_str_new(64);
str_printfa(str, "PASSL\t%u\t%d\t",
Index: userdb-prefetch.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/userdb-prefetch.c,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -d -r1.3.2.1 -r1.3.2.2
--- userdb-prefetch.c 9 Dec 2006 15:11:34 -0000 1.3.2.1
+++ userdb-prefetch.c 16 Jan 2007 13:18:21 -0000 1.3.2.2
@@ -19,7 +19,7 @@
gid_t gid;
bool uid_seen, gid_seen;
- if (auth_request->extra_fields == NULL) {
+ if (auth_stream_is_empty(auth_request->extra_fields)) {
if (auth_request->auth->userdbs->next == NULL) {
/* no other userdbs */
auth_request_log_error(auth_request, "prefetch",
- Previous message: [dovecot-cvs] dovecot/src/auth auth-request-handler.c, 1.21, 1.22 auth-stream.c, 1.2, 1.3 auth-stream.h, 1.1, 1.2 passdb-blocking.c, 1.13, 1.14 userdb-prefetch.c, 1.4, 1.5
- Next message: [dovecot-cvs] dovecot/src/auth auth-cache.c, 1.17.2.3, 1.17.2.4 auth-request.c, 1.58.2.16, 1.58.2.17 auth-request.h, 1.27.2.2, 1.27.2.3 userdb-ldap.c, 1.40.2.3, 1.40.2.4 userdb-passwd-file.c, 1.22.2.1, 1.22.2.2 userdb-passwd.c, 1.18.2.1, 1.18.2.2 userdb-sql.c, 1.14.2.3, 1.14.2.4 userdb-vpopmail.c, 1.21.2.1, 1.21.2.2 userdb.h, 1.25.2.1, 1.25.2.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list