|
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 | : | 25.69 GB of 70.42 GB (36.49%) |
|
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/
pcp/
- drwxrwxrwx
|
Viewing file: pcpparseymd.c (1.38 KB) -rw-rw-rw-Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
/* ** Copyright 2001 Double Precision, Inc. See COPYING for ** distribution information. */
#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <signal.h> #include <fcntl.h> #include <unistd.h> #include <time.h> #include <sys/stat.h> #include "pcp.h"
/* ** Map yyyymmdd into time_t by reverse-engineering mktime(). */
static time_t sod(struct tm *tmptr, unsigned y, unsigned m, unsigned d) { struct tm mytm; time_t tt;
/* Ok, first try */
mytm= *tmptr; mytm.tm_year=y-1900; mytm.tm_mon=m-1; mytm.tm_mday=d; mytm.tm_hour=0; mytm.tm_min=0; mytm.tm_sec=0;
tt=mktime(&mytm);
if (tt == (time_t)-1 || (tmptr=localtime(&tt)) == NULL) return (0);
/* Do it one more time, due to timezone changes. */
mytm= *tmptr; mytm.tm_year=y-1900; mytm.tm_mon=m-1; mytm.tm_mday=d; mytm.tm_hour=0; mytm.tm_min=0; mytm.tm_sec=0;
tt=mktime(&mytm);
if (tt == (time_t)-1) return (0); return (tt); }
int pcp_parse_ymd(unsigned y, unsigned m, unsigned d, time_t *s, time_t *e) { time_t tt; struct tm *tmptr;
time(&tt);
tmptr=localtime(&tt);
if (!tmptr) return (-1);
if ((tt=sod(tmptr, y, m, d)) == 0) return (-1);
*s=tt;
tt += 36 * 60 * 60;
tmptr=localtime(&tt);
if (!tmptr) return (-1);
if ((tt=sod(tmptr, tmptr->tm_year + 1900, tmptr->tm_mon+1, tmptr->tm_mday)) == 0) return (-1);
*e=tt; return (0); }
|