Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
permission.c File Reference
#include <linux/module.h>
#include <linux/security.h>
#include "internal.h"

Go to the source code of this file.

Functions

int key_task_permission (const key_ref_t key_ref, const struct cred *cred, key_perm_t perm)
 
 EXPORT_SYMBOL (key_task_permission)
 
int key_validate (const struct key *key)
 
 EXPORT_SYMBOL (key_validate)
 

Function Documentation

EXPORT_SYMBOL ( key_task_permission  )
EXPORT_SYMBOL ( key_validate  )
int key_task_permission ( const key_ref_t  key_ref,
const struct cred cred,
key_perm_t  perm 
)

key_task_permission - Check a key can be used : The key to check. : The credentials to use. : The permissions to check for.

Check to see whether permission is granted to use a key in the desired way, but permit the security modules to override.

The caller must hold either a ref on cred or must hold the RCU readlock.

Returns 0 if successful, -EACCES if access is denied based on the permissions bits or the LSM check.

Definition at line 30 of file permission.c.

int key_validate ( const struct key key)

key_validate - Validate a key. : The key to be validated.

Check that a key is valid, returning 0 if the key is okay, -ENOKEY if the key is invalidated, -EKEYREVOKED if the key's type has been removed or if the key has been revoked or -EKEYEXPIRED if the key has expired.

Definition at line 89 of file permission.c.