2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-22 10:07:12 +00:00

recommit namespace update to use :namespace:

This commit is contained in:
John Johansen 2008-04-06 18:53:59 +00:00
parent c460dcc52f
commit d4c9f0ad0c
5 changed files with 16 additions and 19 deletions

View File

@ -194,25 +194,22 @@ profile: TOK_ID flags TOK_OPEN rules TOK_CLOSE
$$ = 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;
PDEBUG("Matched: id (%s:%s) open rules close\n", $1, $3);
struct codomain *cod = $7;
PDEBUG("Matched: id (%s:%s) open rules close\n", $2, $4);
if (!cod) {
yyerror(_("Memory allocation error."));
}
if ($3[0] != '/')
yyerror(_("Profile names must begin with a '/'."));
cod->namespace = $1;
cod->name = $3;
cod->flags = $4;
cod->namespace = $2;
cod->name = $4;
cod->flags = $5;
if (force_complain)
cod->flags = force_complain_flags;
PDEBUG("%s: flags='%s%s'\n",
$1,
$2,
cod->flags.complain ? "complain, " : "",
cod->flags.audit ? "audit" : "");
@ -814,11 +811,11 @@ change_profile: TOK_CHANGE_PROFILE TOK_ID TOK_END_OF_RULE
$$ = 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;
PDEBUG("Matched change_profile: tok_id (%s:%s)\n", $2, $4);
entry = new_entry($2, $4, AA_CHANGE_PROFILE, NULL);
PDEBUG("Matched change_profile: tok_id (%s:%s)\n", $3, $5);
entry = new_entry($3, $5, AA_CHANGE_PROFILE, NULL);
if (!entry)
yyerror(_("Memory allocation error."));
PDEBUG("change_profile.entry: (%s)\n", entry->name);

View File

@ -5,7 +5,7 @@
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
#
foo:/does/not/exist {
:foo:/exists {
#include <includes/base>
/usr/X11R6/lib/lib*so* rrr,
@ -17,7 +17,7 @@ foo:/does/not/exist {
/bin/echo uxuxuxuxux,
}
foo:/does/not/exist {
:foo:/exists {
#include <includes/base>
/usr/X11R6/lib/lib*so* rrr,

View File

@ -5,7 +5,7 @@
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
#
foo:/does/not/exist {
:foo:/does/not/exist {
#include <includes/base>
/usr/X11R6/lib/lib*so* rrr,

View File

@ -14,7 +14,7 @@
/bin/ls ixixixix,
}
foo:/does/not/exist {
:foo:/does/not/exist {
/usr/X11R6/lib/lib*so* rrr,
/does/not/exist r,
/var/log/messages www,
@ -23,7 +23,7 @@ foo:/does/not/exist {
/bin/ls ixixixix,
}
bar:/does/not/exist {
:bar:/does/not/exist {
/usr/X11R6/lib/lib*so* rrr,
/does/not/exist r,
/var/log/messages www,

View File

@ -3,5 +3,5 @@
#=EXRESULT PASS
#
/usr/bin/foo {
change_profile foo:/bin/foo,
change_profile :foo:/bin/foo,
}