Package: postfix
Version: 2.8.2-1+b1
Severity: normal
Tags: patch

Dear Maintainers,

I noticed that postfix initscript creates a chroot with this
ca_path:

/var/spool/postfix/etc/ssl/certs/etc/ssl/certs

Furthermore due to the dereference of cpio the symbolic links of the
certificates are converted into files.

I have made a patch (a 2-liner) which correct this behavior.

--- /etc/init.d/postfix.dist    2011-05-19 05:57:26.766277421 +0200
+++ /etc/init.d/postfix 2011-05-19 06:02:36.221691418 +0200
@@ -89,7 +89,8 @@
                                else mkdir --parent ${dest_dir%/*}
                            fi
                             # handle files in subdirectories
-                           find "$ca_path" -print0 | cpio -0pdL "$dest_dir"
+                           (cd "$ca_path"; find . -name "*.pem" -print0 | cpio 
-0pdL "$dest_dir" 2>/dev/null)
+                            c_rehash "$dest_dir" >/dev/null 2>&1
                            if [ "$new" = 1 ]; then
                                 # and replace the old directory
                                rm -r "${dest_dir%.NEW}"



Regards
Friedemann

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages postfix depends on:
ii  adduser                   3.112+nmu2     add and remove users and groups
ii  debconf [debconf-2.0]     1.5.39         Debian configuration management sy
ii  dpkg                      1.16.0.3       Debian package management system
ii  libc6                     2.13-4         Embedded GNU C Library: Shared lib
ii  libdb5.1                  5.1.25-1       Berkeley v5.1 Database Libraries [
ii  libsasl2-2                2.1.23.dfsg1-8 Cyrus SASL - authentication abstra
ii  libssl1.0.0               1.0.0d-2       SSL shared libraries
ii  lsb-base                  3.2-27         Linux Standard Base 3.2 init scrip
ii  netbase                   4.45           Basic TCP/IP networking system
ii  ssl-cert                  1.0.28         simple debconf wrapper for OpenSSL

Versions of packages postfix recommends:
ii  python                        2.6.6-14   interactive high-level object-orie

Versions of packages postfix suggests:
pn  dovecot-common                <none>     (no description available)
pn  libsasl2-modules              <none>     (no description available)
ii  mutt [mail-reader]            1.5.21-4   text-based mailreader supporting M
pn  postfix-cdb                   <none>     (no description available)
pn  postfix-ldap                  <none>     (no description available)
pn  postfix-mysql                 <none>     (no description available)
pn  postfix-pcre                  <none>     (no description available)
pn  postfix-pgsql                 <none>     (no description available)
pn  procmail                      <none>     (no description available)
ii  resolvconf                    1.48       name server information handler
pn  sasl2-bin                     <none>     (no description available)
pn  ufw                           <none>     (no description available)
--- /etc/init.d/postfix.dist    2011-05-19 05:57:26.766277421 +0200
+++ /etc/init.d/postfix 2011-05-19 06:02:36.221691418 +0200
@@ -89,7 +89,8 @@
                                else mkdir --parent ${dest_dir%/*}
                            fi
                             # handle files in subdirectories
-                           find "$ca_path" -print0 | cpio -0pdL "$dest_dir"
+                           (cd "$ca_path"; find . -name "*.pem" -print0 | cpio 
-0pdL "$dest_dir" 2>/dev/null)
+                            c_rehash "$dest_dir" >/dev/null 2>&1
                            if [ "$new" = 1 ]; then
                                 # and replace the old directory
                                rm -r "${dest_dir%.NEW}"

Reply via email to