~ubuntu-branches/ubuntu/lucid/dovecot/lucid-security

« back to all changes in this revision

Viewing changes to src/master/auth-process.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug, Ante Karamatic, Mathias Gug
  • Date: 2009-02-12 21:45:09 UTC
  • mfrom: (1.10.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20090212214509-8fp69kpkzf03j5xg
Tags: 1:1.1.11-0ubuntu1
[ Ante Karamatic ]
  Add new binary pkg dovecot-postfix that integrates postfix and dovecot
  automatically: (LP: #164837)
  - debian/control:
    + add new binary with short description.
  - 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.
    + 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 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/.
  
[ Mathias Gug ]
* New upstream release:
* Update dovecot-managesieve to 0.10.5. Fixes:
  - check if names of sieve scripts contain '/' (LP: #307291)
* Update dovecot-managesieve patch for 1.1.11 and 0.10.5.
* Update dovecot-sieve plugin to 1.1.6.
* Merge from debian experimental, remaining changes:
  - Use Snakeoil SSL certificates by default.
    + debian/control: Depend on ssl-cert
    + debian/paptches/ssl-cert-snakeoil.dpatch: Change default SSL cert 
      paths to snakeoil.
    + debian/dovecot-common.postinst: Relax grep for SSL_* a bit.
  - Add autopkgtest in debian/tests/*.
  - debian/dovecot-common.init: Check to see if there is an /etc/inetd.conf.
    (LP: #208411)
  - Fast TearDown: Update lsb init header to not stop in level 6.
  - Add status action to the init script:
    + debian/control: Depend on lsb >= 3.2.12ubuntu3.
    + debian/dovecot-common-init: Add the 'status' action (LP: #247096).
  - debian/rules:
    - Copy config.{guess,sub} after running libtoolize.
    - Clean dovecot-managesieve directory.
  - Add ufw integration: 
    - Created debian/dovecot-common.ufw.profile
    - debian/rules:
      + install profile
    - debian/control
      + Suggest ufw
  - debian/{control,rules}: enable PIE hardening.
  - Updated dovecot.common.README.Debian with information on what has changed 
    between 1.0 and 1.1.1. Fixes (LP: #257625) 
  - 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.
* Dropped:
  - debian/patches/fix-message-parser.dpatch: Parsing an invalid message
    address like "From: (" caused an assert-crash. (LP: #290901).
    (CVE-2008-4907 - fixed in 1.1.6)
  - debian/patches/login-max-process-count-warning.dpatch: Tell the user 
    that they have reached the maximum number of processes count.
    (LP: #189616) - Different implementation from upstream.
  - debian/patches/fix-dovecot-sieve.dpatch: Fixes assertion error
    when a header string ends with a LF (LP: #264306). Implemented upstream.
  - Don't fail in postinst if dovecot-{sql,ldap} is missing. (LP: #153161)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */
 
1
/* Copyright (c) 2002-2009 Dovecot authors, see the included COPYING file */
2
2
 
3
3
#include "common.h"
4
4
#include "hash.h"
19
19
 
20
20
#include <stdlib.h>
21
21
#include <unistd.h>
 
22
#include <fcntl.h>
22
23
#include <pwd.h>
23
24
#include <syslog.h>
24
25
 
59
60
bool have_initialized_auth_processes = FALSE;
60
61
 
61
62
static struct child_process auth_child_process =
62
 
        { PROCESS_TYPE_AUTH, 0 };
 
63
        { MEMBER(type) PROCESS_TYPE_AUTH };
63
64
static struct child_process auth_worker_child_process =
64
 
        { PROCESS_TYPE_AUTH_WORKER, 0 };
 
65
        { MEMBER(type) PROCESS_TYPE_AUTH_WORKER };
65
66
 
66
67
static struct timeout *to;
67
68
static unsigned int auth_tag;
125
126
                return FALSE;
126
127
        }
127
128
 
 
129
        if (!auth_success_written) {
 
130
                int fd;
 
131
 
 
132
                fd = creat(AUTH_SUCCESS_PATH, 0666);
 
133
                if (fd == -1)
 
134
                        i_error("creat(%s) failed: %m", AUTH_SUCCESS_PATH);
 
135
                else
 
136
                        (void)close(fd);
 
137
                auth_success_written = TRUE;
 
138
        }
 
139
 
128
140
        auth_master_callback(list[1], list + 2, request);
129
141
        hash_remove(process->requests, POINTER_CAST(id));
130
142
        return TRUE;
313
325
                               dec2str(pid));
314
326
        p->worker_listen_fd =
315
327
                unix_socket_create(path, 0600, group->set->uid,
316
 
                                   group->set->gid, 16);
 
328
                                   group->set->gid, 128);
317
329
        if (p->worker_listen_fd == -1)
318
330
                i_fatal("Couldn't create auth worker listener");
319
331
 
700
712
        path = t_strconcat(auth_set->parent->defaults->login_dir, "/",
701
713
                           auth_set->name, NULL);
702
714
        group->listen_fd = unix_socket_create(path, 0660, master_uid,
703
 
                                              auth_set->parent->login_gid, 16);
 
715
                                              auth_set->parent->login_gid, 128);
704
716
        if (group->listen_fd == -1)
705
717
                i_fatal("Couldn't create auth process listener");
706
718