Allow for profiles without attachment, ie. they don't begin with /

currently profile names can not collide with file modes nor with
keywords
This commit is contained in:
John Johansen 2008-04-05 05:47:49 +00:00
parent bbd31c70a1
commit 5f5aeee472
2 changed files with 3 additions and 0 deletions

View file

@ -81,6 +81,7 @@
#define AA_EXEC_INHERIT (AA_EXEC_MOD_1) #define AA_EXEC_INHERIT (AA_EXEC_MOD_1)
#define AA_EXEC_PROFILE (AA_EXEC_MOD_0 | AA_EXEC_MOD_1) #define AA_EXEC_PROFILE (AA_EXEC_MOD_0 | AA_EXEC_MOD_1)
#define AA_EXEC_PROFILE_OR_INHERIT (AA_EXEC_MOD_2) #define AA_EXEC_PROFILE_OR_INHERIT (AA_EXEC_MOD_2)
#define AA_EXEC_LOCAL (AA_EXEC_MOD_2 | AA_EXEC_MOD_0)
#define AA_VALID_PERMS (AA_FILE_PERMS | AA_CHANGE_PROFILE) #define AA_VALID_PERMS (AA_FILE_PERMS | AA_CHANGE_PROFILE)

View file

@ -178,8 +178,10 @@ profile: TOK_ID flags TOK_OPEN rules TOK_CLOSE
yyerror(_("Memory allocation error.")); yyerror(_("Memory allocation error."));
} }
/*
if ($1[0] != '/') if ($1[0] != '/')
yyerror(_("Profile names must begin with a '/'.")); yyerror(_("Profile names must begin with a '/'."));
*/
cod->name = $1; cod->name = $1;
cod->flags = $2; cod->flags = $2;