diff options
Diffstat (limited to 'include/linux/key.h')
-rw-r--r-- | include/linux/key.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/key.h b/include/linux/key.h index f1efa016dbf3..53513a3be53b 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -40,28 +40,32 @@ struct key; | |||
40 | #define KEY_POS_WRITE 0x04000000 /* possessor can update key payload / add link to keyring */ | 40 | #define KEY_POS_WRITE 0x04000000 /* possessor can update key payload / add link to keyring */ |
41 | #define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */ | 41 | #define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */ |
42 | #define KEY_POS_LINK 0x10000000 /* possessor can create a link to a key/keyring */ | 42 | #define KEY_POS_LINK 0x10000000 /* possessor can create a link to a key/keyring */ |
43 | #define KEY_POS_ALL 0x1f000000 | 43 | #define KEY_POS_SETATTR 0x20000000 /* possessor can set key attributes */ |
44 | #define KEY_POS_ALL 0x3f000000 | ||
44 | 45 | ||
45 | #define KEY_USR_VIEW 0x00010000 /* user permissions... */ | 46 | #define KEY_USR_VIEW 0x00010000 /* user permissions... */ |
46 | #define KEY_USR_READ 0x00020000 | 47 | #define KEY_USR_READ 0x00020000 |
47 | #define KEY_USR_WRITE 0x00040000 | 48 | #define KEY_USR_WRITE 0x00040000 |
48 | #define KEY_USR_SEARCH 0x00080000 | 49 | #define KEY_USR_SEARCH 0x00080000 |
49 | #define KEY_USR_LINK 0x00100000 | 50 | #define KEY_USR_LINK 0x00100000 |
50 | #define KEY_USR_ALL 0x001f0000 | 51 | #define KEY_USR_SETATTR 0x00200000 |
52 | #define KEY_USR_ALL 0x003f0000 | ||
51 | 53 | ||
52 | #define KEY_GRP_VIEW 0x00000100 /* group permissions... */ | 54 | #define KEY_GRP_VIEW 0x00000100 /* group permissions... */ |
53 | #define KEY_GRP_READ 0x00000200 | 55 | #define KEY_GRP_READ 0x00000200 |
54 | #define KEY_GRP_WRITE 0x00000400 | 56 | #define KEY_GRP_WRITE 0x00000400 |
55 | #define KEY_GRP_SEARCH 0x00000800 | 57 | #define KEY_GRP_SEARCH 0x00000800 |
56 | #define KEY_GRP_LINK 0x00001000 | 58 | #define KEY_GRP_LINK 0x00001000 |
57 | #define KEY_GRP_ALL 0x00001f00 | 59 | #define KEY_GRP_SETATTR 0x00002000 |
60 | #define KEY_GRP_ALL 0x00003f00 | ||
58 | 61 | ||
59 | #define KEY_OTH_VIEW 0x00000001 /* third party permissions... */ | 62 | #define KEY_OTH_VIEW 0x00000001 /* third party permissions... */ |
60 | #define KEY_OTH_READ 0x00000002 | 63 | #define KEY_OTH_READ 0x00000002 |
61 | #define KEY_OTH_WRITE 0x00000004 | 64 | #define KEY_OTH_WRITE 0x00000004 |
62 | #define KEY_OTH_SEARCH 0x00000008 | 65 | #define KEY_OTH_SEARCH 0x00000008 |
63 | #define KEY_OTH_LINK 0x00000010 | 66 | #define KEY_OTH_LINK 0x00000010 |
64 | #define KEY_OTH_ALL 0x0000001f | 67 | #define KEY_OTH_SETATTR 0x00000020 |
68 | #define KEY_OTH_ALL 0x0000003f | ||
65 | 69 | ||
66 | struct seq_file; | 70 | struct seq_file; |
67 | struct user_struct; | 71 | struct user_struct; |
@@ -119,6 +123,7 @@ struct key { | |||
119 | struct key_type *type; /* type of key */ | 123 | struct key_type *type; /* type of key */ |
120 | struct rw_semaphore sem; /* change vs change sem */ | 124 | struct rw_semaphore sem; /* change vs change sem */ |
121 | struct key_user *user; /* owner of this key */ | 125 | struct key_user *user; /* owner of this key */ |
126 | void *security; /* security data for this key */ | ||
122 | time_t expiry; /* time at which key expires (or 0) */ | 127 | time_t expiry; /* time at which key expires (or 0) */ |
123 | uid_t uid; | 128 | uid_t uid; |
124 | gid_t gid; | 129 | gid_t gid; |