~ubuntu-branches/ubuntu/natty/exim4/natty-updates

« back to all changes in this revision

Viewing changes to src/routers/rf_set_ugid.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia
  • Date: 2010-01-01 16:28:19 UTC
  • mfrom: (2.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100101162819-htn71my7yj4v1vkr
Tags: 4.71-3ubuntu1
* Merge with Debian unstable (lp: #501657). Remaining changes:
  + debian/patches/71_exiq_grep_error_on_messages_without_size.dpatch:
    Improve handling of broken messages when "exim4 -bp" (mailq) reports
    lines without size info.
  + Don't declare a Provides: default-mta; in Ubuntu, we want postfix to be
    the default.
  + debian/control: Change build dependencies to MySQL 5.1.
  + debian/{control,rules}: add and enable hardened build for PIE
    (Debian bug 542726).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Cambridge: exim/exim-src/src/routers/rf_set_ugid.c,v 1.5 2009/11/16 19:50:38 nm4 Exp $ */
 
2
 
 
3
/*************************************************
 
4
*     Exim - an Internet mail transport agent    *
 
5
*************************************************/
 
6
 
 
7
/* Copyright (c) University of Cambridge 1995 - 2009 */
 
8
/* See the file NOTICE for conditions of use and distribution. */
 
9
 
 
10
#include "../exim.h"
 
11
#include "rf_functions.h"
 
12
 
 
13
 
 
14
/*************************************************
 
15
*      Set uid/gid from block into address       *
 
16
*************************************************/
 
17
 
 
18
/* This function copies any set uid or gid from a ugid block into an
 
19
address.
 
20
 
 
21
Arguments:
 
22
  addr        the address
 
23
  ugid        the ugid block
 
24
 
 
25
Returns:      nothing
 
26
*/
 
27
 
 
28
void
 
29
rf_set_ugid(address_item *addr, ugid_block *ugid)
 
30
{
 
31
if (ugid->uid_set)
 
32
  {
 
33
  addr->uid = ugid->uid;
 
34
  setflag(addr, af_uid_set);
 
35
  }
 
36
 
 
37
if (ugid->gid_set)
 
38
  {
 
39
  addr->gid = ugid->gid;
 
40
  setflag(addr, af_gid_set);
 
41
  }
 
42
 
 
43
if (ugid->initgroups) setflag(addr, af_initgroups);
 
44
}
 
45
 
 
46
/* End of rf_set_ugid.c */