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

Diff of /imapfilter/memory.c

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

revision 1.7 by lefcha, Wed Jan 30 13:14:58 2002 UTC revision 1.8 by lefcha, Thu Jan 31 17:09:32 2002 UTC
# Line 236  void secmem_clear(void) Line 236  void secmem_clear(void)
236    
237    
238  /*  /*
239     * Lock memory of allocated buffers.
240     */
241    void secmem_lock(void)
242    {
243        secmem_t *p;
244    
245        seteuid(euid);              /* Gain root privileges. */
246        for (p = smem; p; p = p->next)
247            mlock(p->buf, p->size);
248        seteuid(ruid);              /* Drop root privileges. */
249    
250        if (getuid() != geteuid())
251            fatal(ERROR_SETUID, "imapfilter: failed to drop privileges\n");
252    }
253    
254    
255    /*
256   * Store original core file settings and disable core file dumping.   * Store original core file settings and disable core file dumping.
257   */   */
258  void corefile_disable(void)  void corefile_disable(void)

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

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26