~ubuntu-branches/ubuntu/wily/dovecot/wily

« back to all changes in this revision

Viewing changes to src/lib-auth/auth-server-request.c

  • Committer: Bazaar Package Importer
  • Author(s): CHuck Short, Chuck Short
  • Date: 2009-11-06 00:47:29 UTC
  • mfrom: (4.1.9 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091106004729-i39n7v9e7d4h51f6
Tags: 1:1.2.6-1ubuntu1
* Merge from debian testing, remaining changes:
  Add new binary pkg dovecot-postfix that integrates postfix and dovecot
  automatically: (LP: #164837)
  + debian/control:
    - add new binary with short description
    - set Architecture all for dovecot-postfix (LP: #329878)
  + debian/dovecot-postfix.postinst:
    - create initial certificate symlinks to snakeoil.
    - set up postfix with postconf to:
      - use Maildir/ as the default mailbox.
      - use dovecot as the sasl authentication server.
      - use dovecot LDA (deliver).
      - use tls for smtp{d} services.
    - fix certificates paths in postfix' main.cf
    - add reject_unauth_destination to postfix' recipient restrictions
    - add reject_unknown_sender_domain to postfix' sender restrictions
    - rename configuration name on remove, delete on purge
    - restart dovecot after linking certificates
    - handle use case when postfix is unconfigurated
   + debian/dovecot-postfix.dirs: create backup directory for postfix's configuration
   + restart postfix and dovecot.
   + debian/dovecot-postfix.postrm:
     - remove all dovecot related configuration from postfix.
     - restart postfix and dovecot.
   + debian/dovecot-common.init:
     - check if /etc/dovecot/dovecot-postfix.conf exists and use it
       as the configuration file if so.
   + debian/patches/warning-ubuntu-postfix.dpatch
     - add warning about dovecot-postfix.conf in dovecot default 
       configuration file
   + debian/patches/dovecot-postfix.conf.diff:
     - Ubuntu server custom changes to the default dovecot configuration for
       better interfation with postfix
     - enable sieve plugin
   + debian/patches/dovecot-postfix.conf.diff:
     + Ubuntu server custom changes to the default dovecot configuration for
       better integration with postfix:
       - enable imap, pop3, imaps, pop3s and managesieve by default.
       - enable dovecot LDA (deliver).
       - enable SASL auth socket in postfix private directory.
   + debian/rules:
     - copy, patch and install dovecot-postfix.conf in /etc/dovecot/.
     - build architecure independent packages too
   + Use Snakeoil SSL certificates by default.
     - debian/control: Depend on ssl-cert.
     - debian/patches/ssl-cert-snakeoil.dpatch: Change default SSL cert
       paths to snakeoil.
     - debian/dovecot-common.postinst: Relax grep for SSL_* a bit.
   + Add autopkgtest to debian/tests/*.
   + Fast TearDown: Update the lsb init header to not stop in level 6.
   + Add ufw integration:
     - Created debian/dovecot-common.ufw.profile.
     - debian/rules:
       + install profile
     - debian/control:
       + Suggest ufw
   + debian/{control,rules}: enable PIE hardening.
   + dovecot-imapd, dovecot-pop3: Replaces dovecot-common (<< 1:1.1). LP: #254721
   + debian/control:
     - Update Vcs-* headers.
   + debian/rules:
     - Create emtpy stamp.h.in files in dovecot-sieve/ and dovecot-managesieve/
       if they're not there since empty files are not included in the diff.gz 
       file.
   + Add SMTP-AUTH support for Outlook (login auth mechanism)
   + Dropped:
     - debian/patches/security-CVE-2009-3235: Applied upstream.
     - debian/patches/fix-pop3-assertion.dpatch: Applied upstream.
     - dovecot-sieve and dovecot-managesieve: Use the debian patches instead.

  [Chuck Short]
  - Updated dovecot-sieve to 0.1.13.
  - Updated dovecot-managesieve to 0.11.9.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
                           try it for the next */
63
63
                        request->plaintext_data = i_strdup(data);
64
64
 
65
 
                        hash_insert(request->next_conn->requests,
66
 
                                    POINTER_CAST(request->id), request);
 
65
                        hash_table_insert(request->next_conn->requests,
 
66
                                          POINTER_CAST(request->id), request);
67
67
                        if (auth_server_send_new_request(request->next_conn,
68
68
                                                         request, &error) == 0)
69
69
                                request->retrying = TRUE;
171
171
 
172
172
        id = (unsigned int)strtoul(list[0], NULL, 10);
173
173
 
174
 
        request = hash_lookup(conn->requests, POINTER_CAST(id));
 
174
        request = hash_table_lookup(conn->requests, POINTER_CAST(id));
175
175
        if (request == NULL) {
176
176
                /* We've already destroyed the request */
177
177
                return TRUE;
178
178
        }
179
179
 
180
 
        hash_remove(request->conn->requests, POINTER_CAST(id));
181
 
        if (request->next_conn != NULL)
182
 
                hash_remove(request->next_conn->requests, POINTER_CAST(id));
 
180
        hash_table_remove(request->conn->requests, POINTER_CAST(id));
 
181
        if (request->next_conn != NULL) {
 
182
                hash_table_remove(request->next_conn->requests,
 
183
                                  POINTER_CAST(id));
 
184
        }
183
185
        request->conn = conn;
184
186
        request->next_conn = NULL;
185
187
 
212
214
 
213
215
        id = (unsigned int)strtoul(args, NULL, 10);
214
216
 
215
 
        request = hash_lookup(conn->requests, POINTER_CAST(id));
 
217
        request = hash_table_lookup(conn->requests, POINTER_CAST(id));
216
218
        if (request == NULL) {
217
219
                /* We've already destroyed the request */
218
220
                return TRUE;
243
245
 
244
246
        id = (unsigned int)strtoul(list[0], NULL, 10);
245
247
 
246
 
        request = hash_lookup(conn->requests, POINTER_CAST(id));
 
248
        request = hash_table_lookup(conn->requests, POINTER_CAST(id));
247
249
        if (request == NULL) {
248
250
                /* We've already destroyed the request */
249
251
                return TRUE;
250
252
        }
251
253
 
252
 
        hash_remove(conn->requests, POINTER_CAST(request->id));
 
254
        hash_table_remove(conn->requests, POINTER_CAST(request->id));
253
255
        if (request->retrying) {
254
256
                next = request->next_conn == NULL ? NULL :
255
257
                        get_next_plain_server(request->next_conn);
265
267
                        }
266
268
                        request->conn = conn;
267
269
                } else {
268
 
                        hash_insert(next->requests, POINTER_CAST(request->id),
269
 
                                    request);
 
270
                        hash_table_insert(next->requests,
 
271
                                          POINTER_CAST(request->id), request);
270
272
                        request->next_conn = next;
271
273
 
272
274
                        T_BEGIN {
307
309
        struct hash_iterate_context *iter;
308
310
        void *key, *value;
309
311
 
310
 
        iter = hash_iterate_init(conn->requests);
311
 
        while (hash_iterate(iter, &key, &value))
 
312
        iter = hash_table_iterate_init(conn->requests);
 
313
        while (hash_table_iterate(iter, &key, &value))
312
314
                request_hash_remove(conn, value);
313
 
        hash_iterate_deinit(&iter);
 
315
        hash_table_iterate_deinit(&iter);
314
316
}
315
317
 
316
318
struct auth_request *
367
369
 
368
370
        T_BEGIN {
369
371
                if (auth_server_send_new_request(conn, request, error_r) == 0) {
370
 
                        hash_insert(conn->requests, POINTER_CAST(request->id),
371
 
                                    request);
 
372
                        hash_table_insert(conn->requests,
 
373
                                          POINTER_CAST(request->id), request);
372
374
                } else {
373
375
                        auth_client_request_free(request);
374
376
                        request = NULL;
398
400
{
399
401
        void *id = POINTER_CAST(request->id);
400
402
 
401
 
        hash_remove(request->conn->requests, id);
 
403
        hash_table_remove(request->conn->requests, id);
402
404
        if (request->next_conn != NULL)
403
 
                hash_remove(request->next_conn->requests, id);
 
405
                hash_table_remove(request->next_conn->requests, id);
404
406
 
405
407
        request->callback(request, -1, NULL, NULL, request->context);
406
408
        auth_client_request_free(request);