2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

parser: Convert af_unix rules to support addr= rather than path=

This patch converts the path= modifier to the af_unix rules to use
addr= instead.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
This commit is contained in:
Steve Beattie
2014-09-03 14:02:25 -07:00
parent 5b46e3b334
commit e85777a57c
13 changed files with 72 additions and 70 deletions

View File

@@ -31,8 +31,8 @@ class unix_rule: public af_rule {
void move_peer_conditionals(struct cond_entry *conds);
void downgrade_rule(Profile &prof);
public:
char *path;
char *peer_path;
char *addr;
char *peer_addr;
int mode;
int audit;
bool deny;
@@ -42,12 +42,12 @@ public:
struct cond_entry *peer_conds);
virtual ~unix_rule()
{
free(path);
free(peer_path);
free(addr);
free(peer_addr);
};
virtual bool has_peer_conds(void) {
return af_rule::has_peer_conds() || peer_path;
return af_rule::has_peer_conds() || peer_addr;
}
virtual ostream &dump_local(ostream &os);