Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169156
b: refs/heads/master
c: b7f3008
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Smalley authored and James Morris committed Oct 20, 2009
1 parent 65193df commit c7dfa88
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 825332e4ff1373c55d931b49408df7ec2298f71e
refs/heads/master: b7f3008ad1d795935551e4dd810b0255a7bfa3c9
10 changes: 7 additions & 3 deletions trunk/security/selinux/ss/services.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,19 +935,22 @@ int security_compute_av(u32 ssid,
u32 requested;
int rc;

read_lock(&policy_rwlock);

if (!ss_initialized)
goto allow;

read_lock(&policy_rwlock);
requested = unmap_perm(orig_tclass, orig_requested);
tclass = unmap_class(orig_tclass);
if (unlikely(orig_tclass && !tclass)) {
if (policydb.allow_unknown)
goto allow;
return -EINVAL;
rc = -EINVAL;
goto out;
}
rc = security_compute_av_core(ssid, tsid, tclass, requested, avd);
map_decision(orig_tclass, avd, policydb.allow_unknown);
out:
read_unlock(&policy_rwlock);
return rc;
allow:
Expand All @@ -956,7 +959,8 @@ int security_compute_av(u32 ssid,
avd->auditdeny = 0xffffffff;
avd->seqno = latest_granting;
avd->flags = 0;
return 0;
rc = 0;
goto out;
}

int security_compute_av_user(u32 ssid,
Expand Down

0 comments on commit c7dfa88

Please sign in to comment.