�ɲɾ�����ӯ�����һ��ˣ��������С���˴��ͣ�������P���ҹ��ñ˽��ά�Բ��������˸߸ԣ�������ơ��ҹ��ñ�����ά�Բ���ˡ���˳^�ӣ������ӡ� ���ͯj�ӣ��ƺ���ӣ� ? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!PKd^0]mR¶lib.shnuȯ#!/bin/bash function skip_on_cl_solo() { # Check that this is CLS and skip if yes if [ -f "/etc/cloudlinux-edition-solo" ] || [ -f "/etc/cloudlinux-container" ]; then exit 0 fi }PKu2]z8(cpanel/hooks/cloudlinux_linksafe_hook.shnuȯ#!/bin/bash if [ -d /usr/local/cpanel/base/frontend/paper_lantern/styled ]; then chown -h :linksafe /usr/local/cpanel/base/frontend/paper_lantern/styled/* fiPKu2] )cpanel/hooks/cpanel-linksafe-delete-hooksnuȯ#!/bin/bash source /opt/cloudlinux-linksafe/lib.sh function deleteAllInclude(){ hook_file="$1" tmp_name="$2" pattern="$3" common_path="$4" if [ ! -e "${common_path}/tmp" ]; then mkdir -p "${common_path}/tmp" fi if [ -e "${hook_file}" ];then cat "${hook_file}" | sed "${pattern}" > "${common_path}/tmp/${tmp_name}.tmp.$$" cat "${common_path}/tmp/${tmp_name}.tmp.$$" > "${hook_file}" rm -f "${common_path}/tmp/${tmp_name}.tmp.$$" fi } skip_on_cl_solo if [ ! -e "/usr/local/cpanel/cpanel" ]; then exit 0 fi if [ ! -e "/proc/sys/fs/protected_symlinks_allow_gid" ]; then exit 0 fi POSTUPCP="/scripts/postupcp" TARGET="cloudlinux-linksafe" COMMON_PATH="/usr/share/${TARGET}/cpanel/hooks" deleteAllInclude "${POSTUPCP}" "postupcp" "/#${TARGET}/d" "${COMMON_PATH}" chown -h :root /usr/local/cpanel/base/frontend/paper_lantern/styled/* PKu2]k00*cpanel/hooks/cpanel-linksafe-install-hooksnuȯ#!/bin/bash function createHookHeader(){ local hook_file="$1" local notificator="$2" local common_path="$3" if [ ! -e "${common_path}/tmp" ]; then mkdir -p "${common_path}/tmp" fi if [ ! -e "${hook_file}" ]; then echo "#!/bin/bash" > "${hook_file}" chmod 755 "${hook_file}" else chmod 755 "${hook_file}" tmp=`/bin/sed -n '/#\!\/bin\/\(ba\)\?sh/p' "${hook_file}"` if [ -z "${tmp}" ];then /bin/grep -q "${hook_file}.${notificator}.bak" "${hook_file}" if [ $? -eq 1 ];then mv -f "${hook_file}" "${hook_file}.${notificator}.bak" echo "#!/bin/bash" > "${hook_file}" echo "${hook_file}.${notificator}.bak"' "$@"' >> "${hook_file}" chmod 755 "${hook_file}" "${hook_file}.${notificator}.bak" fi fi fi } function checkHookString(){ local hook_file="$1" local pattern="$2" local comment="$3" if [ -e "${hook_file}" ];then tmp=`cat "${hook_file}" | grep "${pattern}"` if [ -z "${tmp}" ];then echo "${pattern} #${comment}" >> ${hook_file} fi fi } function removeEmptyStringsFromFile(){ local hook_file="$1" res=`sed -e '/^$/d' "${hook_file}"` echo "${res}" > "${hook_file}" } if [ ! -e "/usr/local/cpanel/cpanel" ]; then exit 0 fi POSTUPCP="/scripts/postupcp" TARGET="cloudlinux-linksafe" COMMON_PATH="/usr/share/${TARGET}/cpanel/hooks" POSTUPCP_HOOK="${COMMON_PATH}/cloudlinux_linksafe_hook.sh" createHookHeader "${POSTUPCP}" "${TARGET}" "${COMMON_PATH}" checkHookString "${POSTUPCP}" "${POSTUPCP_HOOK}" "${TARGET}" removeEmptyStringsFromFile "${POSTUPCP}" # Versions before 1.1-17 have bug: script `postupcp` in some cases has wrong line due to bug that was fixed in AL-1689. # Line `/scripts/postupcp` leads to recursion and hang. # The wrong line from script `postupcp` is being removed by the following code line. DON'T REMOVE IT # Task AL-2208 reintroduced the bug sed -i '/\/scripts\/postupcp/d' "${POSTUPCP}" "${POSTUPCP_HOOK}" PKu2]2T,,scriptlets/rpm_preun.shnu7m#!/bin/bash # RPM preun script # Note: Also called from Debian cloudlinux-linksafe.prerm scriptlet # Arguments: # RPM # "$1" == 0 -- RPM will uninstall package # "$1" == 1 -- RPM upgrade/downgrade package # DEB # "$1" == "remove" - DEB will uninstall package # "$1" == "upgrade" -- DEB # Common # $2 - solo_marker - /etc/cloudlinux-edition-solo # "cloudlinux-linksafe PRE UNINSTALL STARTED" # RPM/DEB argument unified interpreter argument='' if [[ "$1" == 0 || "$1" == "remove" ]]; then # "$1" == 0 -- RPM will uninstall package # "$1" == "remove" - DEB will uninstall package argument='uninstall' elif [[ "$1" == 1 || "$1" == "upgrade" ]]; then # "$1" == 1 -- RPM upgrade/downgrade package # "$1" == "upgrade" -- DEB argument='upgrade' else # Unknown argument exit 0 fi SOLO_MARKER="$2" CONTAINER_MARKER="$3" if [ -f "$SOLO_MARKER" ] || [ -f "$CONTAINER_MARKER" ]; then exit 0 fi if [[ "$argument" == 'uninstall' ]]; then /usr/share/cloudlinux-linksafe/cpanel/hooks/cpanel-linksafe-delete-hooks fi # "cloudlinux-linksafe PRE UNINSTALL FINISHED" PKu2]scriptlets/rpm_posttrans.shnu7m#!/bin/bash # RPM posttrans script, no arguments # Note: Also called from Debian cloudlinux-linksafe.postinst scriptlet # Arguments: # $2 - solo_marker - /etc/cloudlinux-edition-solo # "cloudlinux-linksafe POST TRANS STARTED" SOLO_MARKER="$2" CONTAINER_MARKER="$3" if [ -f "$SOLO_MARKER" ] || [ -f "$CONTAINER_MARKER" ]; then exit 0 fi /usr/bin/cl-linksafe-reconfigure if [[ "$1" == 1 || "$1" == "configure" ]]; then sed -i '/fs.protected_hardlinks/d' /etc/sysctl.conf sed -i '/fs.protected_symlinks/d' /etc/sysctl.conf sed -i '/# SecureLinks Link Traversal/d' /etc/sysctl.conf fi # "cloudlinux-linksafe POST TRANS FINISHED" PKd^0]mR¶lib.shnuȯPKu2]z8(cpanel/hooks/cloudlinux_linksafe_hook.shnuȯPKu2] )cpanel/hooks/cpanel-linksafe-delete-hooksnuȯPKu2]k00*cpanel/hooks/cpanel-linksafe-install-hooksnuȯPKu2]2T,,fscriptlets/rpm_preun.shnu7mPKu2]scriptlets/rpm_posttrans.shnu7mPK3