!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/include/   drwxr-xr-x
Free 3.41 GB of 27.03 GB (12.6%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     baudboy.h (3.08 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* Copyright (C) 2001 Red Hat, Inc.

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public License
   as published by the Free Software Foundation; either version 2 of
   the License, or (at your option) any later version.

   It is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
   Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this software; if not, write to the Free
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   02111-1307 USA.  */


#ifndef _BAUDBOY_H_
#define _BAUDBOY_H_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>

#ifdef    __cplusplus
extern "C" {
#endif

#define    LOCKDEV_PATH    "/usr/sbin/lockdev"

static inline int _doit(const char * argv[])
{
    pid_t child;
    int status;
    void (*osig) (int) = signal(SIGCHLD, SIG_DFL);
    int rc;

    if (!(child = fork())) {
    int fd;
        /* these have to be open to something */
    if ((fd = open("/dev/null", 2)) < 0)
        exit(-1);
    dup2(fd, 0);
    dup2(fd, 1);
    dup2(fd, 2);
    close(fd);
    /* Swap egid and gid for lockdev's access(2) device check. */
    setregid(getegid(), getgid());
    execv(argv[0], (char *const *)argv);
    exit(-1);
    }

    rc = (int) waitpid(child, &status, 0);
    signal(SIGCHLD, osig);
    if (rc == child && WIFEXITED(status)) {
    /*
     * Exit        dev_lock    dev_unlock    dev_testlock
     *      0    OK        OK        not locked
     *      1    locked other    locked other    locked
     *      2    EACCES
     *      3    EROFS
     *      4    EFAULT
     *      5    EINVAL
     *      6    ENAMETOOLONG
     *      7    ENOENT
     *      8    ENOTDIR
     *      9    ENOMEM
     *     10    ELOOP
     *     11    EIO
     *    255    error        error        error
     */
    rc = WEXITSTATUS(status);
    switch(rc) {
    case  0:    rc = 0;        break;
    default:
    case  1:    rc = -EPERM;    break;
    case  2:    rc = -EACCES;    break;
    case  3:    rc = -EROFS;    break;
    case  4:    rc = -EFAULT;    break;
    case  5:    rc = -EINVAL;    break;
    case  6:    rc = -ENAMETOOLONG;    break;
    case  7:    rc = -ENOENT;    break;
    case  8:    rc = -ENOTDIR;    break;
    case  9:    rc = -ENOMEM;    break;
    case 10:    rc = -ELOOP;    break;
    case 11:    rc = -EIO;    break;
    }
    } else if (rc == -1)
    rc = -errno;
    else
    rc = -ECHILD;

    return rc;

}

static inline int ttylock(const char * devname)
{
    const char * argv[] = { LOCKDEV_PATH, "-l", NULL, NULL};
    argv[2] = devname;
    return _doit(argv);
}

static inline int ttyunlock(const char * devname)
{
    const char * argv[] = { LOCKDEV_PATH, "-u", NULL, NULL};
    argv[2] = devname;
    return _doit(argv);
}

static inline int ttylocked(const char * devname)
{
    const char * argv[] = { LOCKDEV_PATH, NULL, NULL};
    argv[1] = devname;
    return _doit(argv);
}

static inline int ttywait(const char * devname)
{
    int rc;
    while((rc = ttylocked(devname)) == 0)
    sleep(1);
    return rc;
}

#ifdef    __cplusplus
};
#endif

#endif /* _BAUDBOY_H_ */

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0032 ]--