mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 18:17:09 +00:00
recommit namespace update to use :namespace:
This commit is contained in:
parent
c460dcc52f
commit
d4c9f0ad0c
@ -194,25 +194,22 @@ profile: TOK_ID flags TOK_OPEN rules TOK_CLOSE
|
|||||||
$$ = cod;
|
$$ = cod;
|
||||||
};
|
};
|
||||||
|
|
||||||
profile: TOK_ID TOK_COLON TOK_ID flags TOK_OPEN rules TOK_CLOSE
|
profile: TOK_COLON TOK_ID TOK_COLON TOK_ID flags TOK_OPEN rules TOK_CLOSE
|
||||||
{
|
{
|
||||||
struct codomain *cod = $6;
|
struct codomain *cod = $7;
|
||||||
PDEBUG("Matched: id (%s:%s) open rules close\n", $1, $3);
|
PDEBUG("Matched: id (%s:%s) open rules close\n", $2, $4);
|
||||||
if (!cod) {
|
if (!cod) {
|
||||||
yyerror(_("Memory allocation error."));
|
yyerror(_("Memory allocation error."));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($3[0] != '/')
|
cod->namespace = $2;
|
||||||
yyerror(_("Profile names must begin with a '/'."));
|
cod->name = $4;
|
||||||
|
cod->flags = $5;
|
||||||
cod->namespace = $1;
|
|
||||||
cod->name = $3;
|
|
||||||
cod->flags = $4;
|
|
||||||
if (force_complain)
|
if (force_complain)
|
||||||
cod->flags = force_complain_flags;
|
cod->flags = force_complain_flags;
|
||||||
|
|
||||||
PDEBUG("%s: flags='%s%s'\n",
|
PDEBUG("%s: flags='%s%s'\n",
|
||||||
$1,
|
$2,
|
||||||
cod->flags.complain ? "complain, " : "",
|
cod->flags.complain ? "complain, " : "",
|
||||||
cod->flags.audit ? "audit" : "");
|
cod->flags.audit ? "audit" : "");
|
||||||
|
|
||||||
@ -814,11 +811,11 @@ change_profile: TOK_CHANGE_PROFILE TOK_ID TOK_END_OF_RULE
|
|||||||
$$ = entry;
|
$$ = entry;
|
||||||
};
|
};
|
||||||
|
|
||||||
change_profile: TOK_CHANGE_PROFILE TOK_ID TOK_COLON TOK_ID TOK_END_OF_RULE
|
change_profile: TOK_CHANGE_PROFILE TOK_COLON TOK_ID TOK_COLON TOK_ID TOK_END_OF_RULE
|
||||||
{
|
{
|
||||||
struct cod_entry *entry;
|
struct cod_entry *entry;
|
||||||
PDEBUG("Matched change_profile: tok_id (%s:%s)\n", $2, $4);
|
PDEBUG("Matched change_profile: tok_id (%s:%s)\n", $3, $5);
|
||||||
entry = new_entry($2, $4, AA_CHANGE_PROFILE, NULL);
|
entry = new_entry($3, $5, AA_CHANGE_PROFILE, NULL);
|
||||||
if (!entry)
|
if (!entry)
|
||||||
yyerror(_("Memory allocation error."));
|
yyerror(_("Memory allocation error."));
|
||||||
PDEBUG("change_profile.entry: (%s)\n", entry->name);
|
PDEBUG("change_profile.entry: (%s)\n", entry->name);
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# vim:syntax=subdomain
|
# vim:syntax=subdomain
|
||||||
# Last Modified: Sun Apr 17 19:44:44 2005
|
# Last Modified: Sun Apr 17 19:44:44 2005
|
||||||
#
|
#
|
||||||
foo:/does/not/exist {
|
:foo:/exists {
|
||||||
#include <includes/base>
|
#include <includes/base>
|
||||||
|
|
||||||
/usr/X11R6/lib/lib*so* rrr,
|
/usr/X11R6/lib/lib*so* rrr,
|
||||||
@ -17,7 +17,7 @@ foo:/does/not/exist {
|
|||||||
/bin/echo uxuxuxuxux,
|
/bin/echo uxuxuxuxux,
|
||||||
}
|
}
|
||||||
|
|
||||||
foo:/does/not/exist {
|
:foo:/exists {
|
||||||
#include <includes/base>
|
#include <includes/base>
|
||||||
|
|
||||||
/usr/X11R6/lib/lib*so* rrr,
|
/usr/X11R6/lib/lib*so* rrr,
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# vim:syntax=subdomain
|
# vim:syntax=subdomain
|
||||||
# Last Modified: Sun Apr 17 19:44:44 2005
|
# Last Modified: Sun Apr 17 19:44:44 2005
|
||||||
#
|
#
|
||||||
foo:/does/not/exist {
|
:foo:/does/not/exist {
|
||||||
#include <includes/base>
|
#include <includes/base>
|
||||||
|
|
||||||
/usr/X11R6/lib/lib*so* rrr,
|
/usr/X11R6/lib/lib*so* rrr,
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
/bin/ls ixixixix,
|
/bin/ls ixixixix,
|
||||||
}
|
}
|
||||||
|
|
||||||
foo:/does/not/exist {
|
:foo:/does/not/exist {
|
||||||
/usr/X11R6/lib/lib*so* rrr,
|
/usr/X11R6/lib/lib*so* rrr,
|
||||||
/does/not/exist r,
|
/does/not/exist r,
|
||||||
/var/log/messages www,
|
/var/log/messages www,
|
||||||
@ -23,7 +23,7 @@ foo:/does/not/exist {
|
|||||||
/bin/ls ixixixix,
|
/bin/ls ixixixix,
|
||||||
}
|
}
|
||||||
|
|
||||||
bar:/does/not/exist {
|
:bar:/does/not/exist {
|
||||||
/usr/X11R6/lib/lib*so* rrr,
|
/usr/X11R6/lib/lib*so* rrr,
|
||||||
/does/not/exist r,
|
/does/not/exist r,
|
||||||
/var/log/messages www,
|
/var/log/messages www,
|
||||||
|
@ -3,5 +3,5 @@
|
|||||||
#=EXRESULT PASS
|
#=EXRESULT PASS
|
||||||
#
|
#
|
||||||
/usr/bin/foo {
|
/usr/bin/foo {
|
||||||
change_profile foo:/bin/foo,
|
change_profile :foo:/bin/foo,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user