22 |
unsigned int interval = 0; /* Poll at the specified interval. */ |
unsigned int interval = 0; /* Poll at the specified interval. */ |
23 |
char logfile[PATH_MAX]; /* Log file. */ |
char logfile[PATH_MAX]; /* Log file. */ |
24 |
char *home = NULL; /* User's home directory. */ |
char *home = NULL; /* User's home directory. */ |
25 |
|
#ifdef MEMORY_LOCK |
26 |
uid_t ruid, euid; /* Real and effective UID. */ |
uid_t ruid, euid; /* Real and effective UID. */ |
27 |
|
#endif |
28 |
jmp_buf acctloop; |
jmp_buf acctloop; |
29 |
|
|
30 |
|
|
39 |
account_t *ca; /* Current account. */ |
account_t *ca; /* Current account. */ |
40 |
mbox_t *cm; /* Current mailbox. */ |
mbox_t *cm; /* Current mailbox. */ |
41 |
|
|
42 |
|
#ifdef MEMORY_LOCK |
43 |
ruid = getuid(); |
ruid = getuid(); |
44 |
euid = geteuid(); |
euid = geteuid(); |
45 |
seteuid(ruid); /* Drop root privileges. */ |
seteuid(ruid); /* Drop root privileges. */ |
46 |
|
#endif |
47 |
|
|
48 |
home = getenv("HOME"); |
home = getenv("HOME"); |
49 |
options = (OPTION_DETAILS_NORMAL | OPTION_NAMESPACE | OPTION_WARNING); |
options = (OPTION_DETAILS_NORMAL | OPTION_NAMESPACE | OPTION_WARNING); |
184 |
fatal(ERROR_FORK, "imapfilter: forking; %s\n", strerror(errno)); |
fatal(ERROR_FORK, "imapfilter: forking; %s\n", strerror(errno)); |
185 |
break; |
break; |
186 |
case 0: |
case 0: |
187 |
|
#ifdef MEMORY_LOCK |
188 |
secmem_lock(); |
secmem_lock(); |
189 |
setuid(ruid); /* Capability to regain root privileges will |
setuid(ruid); /* Capability to regain root privileges will |
190 |
not be needed any more. */ |
not be needed any more. */ |
191 |
|
#endif |
192 |
lockfile_create(); |
lockfile_create(); |
193 |
corefile_disable(); |
corefile_disable(); |
194 |
break; |
break; |