]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: When logging in as anonymous user, return "anonymous" userdb extra field.
authorTimo Sirainen <tss@iki.fi>
Mon, 6 Dec 2010 04:36:30 +0000 (04:36 +0000)
committerTimo Sirainen <tss@iki.fi>
Mon, 6 Dec 2010 04:36:30 +0000 (04:36 +0000)
TODO
src/auth/auth-request-handler.c

diff --git a/TODO b/TODO
index f415eff2d4822aa8234cae609d77ac15d2d1aa9c..81cca4deac7674edc7d4c90b98ae717dca9ce3fd 100644 (file)
--- a/TODO
+++ b/TODO
     - read the entire file to memory only once and keep it there, stat() later
       to see if it has changed. if not, perhaps don't even bother stat()ing
       dovecot-acl files? at least not that often..
- - add anonymous environment for anon logins (for managesieve mainly)
  - fs quota: getquotaroot inbox vs. other-box should return different quotas
    if two quotas are defined
  - new primes code: are hash tables now being resized too often?
index 2d0f773e25754e510a22f349761133a93881eb02..80be810367fb4b467021f915418d009fdf90618c 100644 (file)
@@ -589,6 +589,15 @@ static void userdb_callback(enum userdb_result result,
                                              "master_user",
                                              request->master_user);
                }
+               if (*request->set->anonymous_username != '\0' &&
+                   strcmp(request->user,
+                          request->set->anonymous_username) == 0) {
+                       /* this is an anonymous login, either via ANONYMOUS
+                          SASL mechanism or simply logging in as the anonymous
+                          user via another mechanism */
+                       auth_stream_reply_add(request->userdb_reply,
+                                             "anonymous", NULL);
+               }
                auth_stream_reply_import(reply,
                        auth_stream_reply_export(request->userdb_reply));
                break;