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