~ubuntu-dev/ubuntu/lucid/dovecot/lucid-201002110912

« back to all changes in this revision

Viewing changes to src/auth/mech.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:
49
49
void mech_generic_auth_initial(struct auth_request *request,
50
50
                               const unsigned char *data, size_t data_size)
51
51
{
52
 
        if (data_size == 0) {
 
52
        if (data == NULL) {
53
53
                request->callback(request, AUTH_CLIENT_RESULT_CONTINUE,
54
54
                                  NULL, 0);
55
55
        } else {
 
56
                /* initial reply given, even if it was 0 bytes */
56
57
                request->mech->auth_continue(request, data, data_size);
57
58
        }
58
59
}
67
68
extern const struct mech_module mech_apop;
68
69
extern const struct mech_module mech_cram_md5;
69
70
extern const struct mech_module mech_digest_md5;
 
71
extern const struct mech_module mech_external;
70
72
extern const struct mech_module mech_ntlm;
71
73
extern const struct mech_module mech_otp;
72
74
extern const struct mech_module mech_skey;
75
77
#ifdef HAVE_GSSAPI
76
78
extern const struct mech_module mech_gssapi;
77
79
#endif
 
80
#ifdef HAVE_GSSAPI_SPNEGO
 
81
extern const struct mech_module mech_gssapi_spnego;
 
82
#endif
78
83
extern const struct mech_module mech_winbind_ntlm;
79
84
extern const struct mech_module mech_winbind_spnego;
80
85
 
85
90
        mech_register_module(&mech_apop);
86
91
        mech_register_module(&mech_cram_md5);
87
92
        mech_register_module(&mech_digest_md5);
88
 
        if (getenv("NTLM_USE_WINBIND") != NULL)
 
93
        mech_register_module(&mech_external);
 
94
        if (getenv("USE_WINBIND") != NULL) {
89
95
                mech_register_module(&mech_winbind_ntlm);
90
 
        else
 
96
                mech_register_module(&mech_winbind_spnego);
 
97
        } else {
91
98
                mech_register_module(&mech_ntlm);
92
 
        mech_register_module(&mech_winbind_spnego);
 
99
#if defined(HAVE_GSSAPI_SPNEGO) && defined(BUILTIN_GSSAPI)
 
100
                mech_register_module(&mech_gssapi_spnego);
 
101
#endif
 
102
        }
93
103
        mech_register_module(&mech_otp);
94
104
        mech_register_module(&mech_skey);
95
105
        mech_register_module(&mech_rpa);
106
116
        mech_unregister_module(&mech_apop);
107
117
        mech_unregister_module(&mech_cram_md5);
108
118
        mech_unregister_module(&mech_digest_md5);
109
 
        if (getenv("NTLM_USE_WINBIND") != NULL)
 
119
        mech_unregister_module(&mech_external);
 
120
        if (getenv("NTLM_USE_WINBIND") != NULL) {
110
121
                mech_unregister_module(&mech_winbind_ntlm);
111
 
        else
 
122
                mech_unregister_module(&mech_winbind_spnego);
 
123
        } else {
112
124
                mech_unregister_module(&mech_ntlm);
113
 
        mech_unregister_module(&mech_winbind_spnego);
 
125
#if defined(HAVE_GSSAPI_SPNEGO) && defined(BUILTIN_GSSAPI)
 
126
                mech_unregister_module(&mech_gssapi_spnego);
 
127
#endif
 
128
        }
114
129
        mech_unregister_module(&mech_otp);
115
130
        mech_unregister_module(&mech_skey);
116
131
        mech_unregister_module(&mech_rpa);