~ubuntu-dev/ubuntu/lucid/dovecot/lucid-201002101901

« back to all changes in this revision

Viewing changes to debian/patches/login-max-processes-count-warning.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2008-05-26 09:51:01 UTC
  • mfrom: (1.10.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20080526095101-y0zxqc8ofd9j1aa5
Tags: 1:1.0.13-4ubuntu1
* Merge from debian unstable, remaining changes:
  - DebainMaintainerField
  - Use Snakeoil SSL certificate 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.
  - Fast TearDown:
    + debian/rules: Call dh_installinit in 'multiuser' mode.
    + debian/control: Depend on newer sysv-rc for this.
    + debian/dovecot-common.postinst: Remove stp script symlinks from rc0 and rc6 on upgrades.
      Need to be kept unil next LTS release.
  - Add autopkgtest in debian/tests/*.
  - Don't fail in postinst if dovecot-{sql,ldap} is missing. (LP: #153161)
  - Dropped upstream-mail-group-fixes.dpatch. No longer needed.
  - Dropped upstream-invalid-password-fixes.dpatch. No longer needed.
  - debian/dovecot-common.init: Check to see if there is an /etc/inetd.conf. (LP: #208411)
  - debian/patches/login-max-processes-count-warning.dpatch: Tell the user
    that they have reached the maxium number of processes count. (LP: #189616)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## login-max-processes-count-warning.dpatch by Mathias Gug <mathiaz@ubuntu.com>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: No description.
 
6
 
 
7
@DPATCH@
 
8
diff -urNad dovecot-1.0.10~/dovecot-example.conf dovecot-1.0.10/dovecot-example.conf
 
9
--- dovecot-1.0.10~/dovecot-example.conf        2008-05-01 19:56:03.000000000 -0400
 
10
+++ dovecot-1.0.10/dovecot-example.conf 2008-05-01 19:56:04.000000000 -0400
 
11
@@ -160,6 +160,9 @@
 
12
 # we check only once in a second if new processes should be created - if all
 
13
 # of them are used at the time, we double their amount until the limit set by
 
14
 # this setting is reached.
 
15
+# Be warned that some clients open a lot of imap connections simultaneously
 
16
+# and that the login process also handles ssl connections 
 
17
+# (one login process per ssl connection is needed).
 
18
 #login_max_processes_count = 128
 
19
 
 
20
 # Maximum number of connections allowed per each login process. This setting
 
21
diff -urNad dovecot-1.0.10~/src/master/login-process.c dovecot-1.0.10/src/master/login-process.c
 
22
--- dovecot-1.0.10~/src/master/login-process.c  2008-05-01 19:56:03.000000000 -0400
 
23
+++ dovecot-1.0.10/src/master/login-process.c   2008-05-01 19:58:00.000000000 -0400
 
24
@@ -744,8 +744,11 @@
 
25
                   processes are logged in users who we don't want to kick out
 
26
                   because someone's started flooding */
 
27
                if (group->oldest_prelogin_process != NULL &&
 
28
-                   group->oldest_prelogin_process->initialized)
 
29
+                   group->oldest_prelogin_process->initialized) {
 
30
                        login_process_destroy(group->oldest_prelogin_process);
 
31
+               } else {
 
32
+                       i_warning("login_max_processes_count reached and no login process to destroy !");
 
33
+               }
 
34
        }
 
35
 
 
36
        /* we want to respond fast when multiple clients are connecting