/[imapfilter]/imapfilter/imapfilter.c
ViewVC logotype

Diff of /imapfilter/imapfilter.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.34.2.1 by lefcha, Thu Aug 29 19:37:10 2002 UTC revision 1.34.2.2 by lefcha, Tue Sep 24 18:40:38 2002 UTC
# Line 22  unsigned int capabilities;     /* Capabiliti Line 22  unsigned int capabilities;     /* Capabiliti
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    
# Line 37  int main(int argc, char *argv[]) Line 39  int main(int argc, char *argv[])
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);
# Line 180  int main(int argc, char *argv[]) Line 184  int main(int argc, char *argv[])
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;

Legend:
Removed from v.1.34.2.1  
changed lines
  Added in v.1.34.2.2

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26