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

Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a 

uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 

uid=99(nobody) gid=98(nobody) groups=98(nobody) 

Safe-mode: OFF (not secure)

/usr/src/linux-2.4.18-xfs-1.1/fs/fat/   drwxr-xr-x
Free 318.34 GB of 458.09 GB (69.49%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     file.c (3.09 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
 *  linux/fs/fat/file.c
 *
 *  Written 1992,1993 by Werner Almesberger
 *
 *  regular file handling primitives for fat-based filesystems
 */

#include <linux/sched.h>
#include <linux/locks.h>
#include <linux/fs.h>
#include <linux/msdos_fs.h>
#include <linux/errno.h>
#include <linux/fcntl.h>
#include <linux/stat.h>
#include <linux/string.h>
#include <linux/pagemap.h>
#include <linux/fat_cvf.h>

#include <asm/uaccess.h>
#include <asm/system.h>

#define PRINTK(x)
#define Printk(x) printk x

struct file_operations fat_file_operations = {
    llseek:        generic_file_llseek,
    read:        fat_file_read,
    write:        fat_file_write,
    mmap:        generic_file_mmap,
    fsync:        file_fsync,
};

struct inode_operations fat_file_inode_operations = {
    truncate:    fat_truncate,
    setattr:    fat_notify_change,
};

ssize_t fat_file_read(
    struct file *filp,
    char *buf,
    size_t count,
    loff_t *ppos)
{
    struct inode *inode = filp->f_dentry->d_inode;
    return MSDOS_SB(inode->i_sb)->cvf_format
            ->cvf_file_read(filp,buf,count,ppos);
}


int fat_get_block(struct inode *inode, long iblock, struct buffer_head *bh_result, int create)
{
    struct super_block *sb = inode->i_sb;
    unsigned long phys;

    phys = fat_bmap(inode, iblock);
    if (phys) {
        bh_result->b_dev = inode->i_dev;
        bh_result->b_blocknr = phys;
        bh_result->b_state |= (1UL << BH_Mapped);
        return 0;
    }
    if (!create)
        return 0;
    if (iblock << sb->s_blocksize_bits != MSDOS_I(inode)->mmu_private) {
        BUG();
        return -EIO;
    }
    if (!(iblock % MSDOS_SB(inode->i_sb)->cluster_size)) {
        if (fat_add_cluster(inode) < 0)
            return -ENOSPC;
    }
    MSDOS_I(inode)->mmu_private += sb->s_blocksize;
    phys = fat_bmap(inode, iblock);
    if (!phys)
        BUG();
    bh_result->b_dev = inode->i_dev;
    bh_result->b_blocknr = phys;
    bh_result->b_state |= (1UL << BH_Mapped);
    bh_result->b_state |= (1UL << BH_New);
    return 0;
}

ssize_t fat_file_write(
    struct file *filp,
    const char *buf,
    size_t count,
    loff_t *ppos)
{
    struct inode *inode = filp->f_dentry->d_inode;
    struct super_block *sb = inode->i_sb;
    return MSDOS_SB(sb)->cvf_format
            ->cvf_file_write(filp,buf,count,ppos);
}

ssize_t default_fat_file_write(
    struct file *filp,
    const char *buf,
    size_t count,
    loff_t *ppos)
{
    struct inode *inode = filp->f_dentry->d_inode;
    int retval;

    retval = generic_file_write(filp, buf, count, ppos);
    if (retval > 0) {
        inode->i_mtime = inode->i_ctime = CURRENT_TIME;
        MSDOS_I(inode)->i_attrs |= ATTR_ARCH;
        mark_inode_dirty(inode);
    }
    return retval;
}

void fat_truncate(struct inode *inode)
{
    struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);
    int cluster;

    /* Why no return value?  Surely the disk could fail... */
    if (IS_RDONLY (inode))
        return /* -EPERM */;
    if (IS_IMMUTABLE(inode))
        return /* -EPERM */;
    cluster = 1 << sbi->cluster_bits;
    /* 
     * This protects against truncating a file bigger than it was then
     * trying to write into the hole.
     */
    if (MSDOS_I(inode)->mmu_private > inode->i_size)
        MSDOS_I(inode)->mmu_private = inode->i_size;

    fat_free(inode, (inode->i_size + (cluster - 1)) >> sbi->cluster_bits);
    MSDOS_I(inode)->i_attrs |= ATTR_ARCH;
    inode->i_ctime = inode->i_mtime = CURRENT_TIME;
    mark_inode_dirty(inode);
}

:: 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 #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0043 ]--