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

Diff of /imapfilter/memory.c

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

revision 1.6 by lefcha, Tue Jan 29 21:23:42 2002 UTC revision 1.7 by lefcha, Wed Jan 30 13:14:58 2002 UTC
# Line 14  Line 14 
14  extern uid_t ruid, euid;  extern uid_t ruid, euid;
15    
16  static secmem_t *smem = NULL;   /* First node of secure memory linked list. */  static secmem_t *smem = NULL;   /* First node of secure memory linked list. */
17  static struct rlimit orl;       /* Original core file limit settings. */  
18    
19  /*  /*
20   * A malloc() that checks the results and dies in case of error.   * A malloc() that checks the results and dies in case of error.
# Line 240  void secmem_clear(void) Line 240  void secmem_clear(void)
240   */   */
241  void corefile_disable(void)  void corefile_disable(void)
242  {  {
243      struct rlimit nrl;      struct rlimit rl;
       
     getrlimit(RLIMIT_CORE, &orl);  
       
     nrl = orl;  
     nrl.rlim_cur = 0;  
     setrlimit(RLIMIT_CORE, &nrl);  
 }  
   
244    
245  /*      getrlimit(RLIMIT_CORE, &rl);
246   * Restore original core file settings.      
247   */      rl.rlim_cur = rl.rlim_max = 0;
248  void corefile_restore(void)      setrlimit(RLIMIT_CORE, &rl);
 {  
     setrlimit(RLIMIT_CORE, &orl);  
249  }  }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26