|
System | : | Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686 |
Software | : | Apache. PHP/5.3.6-13ubuntu3.10 |
ID | : | uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
|
|
Safe Mode | : | OFF |
Open_Basedir | : | OFF |
Freespace | : | 24.35 GB of 70.42 GB (34.58%) |
|
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON |
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
|
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ]
|
|
/
usr/
src/
courier-0.66.1/
maildir/
- drwxrwxrwx
|
Viewing file: maildirmkdir.c (1.23 KB) -rw-rw-rw-Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
/* ** Copyright 2000 Double Precision, Inc. ** See COPYING for distribution information. */
#if HAVE_CONFIG_H #include "config.h" #endif
#include <sys/types.h> #include <sys/stat.h> #include <string.h> #include <stdlib.h> #if HAVE_UNISTD_H #include <unistd.h> #endif #include <errno.h>
#include "maildirmisc.h"
int maildir_mkdir(const char *dir) { char *buf, *p; size_t l;
if (dir == 0 || dir[0] == 0) { errno = EINVAL; return (-1); } l = strlen(dir); if ((buf = malloc(l + sizeof("/tmp"))) == 0) { errno = ENOMEM; return (-1); } strcpy(buf, dir); strcpy(buf+l, "/cur");
/* We do mkdir -p here */
p = buf+1; while ((p = strchr(p, '/')) != 0) { *p = '\0'; if (mkdir(buf, 0700) < 0 && errno != EEXIST) { free(buf); return (-1); } *p++ = '/'; }
if (mkdir(buf, 0700) < 0 && errno != EEXIST) { free(buf); return (-1); } strcpy(buf+l, "/new"); if (mkdir(buf, 0700) < 0 && errno != EEXIST) { free(buf); return (-1); } /* * make /tmp last because this is the one we open first - * the existence of this directory implies the whole * Maildir structure is complete */ strcpy(buf+l, "/tmp"); if (mkdir(buf, 0700) < 0 && errno != EEXIST) { free(buf); return (-1); } free(buf); return (0); }
|