[exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim…

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: exim-cvs
Subject: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src deliver.c
ph10 2006/06/27 16:38:07 BST

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src         deliver.c 
  Log:
  Magnus Holmgren's patch to fix non-expanding transport home directory
  bug.


  Revision  Changes    Path
  1.361     +4 -0      exim/exim-doc/doc-txt/ChangeLog
  1.32      +15 -12    exim/exim-src/src/deliver.c


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.360
  retrieving revision 1.361
  diff -u -r1.360 -r1.361
  --- ChangeLog    27 Jun 2006 15:07:18 -0000    1.360
  +++ ChangeLog    27 Jun 2006 15:38:07 -0000    1.361
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.360 2006/06/27 15:07:18 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.361 2006/06/27 15:38:07 ph10 Exp $


Change log file for Exim from version 4.21
-------------------------------------------
@@ -44,6 +44,10 @@
PH/03 Magnus Holmgren's patch for filter_prepend_home.

   PH/03 Fixed Bugzilla #101: macro definition between ACLs doesn't work.
  +
  +PH/04 Applied Magnus Holmgren's patch to fix Bugzilla #98: transport's home
  +      directory not expanded when it should be if an expanded home directory
  +      was set for the address (which is overridden by the transport).



Exim version 4.62

  Index: deliver.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/deliver.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- deliver.c    20 Apr 2006 14:11:29 -0000    1.31
  +++ deliver.c    27 Jun 2006 15:38:07 -0000    1.32
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/deliver.c,v 1.31 2006/04/20 14:11:29 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/deliver.c,v 1.32 2006/06/27 15:38:07 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -1626,17 +1626,13 @@


if (!findugid(addr, tp, &uid, &gid, &use_initgroups)) return;

  -/* See if either the transport or the address specifies a home and/or a current
  -working directory. Expand it if necessary. If nothing is set, use "/", for the
  -working directory, which is assumed to be a directory to which all users have
  -access. It is necessary to be in a visible directory for some operating systems
  -when running pipes, as some commands (e.g. "rm" under Solaris 2.5) require
  -this. */
  -
  -deliver_home = (tp->home_dir != NULL)? tp->home_dir :
  -               (addr->home_dir != NULL)? addr->home_dir : NULL;
  -
  -if (deliver_home != NULL && !testflag(addr, af_home_expanded))
  +/* See if either the transport or the address specifies a home directory. A
  +home directory set in the address may already be expanded; a flag is set to
  +indicate that. In other cases we must expand it. */
  +
  +if ((deliver_home = tp->home_dir) != NULL ||       /* Set in transport, or */
  +     ((deliver_home = addr->home_dir) != NULL &&   /* Set in address and */
  +       !testflag(addr, af_home_expanded)))         /*   not expanded */
     {
     uschar *rawhome = deliver_home;
     deliver_home = NULL;                      /* in case it contains $home */
  @@ -1656,8 +1652,15 @@
       }
     }


  -working_directory = (tp->current_dir != NULL)? tp->current_dir :
  -                    (addr->current_dir != NULL)? addr->current_dir : NULL;
  +/* See if either the transport or the address specifies a current directory,
  +and if so, expand it. If nothing is set, use the home directory, unless it is
  +also unset in which case use "/", which is assumed to be a directory to which
  +all users have access. It is necessary to be in a visible directory for some
  +operating systems when running pipes, as some commands (e.g. "rm" under Solaris
  +2.5) require this. */
  +
  +working_directory = (tp->current_dir != NULL)?
  +  tp->current_dir : addr->current_dir;


   if (working_directory != NULL)
     {