mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 22:35:35 +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" ]
|
if [ "$retaintmpdir" = "true" ]
|
||||||
then
|
then
|
||||||
runfile=$tmpdir/runtest
|
runfile=$tmpdir/runtest
|
||||||
echo "$subdomain < $profile" > $runfile
|
echo "$subdomain ${parser_args} < $profile" > $runfile
|
||||||
echo "$testexec \"$@\" 2>&1 > $outfile" >> $runfile
|
echo "$testexec \"$@\" 2>&1 > $outfile" >> $runfile
|
||||||
echo "echo $testname: \`cat $outfile\`" >> $runfile
|
echo "echo $testname: \`cat $outfile\`" >> $runfile
|
||||||
echo "$subdomain -R < $profile" >> $runfile
|
echo "$subdomain ${parser_args} -R < $profile" >> $runfile
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -429,7 +429,7 @@ loadprofile()
|
|||||||
{
|
{
|
||||||
#global complainflaf profile profileloaded
|
#global complainflaf profile profileloaded
|
||||||
|
|
||||||
$subdomain -q $complainflag < $profile > /dev/null
|
$subdomain ${parser_args} $complainflag < $profile > /dev/null
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
removeprofile
|
removeprofile
|
||||||
@@ -443,7 +443,7 @@ replaceprofile()
|
|||||||
{
|
{
|
||||||
#global complainflag profile
|
#global complainflag profile
|
||||||
|
|
||||||
$subdomain -qr $complainflag < $profile > /dev/null
|
$subdomain ${parser_args} -r $complainflag < $profile > /dev/null
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
fatalerror "Unable to replace profile"
|
fatalerror "Unable to replace profile"
|
||||||
@@ -462,7 +462,7 @@ removeprofile()
|
|||||||
remprofile=$profile
|
remprofile=$profile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$subdomain -qR < $remprofile > /dev/null
|
$subdomain ${parser_args} -R < $remprofile > /dev/null
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
fatalerror "Unable to remove profile $remoprofile"
|
fatalerror "Unable to remove profile $remoprofile"
|
||||||
@@ -553,7 +553,7 @@ fi
|
|||||||
|
|
||||||
if [ ! -x $subdomain ]
|
if [ ! -x $subdomain ]
|
||||||
then
|
then
|
||||||
fatalerror "Subdomain parser '$subdomain' is not executable"
|
fatalerror "AppArmor parser '$subdomain' is not executable"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
profileloaded=0
|
profileloaded=0
|
||||||
|
@@ -1,8 +1,11 @@
|
|||||||
# 1. Path to subdomain parser
|
# 1. Path to apparmor parser
|
||||||
subdomain=/sbin/apparmor_parser
|
subdomain=/sbin/apparmor_parser
|
||||||
#subdomain=/home/steve/svn/immunix/SubDomain/parser/subdomain_parser
|
#subdomain=/home/steve/svn/immunix/SubDomain/parser/subdomain_parser
|
||||||
#subdomain=/home/tonyj/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.
|
# Need to be able to access this directory by the root and nobody users.
|
||||||
tmpdir=/tmp/sdtest.$$-$RANDOM
|
tmpdir=/tmp/sdtest.$$-$RANDOM
|
||||||
|
Reference in New Issue
Block a user