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

Diff of /imapfilter/imapfilter.c

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

revision 1.35 by lefcha, Thu Aug 29 19:51:24 2002 UTC revision 1.36 by lefcha, Tue Sep 24 18:49:34 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  jmp_buf acctloop;  jmp_buf acctloop;
28    
# Line 37  int main(int argc, char *argv[]) Line 38  int main(int argc, char *argv[])
38      account_t *ca;              /* Current account. */      account_t *ca;              /* Current account. */
39      mbox_t *cm;                 /* Current mailbox. */      mbox_t *cm;                 /* Current mailbox. */
40    
41    #ifdef MEMORY_LOCK
42      ruid = getuid();      ruid = getuid();
43      euid = geteuid();      euid = geteuid();
44      seteuid(ruid);              /* Drop root privileges. */      seteuid(ruid);              /* Drop root privileges. */
45    #endif
46    
47      home = getenv("HOME");      home = getenv("HOME");
48      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 183  int main(int argc, char *argv[])
183                  fatal(ERROR_FORK, "imapfilter: forking; %s\n", strerror(errno));                  fatal(ERROR_FORK, "imapfilter: forking; %s\n", strerror(errno));
184                  break;                  break;
185              case 0:              case 0:
186    #ifdef MEMORY_LOCK
187                  secmem_lock();                  secmem_lock();
188                  setuid(ruid);   /* Capability to regain root privileges will                  setuid(ruid);   /* Capability to regain root privileges will
189                                     not be needed any more. */                                     not be needed any more. */
190    #endif
191                  lockfile_create();                  lockfile_create();
192                  corefile_disable();                  corefile_disable();
193                  break;                  break;

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26