Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120653
b: refs/heads/master
c: 637d32d
h: refs/heads/master
i:
  120651: f19ddaa
v: v3
  • Loading branch information
Eric Paris authored and James Morris committed Nov 11, 2008
1 parent e8d9377 commit e5bc209
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e68b75a027bb94066576139ee33676264f867b87
refs/heads/master: 637d32dc720897616e8a1a4f9e9609e29d431800
5 changes: 5 additions & 0 deletions trunk/kernel/capability.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,11 @@ asmlinkage long sys_capset(cap_user_header_t header, const cap_user_data_t data)
*/
int capable(int cap)
{
if (unlikely(!cap_valid(cap))) {
printk(KERN_CRIT "capable() called with invalid cap=%u\n", cap);
BUG();
}

if (has_capability(current, cap)) {
current->flags |= PF_SUPERPRIV;
return 1;
Expand Down

0 comments on commit e5bc209

Please sign in to comment.