# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/rsbac/pkg_linux_pre.conf # Copyright (C) 2004 - 2023 The T2 SDE Project # Copyright (C) 1998 - 2003 ROCK Linux Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- echo_status "Including RSBAC patch" pkg_rsbac_tempdir=`mktemp -d` pkg_rsbac_archdir=$base/download/mirror/r pkg_rsbac_confdir=$base/package/*/rsbac pkg_rsbac_ver=`sed -n 's,^\[V\] \(.*\),\1,p' ${pkg_rsbac_confdir}/rsbac.desc` pkg_rsbac_lxpatch=`match_source_file -p patch-linux-${ver:0:3} rsbac` $compressor -d < $pkg_rsbac_lxpatch > \ ${pkg_rsbac_tempdir}/rsbac-${pkg_rsbac_ver}.patch var_append patchfiles ' ' "${pkg_rsbac_tempdir}/rsbac-${pkg_rsbac_ver}.patch" var_append confscripts ' ' "${pkg_rsbac_confdir}/kernel.conf.sh" hook_add prepatch 4 "tar -v $taropt `match_source_file -p rsbac-common-v${pkg_rsbac_ver} rsbac`" hook_add postpatch 6 "rm -rf $pkg_rsbac_tempdir" # apply hotfixes here eval `grep '^\[O] pkg_rsbac_lx' package/security/rsbac/rsbac.desc | cut -d' ' -f2-` if [[ "$ver" == 2.4* ]]; then pkg_rsbac_lxpatches=$(match_source_file -p "rsbac-bugfix-v$pkg_rsbac_ver-${pkg_rsbac_lx24}" rsbac) else pkg_rsbac_lxpatches=$(match_source_file -p "rsbac-bugfix-v$pkg_rsbac_ver-${pkg_rsbac_lx26}" rsbac) fi for x in $pkg_rsbac_lxpatches; do var_append patchfiles ' ' "$x" done