Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132624
b: refs/heads/master
c: a5dda68
h: refs/heads/master
v: v3
  • Loading branch information
Eric Paris authored and James Morris committed Feb 13, 2009
1 parent 69a2550 commit 38c19b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4cb912f1d1447077160ace9ce3b3a10696dd74e5
refs/heads/master: a5dda683328f99c781f92c66cc52ffc0639bef58
9 changes: 6 additions & 3 deletions trunk/security/selinux/avc.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,13 +742,15 @@ static inline int avc_sidcmp(u32 x, u32 y)
* @event : Updating event
* @perms : Permission mask bits
* @ssid,@tsid,@tclass : identifier of an AVC entry
* @seqno : sequence number when decision was made
*
* if a valid AVC entry doesn't exist,this function returns -ENOENT.
* if kmalloc() called internal returns NULL, this function returns -ENOMEM.
* otherwise, this function update the AVC entry. The original AVC-entry object
* will release later by RCU.
*/
static int avc_update_node(u32 event, u32 perms, u32 ssid, u32 tsid, u16 tclass)
static int avc_update_node(u32 event, u32 perms, u32 ssid, u32 tsid, u16 tclass,
u32 seqno)
{
int hvalue, rc = 0;
unsigned long flag;
Expand All @@ -767,7 +769,8 @@ static int avc_update_node(u32 event, u32 perms, u32 ssid, u32 tsid, u16 tclass)
list_for_each_entry(pos, &avc_cache.slots[hvalue], list) {
if (ssid == pos->ae.ssid &&
tsid == pos->ae.tsid &&
tclass == pos->ae.tclass){
tclass == pos->ae.tclass &&
seqno == pos->ae.avd.seqno){
orig = pos;
break;
}
Expand Down Expand Up @@ -908,7 +911,7 @@ int avc_has_perm_noaudit(u32 ssid, u32 tsid,
rc = -EACCES;
else if (!selinux_enforcing || security_permissive_sid(ssid))
avc_update_node(AVC_CALLBACK_GRANT, requested, ssid,
tsid, tclass);
tsid, tclass, p_ae->avd.seqno);
else
rc = -EACCES;
}
Expand Down

0 comments on commit 38c19b3

Please sign in to comment.