]> 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 41a05fa909a89963e0eb2fb0ea07803b129a81c9..f2d9e10bf7828f25c332385c68cc90749f7707ed 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;