mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 14:25:52 +00:00
Add a user tunable setting to add arguments to the parser invocations,
if necessary. Currently used to suppress warnings about unsafe/unfiltered environment 'u' exec transitions. [Corresponds to rev 6415 in the old svn repo]
This commit is contained in:
@@ -68,10 +68,10 @@ genrunscript()
|
||||
if [ "$retaintmpdir" = "true" ]
|
||||
then
|
||||
runfile=$tmpdir/runtest
|
||||
echo "$subdomain < $profile" > $runfile
|
||||
echo "$subdomain ${parser_args} < $profile" > $runfile
|
||||
echo "$testexec \"$@\" 2>&1 > $outfile" >> $runfile
|
||||
echo "echo $testname: \`cat $outfile\`" >> $runfile
|
||||
echo "$subdomain -R < $profile" >> $runfile
|
||||
echo "$subdomain ${parser_args} -R < $profile" >> $runfile
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -429,7 +429,7 @@ loadprofile()
|
||||
{
|
||||
#global complainflaf profile profileloaded
|
||||
|
||||
$subdomain -q $complainflag < $profile > /dev/null
|
||||
$subdomain ${parser_args} $complainflag < $profile > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
removeprofile
|
||||
@@ -443,7 +443,7 @@ replaceprofile()
|
||||
{
|
||||
#global complainflag profile
|
||||
|
||||
$subdomain -qr $complainflag < $profile > /dev/null
|
||||
$subdomain ${parser_args} -r $complainflag < $profile > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
fatalerror "Unable to replace profile"
|
||||
@@ -462,7 +462,7 @@ removeprofile()
|
||||
remprofile=$profile
|
||||
fi
|
||||
|
||||
$subdomain -qR < $remprofile > /dev/null
|
||||
$subdomain ${parser_args} -R < $remprofile > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
fatalerror "Unable to remove profile $remoprofile"
|
||||
@@ -553,7 +553,7 @@ fi
|
||||
|
||||
if [ ! -x $subdomain ]
|
||||
then
|
||||
fatalerror "Subdomain parser '$subdomain' is not executable"
|
||||
fatalerror "AppArmor parser '$subdomain' is not executable"
|
||||
fi
|
||||
|
||||
profileloaded=0
|
||||
|
@@ -1,8 +1,11 @@
|
||||
# 1. Path to subdomain parser
|
||||
# 1. Path to apparmor parser
|
||||
subdomain=/sbin/apparmor_parser
|
||||
#subdomain=/home/steve/svn/immunix/SubDomain/parser/subdomain_parser
|
||||
#subdomain=/home/tonyj/subdomain_parser
|
||||
|
||||
# 2. directory to be used for temp files
|
||||
# 2. additional arguments to the apparmor parser
|
||||
parser_args=-q
|
||||
|
||||
# 3. directory to be used for temp files
|
||||
# Need to be able to access this directory by the root and nobody users.
|
||||
tmpdir=/tmp/sdtest.$$-$RANDOM
|
||||
|
Reference in New Issue
Block a user