Re: [exim] How to set group for pipe_transport on a redirect…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: exim-users
CC: Marc Haber
Tárgy: Re: [exim] How to set group for pipe_transport on a redirect router?
On Mon, 12 Dec 2005, Philip Hazel wrote:

> Yes, I think this is a bug. I will post a patch when I have fixed it.


Try this.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.




*** exim-4.60/src/deliver.c Mon Nov 28 10:57:32 2005
--- deliver.c    Mon Dec 12 11:41:50 2005
***************
*** 1304,1309 ****
--- 1304,1317 ----
      }
    }


+ /* If the transport did not set a group, see if the router did. */
+
+ if (!gid_set && testflag(addr, af_gid_set))
+ {
+ *gidp = addr->gid;
+ gid_set = TRUE;
+ }
+
/* Pick up a uid from the transport if one is set. */

  if (tp->uid_set) *uidp = tp->uid;
***************
*** 1339,1358 ****
      }
    }


! /* Otherwise see if the address specifies the uid and if so, take its
! initgroups flag. The gid from the address is taken only if the transport hasn't
! set it. In other words, a gid on the transport overrides the gid on the
! address. */

  else if (testflag(addr, af_uid_set))
    {
    *uidp = addr->uid;
    *igfp = testflag(addr, af_initgroups);
-   if (!gid_set)
-     {
-     *gidp = addr->gid;
-     gid_set = TRUE;
-     }
    }


  /* Nothing has specified the uid - default to the Exim user, and group if the
--- 1347,1359 ----
      }
    }


! /* Otherwise see if the address specifies the uid and if so, take it and its
! initgroups flag. */

  else if (testflag(addr, af_uid_set))
    {
    *uidp = addr->uid;
    *igfp = testflag(addr, af_initgroups);
    }


  /* Nothing has specified the uid - default to the Exim user, and group if the
***************
*** 1368,1374 ****
      }
    }


! /* If no gid is set, it is a disaster. */

  if (!gid_set)
    {
--- 1369,1377 ----
      }
    }


! /* If no gid is set, it is a disaster. We default to the Exim gid only if
! defaulting to the Exim uid. In other words, if the configuration has specified
! a uid, it must also provide a gid. */

  if (!gid_set)
    {