mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
security: Add hooks to rule on setting a watch
Add security hooks that will allow an LSM to rule on whether or not a watch may be set. More than one hook is required as the watches watch different types of object. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: James Morris <jamorris@linux.microsoft.com> cc: Casey Schaufler <casey@schaufler-ca.com> cc: Stephen Smalley <sds@tycho.nsa.gov> cc: linux-security-module@vger.kernel.org
This commit is contained in:
parent
c73be61ced
commit
998f50407f
4 changed files with 25 additions and 0 deletions
|
@ -1290,6 +1290,15 @@ static inline int security_post_notification(const struct cred *w_cred,
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SECURITY) && defined(CONFIG_KEY_NOTIFICATIONS)
|
||||
int security_watch_key(struct key *key);
|
||||
#else
|
||||
static inline int security_watch_key(struct key *key)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SECURITY_NETWORK
|
||||
|
||||
int security_unix_stream_connect(struct sock *sock, struct sock *other, struct sock *newsk);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue