projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[NETLINK]: Encapsulate eff_cap usage within security framework.
[deliverable/linux.git]
/
include
/
linux
/
security.h
diff --git
a/include/linux/security.h
b/include/linux/security.h
index d2c17bd91a29251b84e20b0e8bf6f20a6dee108b..c7ea15716dce5cdcc5c293c120471a99248fa669 100644
(file)
--- a/
include/linux/security.h
+++ b/
include/linux/security.h
@@
-67,7
+67,7
@@
struct xfrm_state;
struct xfrm_user_sec_ctx;
extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb);
struct xfrm_user_sec_ctx;
extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb);
-extern int cap_netlink_recv(struct sk_buff *skb);
+extern int cap_netlink_recv(struct sk_buff *skb
, int cap
);
/*
* Values used in the task_security_ops calls
/*
* Values used in the task_security_ops calls
@@
-656,6
+656,7
@@
struct swap_info_struct;
* Check permission before processing the received netlink message in
* @skb.
* @skb contains the sk_buff structure for the netlink message.
* Check permission before processing the received netlink message in
* @skb.
* @skb contains the sk_buff structure for the netlink message.
+ * @cap indicates the capability required
* Return 0 if permission is granted.
*
* Security hooks for Unix domain networking.
* Return 0 if permission is granted.
*
* Security hooks for Unix domain networking.
@@
-862,6
+863,7
@@
struct swap_info_struct;
* Permit allocation of a key and assign security data. Note that key does
* not have a serial number assigned at this point.
* @key points to the key.
* Permit allocation of a key and assign security data. Note that key does
* not have a serial number assigned at this point.
* @key points to the key.
+ * @flags is the allocation flags
* Return 0 if permission is granted, -ve error otherwise.
* @key_free:
* Notification of destruction; free security data.
* Return 0 if permission is granted, -ve error otherwise.
* @key_free:
* Notification of destruction; free security data.
@@
-1265,7
+1267,7
@@
struct security_operations {
struct sembuf * sops, unsigned nsops, int alter);
int (*netlink_send) (struct sock * sk, struct sk_buff * skb);
struct sembuf * sops, unsigned nsops, int alter);
int (*netlink_send) (struct sock * sk, struct sk_buff * skb);
- int (*netlink_recv) (struct sk_buff * skb);
+ int (*netlink_recv) (struct sk_buff * skb
, int cap
);
/* allow module stacking */
int (*register_security) (const char *name,
/* allow module stacking */
int (*register_security) (const char *name,
@@
-1324,7
+1326,7
@@
struct security_operations {
/* key management security hooks */
#ifdef CONFIG_KEYS
/* key management security hooks */
#ifdef CONFIG_KEYS
- int (*key_alloc)(struct key *key, struct task_struct *tsk);
+ int (*key_alloc)(struct key *key, struct task_struct *tsk
, unsigned long flags
);
void (*key_free)(struct key *key);
int (*key_permission)(key_ref_t key_ref,
struct task_struct *context,
void (*key_free)(struct key *key);
int (*key_permission)(key_ref_t key_ref,
struct task_struct *context,
@@
-2031,9
+2033,9
@@
static inline int security_netlink_send(struct sock *sk, struct sk_buff * skb)
return security_ops->netlink_send(sk, skb);
}
return security_ops->netlink_send(sk, skb);
}
-static inline int security_netlink_recv(struct sk_buff * skb)
+static inline int security_netlink_recv(struct sk_buff * skb
, int cap
)
{
{
- return security_ops->netlink_recv(skb);
+ return security_ops->netlink_recv(skb
, cap
);
}
/* prototypes */
}
/* prototypes */
@@
-2669,9
+2671,9
@@
static inline int security_netlink_send (struct sock *sk, struct sk_buff *skb)
return cap_netlink_send (sk, skb);
}
return cap_netlink_send (sk, skb);
}
-static inline int security_netlink_recv (struct sk_buff *skb)
+static inline int security_netlink_recv (struct sk_buff *skb
, int cap
)
{
{
- return cap_netlink_recv (skb);
+ return cap_netlink_recv (skb
, cap
);
}
static inline struct dentry *securityfs_create_dir(const char *name,
}
static inline struct dentry *securityfs_create_dir(const char *name,
@@
-3040,9
+3042,10
@@
static inline int security_xfrm_policy_lookup(struct xfrm_policy *xp, u32 sk_sid
#ifdef CONFIG_KEYS
#ifdef CONFIG_SECURITY
static inline int security_key_alloc(struct key *key,
#ifdef CONFIG_KEYS
#ifdef CONFIG_SECURITY
static inline int security_key_alloc(struct key *key,
- struct task_struct *tsk)
+ struct task_struct *tsk,
+ unsigned long flags)
{
{
- return security_ops->key_alloc(key, tsk);
+ return security_ops->key_alloc(key, tsk
, flags
);
}
static inline void security_key_free(struct key *key)
}
static inline void security_key_free(struct key *key)
@@
-3060,7
+3063,8
@@
static inline int security_key_permission(key_ref_t key_ref,
#else
static inline int security_key_alloc(struct key *key,
#else
static inline int security_key_alloc(struct key *key,
- struct task_struct *tsk)
+ struct task_struct *tsk,
+ unsigned long flags)
{
return 0;
}
{
return 0;
}
This page took
0.028928 seconds
and
5
git commands to generate.