Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17911
b: refs/heads/master
c: e16885c
h: refs/heads/master
i:
  17909: 1d23768
  17907: 0c8812c
  17903: fe1b517
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Jan 12, 2006
1 parent 6f724b7 commit 3d974df
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 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: a9fad4cc3975573a359a92ad047f5995d8391631
refs/heads/master: e16885c5ad624a6efe1b1bf764e075d75f65a788
13 changes: 1 addition & 12 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -1113,19 +1113,8 @@ static inline int sas_ss_flags(unsigned long sp)
}


#ifdef CONFIG_SECURITY
/* code is in security.c */
/* code is in security.c or kernel/sys.c if !SECURITY */
extern int capable(int cap);
#else
static inline int capable(int cap)
{
if (cap_raised(current->cap_effective, cap)) {
current->flags |= PF_SUPERPRIV;
return 1;
}
return 0;
}
#endif

/*
* Routines for handling mm_structs
Expand Down
12 changes: 12 additions & 0 deletions trunk/kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,18 @@ int unregister_reboot_notifier(struct notifier_block * nb)

EXPORT_SYMBOL(unregister_reboot_notifier);

#ifndef CONFIG_SECURITY
int capable(int cap)
{
if (cap_raised(current->cap_effective, cap)) {
current->flags |= PF_SUPERPRIV;
return 1;
}
return 0;
}
EXPORT_SYMBOL(capable);
#endif

static int set_one_prio(struct task_struct *p, int niceval, int error)
{
int no_nice;
Expand Down

0 comments on commit 3d974df

Please sign in to comment.