Dre4m Shell
Server IP : 127.0.0.2  /  Your IP : 3.15.221.165
Web Server : Apache/2.4.18 (Ubuntu)
System :
User : www-data ( )
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,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,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/lxcfs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/lxcfs/lxc.mount.hook
#!/bin/sh -e

# We're dealing with mount entries, so expand any symlink
LXC_ROOTFS_MOUNT=$(readlink -f ${LXC_ROOTFS_MOUNT})

# /proc files
if [ -d /var/lib/lxcfs/proc/ ]; then
    for entry in /var/lib/lxcfs/proc/*; do
        [ -e "${LXC_ROOTFS_MOUNT}/proc/$(basename $entry)" ] || continue
        mount -n --bind $entry ${LXC_ROOTFS_MOUNT}/proc/$(basename $entry)
    done
fi


# Allow nesting lxcfs
if [ -d ${LXC_ROOTFS_MOUNT}/var/lib/lxcfs/ ]; then
    mount -n --bind /var/lib/lxcfs ${LXC_ROOTFS_MOUNT}/var/lib/lxcfs/
fi

# no need for lxcfs cgroups if we have cgroup namespaces
[ -n "$LXC_CGNS_AWARE" ] && [ -f /proc/self/ns/cgroup ] && exit 0

# Don't mess with containers that don't have /sys/fs/cgroup configured
# (lxc.mount.auto = cgroup:mixed)
if touch ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/lxcfs; then
    rm ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/lxcfs
else
    exit 0
fi

# /sys/fs/cgroup files
if [ -d "${LXC_ROOTFS_MOUNT}/sys/fs/cgroup" ]; then
    if [ -d /var/lib/lxcfs/cgroup ]; then
        # Cleanup existing mounts
        for entry in ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/*; do
            DEST=$(basename $entry)

            if [ "${DEST}" = "cgmanager" ]; then
                continue
            fi

            if [ ! -d "${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/${DEST}" ]; then
                continue
            fi

            while grep -q "${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/${DEST}" /proc/self/mountinfo; do
                grep "${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/${DEST}" /proc/self/mountinfo | cut -d' ' -f5 | while read line; do
                     [ -e "${line}" ] && umount -l "${line}" || true
                done
            done

            rm -Rf ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/${DEST}
        done

        # Mount the new entries
        for entry in /var/lib/lxcfs/cgroup/*; do
            DEST=$(basename $entry)
            if [ "$DEST" = "name=systemd" ]; then
                DEST="systemd"
            fi

            if [ ! -d ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/${DEST} ]; then
                mkdir ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/${DEST}
            fi

            mount -n --bind $entry ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/$DEST

            # make sure that cpu,cpuacct shows up as cpu and cpuacct
            # separately, else systemd is unhappy
            if echo $DEST | grep -q ","; then
                arr=$(echo $DEST | tr "," "\n")
                for single in $arr
                do
                    if [ ! -L ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/$single ]; then
                        ln -s $DEST ${LXC_ROOTFS_MOUNT}/sys/fs/cgroup/$single
                    fi
                done
            fi
        done
    fi
fi

exit 0

Anon7 - 2022
AnonSec Team