[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
tss at dovecot.org
tss at dovecot.org
Tue Jan 16 13:18:26 UTC 2007
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-index-view-sync.c, 1.59, 1.60
- Next message: [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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv18371
Modified Files:
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.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- auth-request-handler.c 15 Dec 2006 16:55:29 -0000 1.21
+++ auth-request-handler.c 16 Jan 2007 13:18:23 -0000 1.22
@@ -118,7 +118,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.3
diff -u -d -r1.2 -r1.3
--- auth-stream.c 14 Feb 2006 17:43:04 -0000 1.2
+++ auth-stream.c 16 Jan 2007 13:18:23 -0000 1.3
@@ -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.2
diff -u -d -r1.1 -r1.2
--- auth-stream.h 8 Aug 2005 09:20:16 -0000 1.1
+++ auth-stream.h 16 Jan 2007 13:18:24 -0000 1.2
@@ -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.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- passdb-blocking.c 8 Nov 2006 20:22:08 -0000 1.13
+++ passdb-blocking.c 16 Jan 2007 13:18:24 -0000 1.14
@@ -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.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- userdb-prefetch.c 9 Dec 2006 15:11:48 -0000 1.4
+++ userdb-prefetch.c 16 Jan 2007 13:18:24 -0000 1.5
@@ -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/lib-index mail-index-view-sync.c, 1.59, 1.60
- Next message: [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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list