ShellBanner
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:20.05 GB of 70.42 GB (28.47%)
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,

/ usr/ src/ courier-0.66.1/ courier/ libs/ - drwxrwxrwx

Directory:
Viewing file:     comqueuename2.c (1.61 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
** Copyright 2001 Double Precision, Inc.
** See COPYING for distribution information.
*/

#if    HAVE_CONFIG_H
#include    "courier_lib_config.h"
#endif
#include    "courier.h"
#include    "numlib/numlib.h"
#include    "comqueuename.h"
#include    <stdlib.h>
#include    <string.h>
#if    HAVE_SYS_STAT_H
#include    <sys/stat.h>
#endif
#if    HAVE_UNISTD_H
#include    <unistd.h>
#endif
#include    <time.h>

static int bigbrother_create_rename(const char *, char *);

void qmsgunlink(ino_t n, time_t rightnow)
{
    const char *bigbrother=getenv("ARCHIVEDIR");

    if (bigbrother && *bigbrother)
    {
        struct tm *tmptr=localtime(&rightnow);

        /* Archive this message */

        if (tmptr)
        {
            const char *dname=qmsgsdatname(n);
            const char *tname=strrchr(dname, '/');

            char *p=courier_malloc(strlen(bigbrother)+
                           strlen(tname)+40);

            sprintf(p, "%s/%04d.%02d.%02d%s",
                bigbrother, tmptr->tm_year + 1900,
                tmptr->tm_mon+1,
                tmptr->tm_mday, tname);

            if (bigbrother_create_rename(dname, p) == 0)
            {
                dname=qmsgsctlname(n);

                strcpy(strrchr(p, '/'), strrchr(dname, '/'));

                if (rename(dname, p) == 0)
                {
                    free(p);
                    return;
                }
            }

            clog_msg_start_err();
            clog_msg_str("Unable to move ");
            clog_msg_str(dname);
            clog_msg_str(" to ");
            clog_msg_str(p);
            clog_msg_send();
            clog_msg_prerrno();

            free(p);
        }
    }

    unlink(qmsgsdatname(n));
    unlink(qmsgsctlname(n));
}

static int bigbrother_create_rename(const char *from, char *to)
{
    char *p;

    if (rename(from, to) == 0)
        return (0);

    /* Perhaps the directory has to be created? */

    p=strrchr(to, '/');

    *p=0;
    mkdir(to, 0700);
    *p='/';
    return (rename(from, to));
}
Command:
Quick Commands:
Upload:
[OK] Max size: 100MB
PHP Filesystem: <@ Ú
Search File:
regexp
Create File:
Overwrite [OK]
View File:
Mass Defacement:
[+] Main Directory: [+] Defacement Url:
LmfaoX Shell - Private Build [BETA] - v0.1 -; Generated: 0.1585 seconds