Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252088
b: refs/heads/master
c: f01e1af
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed May 27, 2011
1 parent 54a516d commit 8f7c96c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 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: bc9bc72e2f9bb07384c00604d1a40d0b5f62be6c
refs/heads/master: f01e1af445fac107e91d62a2d59dd535f633810b
12 changes: 2 additions & 10 deletions trunk/security/selinux/avc.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,10 +752,9 @@ int avc_ss_reset(u32 seqno)
int avc_has_perm_noaudit(u32 ssid, u32 tsid,
u16 tclass, u32 requested,
unsigned flags,
struct av_decision *in_avd)
struct av_decision *avd)
{
struct avc_node *node;
struct av_decision avd_entry, *avd;
int rc = 0;
u32 denied;

Expand All @@ -766,18 +765,11 @@ int avc_has_perm_noaudit(u32 ssid, u32 tsid,
node = avc_lookup(ssid, tsid, tclass);
if (unlikely(!node)) {
rcu_read_unlock();

if (in_avd)
avd = in_avd;
else
avd = &avd_entry;

security_compute_av(ssid, tsid, tclass, avd);
rcu_read_lock();
node = avc_insert(ssid, tsid, tclass, avd);
} else {
if (in_avd)
memcpy(in_avd, &node->ae.avd, sizeof(*in_avd));
memcpy(avd, &node->ae.avd, sizeof(*avd));
avd = &node->ae.avd;
}

Expand Down
3 changes: 2 additions & 1 deletion trunk/security/selinux/ss/services.c
Original file line number Diff line number Diff line change
Expand Up @@ -2217,10 +2217,11 @@ int security_get_user_sids(u32 fromsid,
goto out;
}
for (i = 0, j = 0; i < mynel; i++) {
struct av_decision dummy_avd;
rc = avc_has_perm_noaudit(fromsid, mysids[i],
SECCLASS_PROCESS, /* kernel value */
PROCESS__TRANSITION, AVC_STRICT,
NULL);
&dummy_avd);
if (!rc)
mysids2[j++] = mysids[i];
cond_resched();
Expand Down

0 comments on commit 8f7c96c

Please sign in to comment.