Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285030
b: refs/heads/master
c: b7e724d
h: refs/heads/master
v: v3
  • Loading branch information
Eric Paris committed Jan 5, 2012
1 parent 02d7fde commit e4be59e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 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: 6a9de49115d5ff9871d953af1a5c8249e1585731
refs/heads/master: b7e724d303b684655e4ca3dabd5a6840ad19012d
2 changes: 1 addition & 1 deletion trunk/drivers/pci/pci-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ pci_read_config(struct file *filp, struct kobject *kobj,
u8 *data = (u8*) buf;

/* Several chips lock up trying to read undefined config space */
if (security_capable(&init_user_ns, filp->f_cred, CAP_SYS_ADMIN) == 0) {
if (security_capable(filp->f_cred, &init_user_ns, CAP_SYS_ADMIN) == 0) {
size = dev->cfg_size;
} else if (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) {
size = 128;
Expand Down
6 changes: 3 additions & 3 deletions trunk/include/linux/security.h
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,7 @@ int security_capset(struct cred *new, const struct cred *old,
const kernel_cap_t *effective,
const kernel_cap_t *inheritable,
const kernel_cap_t *permitted);
int security_capable(struct user_namespace *ns, const struct cred *cred,
int security_capable(const struct cred *cred, struct user_namespace *ns,
int cap);
int security_real_capable(struct task_struct *tsk, struct user_namespace *ns,
int cap);
Expand Down Expand Up @@ -1863,8 +1863,8 @@ static inline int security_capset(struct cred *new,
return cap_capset(new, old, effective, inheritable, permitted);
}

static inline int security_capable(struct user_namespace *ns,
const struct cred *cred, int cap)
static inline int security_capable(const struct cred *cred,
struct user_namespace *ns, int cap)
{
return cap_capable(cred, ns, cap, SECURITY_CAP_AUDIT);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/capability.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ bool ns_capable(struct user_namespace *ns, int cap)
BUG();
}

if (security_capable(ns, current_cred(), cap) == 0) {
if (security_capable(current_cred(), ns, cap) == 0) {
current->flags |= PF_SUPERPRIV;
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/security/security.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int security_capset(struct cred *new, const struct cred *old,
effective, inheritable, permitted);
}

int security_capable(struct user_namespace *ns, const struct cred *cred,
int security_capable(const struct cred *cred, struct user_namespace *ns,
int cap)
{
return security_ops->capable(cred, ns, cap, SECURITY_CAP_AUDIT);
Expand Down

0 comments on commit e4be59e

Please sign in to comment.