Revision 72cf2d4f acl.c
b/acl.c | ||
---|---|---|
64 | 64 |
acl->defaultDeny = 1; |
65 | 65 |
|
66 | 66 |
acl->nentries = 0; |
67 |
TAILQ_INIT(&acl->entries); |
|
67 |
QTAILQ_INIT(&acl->entries);
|
|
68 | 68 |
|
69 | 69 |
acls = qemu_realloc(acls, sizeof(*acls) * (nacls +1)); |
70 | 70 |
acls[nacls] = acl; |
... | ... | |
78 | 78 |
{ |
79 | 79 |
qemu_acl_entry *entry; |
80 | 80 |
|
81 |
TAILQ_FOREACH(entry, &acl->entries, next) { |
|
81 |
QTAILQ_FOREACH(entry, &acl->entries, next) {
|
|
82 | 82 |
#ifdef CONFIG_FNMATCH |
83 | 83 |
if (fnmatch(entry->match, party, 0) == 0) |
84 | 84 |
return entry->deny ? 0 : 1; |
... | ... | |
102 | 102 |
* of "open access" while the user re-initializes the |
103 | 103 |
* access control list */ |
104 | 104 |
acl->defaultDeny = 1; |
105 |
TAILQ_FOREACH(entry, &acl->entries, next) { |
|
106 |
TAILQ_REMOVE(&acl->entries, entry, next); |
|
105 |
QTAILQ_FOREACH(entry, &acl->entries, next) {
|
|
106 |
QTAILQ_REMOVE(&acl->entries, entry, next);
|
|
107 | 107 |
free(entry->match); |
108 | 108 |
free(entry); |
109 | 109 |
} |
... | ... | |
121 | 121 |
entry->match = qemu_strdup(match); |
122 | 122 |
entry->deny = deny; |
123 | 123 |
|
124 |
TAILQ_INSERT_TAIL(&acl->entries, entry, next); |
|
124 |
QTAILQ_INSERT_TAIL(&acl->entries, entry, next);
|
|
125 | 125 |
acl->nentries++; |
126 | 126 |
|
127 | 127 |
return acl->nentries; |
... | ... | |
147 | 147 |
entry->match = qemu_strdup(match); |
148 | 148 |
entry->deny = deny; |
149 | 149 |
|
150 |
TAILQ_FOREACH(tmp, &acl->entries, next) { |
|
150 |
QTAILQ_FOREACH(tmp, &acl->entries, next) {
|
|
151 | 151 |
i++; |
152 | 152 |
if (i == index) { |
153 |
TAILQ_INSERT_BEFORE(tmp, entry, next); |
|
153 |
QTAILQ_INSERT_BEFORE(tmp, entry, next);
|
|
154 | 154 |
acl->nentries++; |
155 | 155 |
break; |
156 | 156 |
} |
... | ... | |
165 | 165 |
qemu_acl_entry *entry; |
166 | 166 |
int i = 0; |
167 | 167 |
|
168 |
TAILQ_FOREACH(entry, &acl->entries, next) { |
|
168 |
QTAILQ_FOREACH(entry, &acl->entries, next) {
|
|
169 | 169 |
i++; |
170 | 170 |
if (strcmp(entry->match, match) == 0) { |
171 |
TAILQ_REMOVE(&acl->entries, entry, next); |
|
171 |
QTAILQ_REMOVE(&acl->entries, entry, next);
|
|
172 | 172 |
return i; |
173 | 173 |
} |
174 | 174 |
} |
Also available in: Unified diff