Skip to contentSkip to conversation

capability.h: extern's make no sense in userspace

PATCH In review Jaswinder Singh Rajput 2 participants 2 messages Jan 13, 2009 Capabilities

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 capability.h: extern's make no sense in userspace

Impact: fix 2 make headers_check warnings:

usr/include/linux/capability.h:72: leaks CONFIG_SECURITY to userspace where it is not valid usr/include/linux/capability.h:73: extern's make no sense in userspace

---
 include/linux/capability.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
include/linux/capability.h +4 -4
index 02bdb76..1b98725 100644
@@ -69,10 +69,6 @@ typedef struct __user_cap_data_struct {
 #define VFS_CAP_U32             VFS_CAP_U32_2
 #define VFS_CAP_REVISION	VFS_CAP_REVISION_2
 
-#ifdef CONFIG_SECURITY_FILE_CAPABILITIES
-extern int file_caps_enabled;
-#endif
-
 struct vfs_cap_data {
 	__le32 magic_etc;            /* Little endian */
 	struct {
@@ -96,6 +92,10 @@ struct vfs_cap_data {
 #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3
 #define _KERNEL_CAPABILITY_U32S    _LINUX_CAPABILITY_U32S_3
 
+#ifdef CONFIG_SECURITY_FILE_CAPABILITIES
+extern int file_caps_enabled;
+#endif
+
 typedef struct kernel_cap_struct {
 	__u32 cap[_KERNEL_CAPABILITY_U32S];
 } kernel_cap_t;
Signature · 1 line
1.5.6.6
Acked-by on v1 1/1
#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Cheers

Andrew

Quoted 26 lines · Jaswinder Singh Rajput

Impact: fix 2 make headers_check warnings:

usr/include/linux/capability.h:72: leaks CONFIG_SECURITY to userspace where it is not valid usr/include/linux/capability.h:73: extern's make no sense in userspace

---
 include/linux/capability.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
include/linux/capability.h +0 -4
index 02bdb76..1b98725 100644
@@ -69,10 +69,6 @@ typedef struct __user_cap_data_struct {
 #define VFS_CAP_U32             VFS_CAP_U32_2
 #define VFS_CAP_REVISION	VFS_CAP_REVISION_2
 
-#ifdef CONFIG_SECURITY_FILE_CAPABILITIES
-extern int file_caps_enabled;
-#endif
-
 struct vfs_cap_data {
 	__le32 magic_etc;            /* Little endian */
 	struct {

include/linux/capability.h struct vfs_cap_data { · line 101

Quoted 10 lines
include/linux/capability.h +4 -0
@@ -96,6 +92,10 @@ struct vfs_cap_data {
 #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3
 #define _KERNEL_CAPABILITY_U32S    _LINUX_CAPABILITY_U32S_3
 
+#ifdef CONFIG_SECURITY_FILE_CAPABILITIES
+extern int file_caps_enabled;
+#endif
+
 typedef struct kernel_cap_struct {
 	__u32 cap[_KERNEL_CAPABILITY_U32S];
 } kernel_cap_t;

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJbEpT+bHCR3gb8jsRAnafAJ9CohxNIoKkQN5k+VEzFGGtIjdOsACcDQ3e B/8spQ/5sSkyGQIN1kK0N9g=
=nkwT
-----END PGP SIGNATURE-----