!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/efs/   drwxr-xr-x
Free 318.35 GB of 458.09 GB (69.5%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     namei.c (1.74 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
 * namei.c
 *
 * Copyright (c) 1999 Al Smith
 *
 * Portions derived from work (c) 1995,1996 Christian Vogelgsang.
 */

#include <linux/string.h>
#include <linux/efs_fs.h>

static efs_ino_t efs_find_entry(struct inode *inode, const char *name, int len) {
    struct buffer_head *bh;

    int            slot, namelen;
    char            *nameptr;
    struct efs_dir        *dirblock;
    struct efs_dentry    *dirslot;
    efs_ino_t        inodenum;
    efs_block_t        block;
 
    if (inode->i_size & (EFS_DIRBSIZE-1))
        printk(KERN_WARNING "EFS: WARNING: find_entry(): directory size not a multiple of EFS_DIRBSIZE\n");

    for(block = 0; block < inode->i_blocks; block++) {

        bh = sb_bread(inode->i_sb, efs_bmap(inode, block));
        if (!bh) {
            printk(KERN_ERR "EFS: find_entry(): failed to read dir block %d\n", block);
            return 0;
        }
    
        dirblock = (struct efs_dir *) bh->b_data;

        if (be16_to_cpu(dirblock->magic) != EFS_DIRBLK_MAGIC) {
            printk(KERN_ERR "EFS: find_entry(): invalid directory block\n");
            brelse(bh);
            return(0);
        }

        for(slot = 0; slot < dirblock->slots; slot++) {
            dirslot  = (struct efs_dentry *) (((char *) bh->b_data) + EFS_SLOTAT(dirblock, slot));

            namelen  = dirslot->namelen;
            nameptr  = dirslot->name;

            if ((namelen == len) && (!memcmp(name, nameptr, len))) {
                inodenum = be32_to_cpu(dirslot->inode);
                brelse(bh);
                return(inodenum);
            }
        }
        brelse(bh);
    }
    return(0);
}

struct dentry *efs_lookup(struct inode *dir, struct dentry *dentry) {
    efs_ino_t inodenum;
    struct inode * inode;

    if (!dir || !S_ISDIR(dir->i_mode))
        return ERR_PTR(-ENOENT);

    inode = NULL;

    inodenum = efs_find_entry(dir, dentry->d_name.name, dentry->d_name.len);
    if (inodenum) {
        if (!(inode = iget(dir->i_sb, inodenum)))
            return ERR_PTR(-EACCES);
    }

    d_add(dentry, inode);
    return NULL;
}


:: 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.0561 ]--