diff options
author | Randy.Dunlap <rdunlap@xenotime.net> | 2006-01-11 15:17:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 21:42:13 -0500 |
commit | c59ede7b78db329949d9cdcd7064e22d357560ef (patch) | |
tree | f9dc9d464fdad5bfd464d983e77c1af031389dda /include/linux | |
parent | e16885c5ad624a6efe1b1bf764e075d75f65a788 (diff) |
[PATCH] move capable() to capability.h
- Move capable() from sched.h to capability.h;
- Use <linux/capability.h> where capable() is used
(in include/, block/, ipc/, kernel/, a few drivers/,
mm/, security/, & sound/;
many more drivers/ to go)
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/capability.h | 3 | ||||
-rw-r--r-- | include/linux/mm.h | 1 | ||||
-rw-r--r-- | include/linux/sched.h | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h index 6b4618902d3d..5a23ce752629 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -43,6 +43,7 @@ typedef struct __user_cap_data_struct { | |||
43 | #ifdef __KERNEL__ | 43 | #ifdef __KERNEL__ |
44 | 44 | ||
45 | #include <linux/spinlock.h> | 45 | #include <linux/spinlock.h> |
46 | #include <asm/current.h> | ||
46 | 47 | ||
47 | /* #define STRICT_CAP_T_TYPECHECKS */ | 48 | /* #define STRICT_CAP_T_TYPECHECKS */ |
48 | 49 | ||
@@ -356,6 +357,8 @@ static inline kernel_cap_t cap_invert(kernel_cap_t c) | |||
356 | 357 | ||
357 | #define cap_is_fs_cap(c) (CAP_TO_MASK(c) & CAP_FS_MASK) | 358 | #define cap_is_fs_cap(c) (CAP_TO_MASK(c) & CAP_FS_MASK) |
358 | 359 | ||
360 | extern int capable(int cap); | ||
361 | |||
359 | #endif /* __KERNEL__ */ | 362 | #endif /* __KERNEL__ */ |
360 | 363 | ||
361 | #endif /* !_LINUX_CAPABILITY_H */ | 364 | #endif /* !_LINUX_CAPABILITY_H */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index e53d2c6fd5f4..c643016499a1 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
5 | #include <linux/errno.h> | 5 | #include <linux/errno.h> |
6 | #include <linux/capability.h> | ||
6 | 7 | ||
7 | #ifdef __KERNEL__ | 8 | #ifdef __KERNEL__ |
8 | 9 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 2ae8711bfba1..3b74c4bf2934 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1112,10 +1112,6 @@ static inline int sas_ss_flags(unsigned long sp) | |||
1112 | : on_sig_stack(sp) ? SS_ONSTACK : 0); | 1112 | : on_sig_stack(sp) ? SS_ONSTACK : 0); |
1113 | } | 1113 | } |
1114 | 1114 | ||
1115 | |||
1116 | /* code is in security.c or kernel/sys.c if !SECURITY */ | ||
1117 | extern int capable(int cap); | ||
1118 | |||
1119 | /* | 1115 | /* |
1120 | * Routines for handling mm_structs | 1116 | * Routines for handling mm_structs |
1121 | */ | 1117 | */ |