aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lsm_hooks.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/lsm_hooks.h')
-rw-r--r--include/linux/lsm_hooks.h170
1 files changed, 81 insertions, 89 deletions
diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
index b987dc282d63..f7e55d0d2672 100644
--- a/include/linux/lsm_hooks.h
+++ b/include/linux/lsm_hooks.h
@@ -127,7 +127,6 @@
127 * options cleanly (a filesystem may modify the data e.g. with strsep()). 127 * options cleanly (a filesystem may modify the data e.g. with strsep()).
128 * This also allows the original mount data to be stripped of security- 128 * This also allows the original mount data to be stripped of security-
129 * specific options to avoid having to make filesystems aware of them. 129 * specific options to avoid having to make filesystems aware of them.
130 * @type the type of filesystem being mounted.
131 * @orig the original mount data copied from userspace. 130 * @orig the original mount data copied from userspace.
132 * @copy copied data which will be passed to the security module. 131 * @copy copied data which will be passed to the security module.
133 * Returns 0 if the copy was successful. 132 * Returns 0 if the copy was successful.
@@ -320,10 +319,11 @@
320 * @new_dentry contains the dentry structure of the new link. 319 * @new_dentry contains the dentry structure of the new link.
321 * Return 0 if permission is granted. 320 * Return 0 if permission is granted.
322 * @path_chmod: 321 * @path_chmod:
323 * Check for permission to change DAC's permission of a file or directory. 322 * Check for permission to change a mode of the file @path. The new
324 * @dentry contains the dentry structure. 323 * mode is specified in @mode.
325 * @mnt contains the vfsmnt structure. 324 * @path contains the path structure of the file to change the mode.
326 * @mode contains DAC's mode. 325 * @mode contains the new DAC's permission, which is a bitmask of
326 * constants from <include/uapi/linux/stat.h>
327 * Return 0 if permission is granted. 327 * Return 0 if permission is granted.
328 * @path_chown: 328 * @path_chown:
329 * Check for permission to change owner/group of a file or directory. 329 * Check for permission to change owner/group of a file or directory.
@@ -511,7 +511,7 @@
511 * Return 0 if permission is granted. 511 * Return 0 if permission is granted.
512 * @file_lock: 512 * @file_lock:
513 * Check permission before performing file locking operations. 513 * Check permission before performing file locking operations.
514 * Note: this hook mediates both flock and fcntl style locks. 514 * Note the hook mediates both flock and fcntl style locks.
515 * @file contains the file structure. 515 * @file contains the file structure.
516 * @cmd contains the posix-translated lock operation to perform 516 * @cmd contains the posix-translated lock operation to perform
517 * (e.g. F_RDLCK, F_WRLCK). 517 * (e.g. F_RDLCK, F_WRLCK).
@@ -654,12 +654,12 @@
654 * @p contains the task_struct of process. 654 * @p contains the task_struct of process.
655 * @nice contains the new nice value. 655 * @nice contains the new nice value.
656 * Return 0 if permission is granted. 656 * Return 0 if permission is granted.
657 * @task_setioprio 657 * @task_setioprio:
658 * Check permission before setting the ioprio value of @p to @ioprio. 658 * Check permission before setting the ioprio value of @p to @ioprio.
659 * @p contains the task_struct of process. 659 * @p contains the task_struct of process.
660 * @ioprio contains the new ioprio value 660 * @ioprio contains the new ioprio value
661 * Return 0 if permission is granted. 661 * Return 0 if permission is granted.
662 * @task_getioprio 662 * @task_getioprio:
663 * Check permission before getting the ioprio value of @p. 663 * Check permission before getting the ioprio value of @p.
664 * @p contains the task_struct of process. 664 * @p contains the task_struct of process.
665 * Return 0 if permission is granted. 665 * Return 0 if permission is granted.
@@ -681,17 +681,15 @@
681 * Return 0 if permission is granted. 681 * Return 0 if permission is granted.
682 * @task_setscheduler: 682 * @task_setscheduler:
683 * Check permission before setting scheduling policy and/or parameters of 683 * Check permission before setting scheduling policy and/or parameters of
684 * process @p based on @policy and @lp. 684 * process @p.
685 * @p contains the task_struct for process. 685 * @p contains the task_struct for process.
686 * @policy contains the scheduling policy.
687 * @lp contains the scheduling parameters.
688 * Return 0 if permission is granted. 686 * Return 0 if permission is granted.
689 * @task_getscheduler: 687 * @task_getscheduler:
690 * Check permission before obtaining scheduling information for process 688 * Check permission before obtaining scheduling information for process
691 * @p. 689 * @p.
692 * @p contains the task_struct for process. 690 * @p contains the task_struct for process.
693 * Return 0 if permission is granted. 691 * Return 0 if permission is granted.
694 * @task_movememory 692 * @task_movememory:
695 * Check permission before moving memory owned by process @p. 693 * Check permission before moving memory owned by process @p.
696 * @p contains the task_struct for process. 694 * @p contains the task_struct for process.
697 * Return 0 if permission is granted. 695 * Return 0 if permission is granted.
@@ -778,9 +776,9 @@
778 * socket structure, but rather, the socket security information is stored 776 * socket structure, but rather, the socket security information is stored
779 * in the associated inode. Typically, the inode alloc_security hook will 777 * in the associated inode. Typically, the inode alloc_security hook will
780 * allocate and and attach security information to 778 * allocate and and attach security information to
781 * sock->inode->i_security. This hook may be used to update the 779 * SOCK_INODE(sock)->i_security. This hook may be used to update the
782 * sock->inode->i_security field with additional information that wasn't 780 * SOCK_INODE(sock)->i_security field with additional information that
783 * available when the inode was allocated. 781 * wasn't available when the inode was allocated.
784 * @sock contains the newly created socket structure. 782 * @sock contains the newly created socket structure.
785 * @family contains the requested protocol family. 783 * @family contains the requested protocol family.
786 * @type contains the requested communications type. 784 * @type contains the requested communications type.
@@ -885,13 +883,13 @@
885 * @socket_getpeersec_dgram: 883 * @socket_getpeersec_dgram:
886 * This hook allows the security module to provide peer socket security 884 * This hook allows the security module to provide peer socket security
887 * state for udp sockets on a per-packet basis to userspace via 885 * state for udp sockets on a per-packet basis to userspace via
888 * getsockopt SO_GETPEERSEC. The application must first have indicated 886 * getsockopt SO_GETPEERSEC. The application must first have indicated
889 * the IP_PASSSEC option via getsockopt. It can then retrieve the 887 * the IP_PASSSEC option via getsockopt. It can then retrieve the
890 * security state returned by this hook for a packet via the SCM_SECURITY 888 * security state returned by this hook for a packet via the SCM_SECURITY
891 * ancillary message type. 889 * ancillary message type.
892 * @skb is the skbuff for the packet being queried 890 * @sock contains the peer socket. May be NULL.
893 * @secdata is a pointer to a buffer in which to copy the security data 891 * @skb is the sk_buff for the packet being queried. May be NULL.
894 * @seclen is the maximum length for @secdata 892 * @secid pointer to store the secid of the packet.
895 * Return 0 on success, error on failure. 893 * Return 0 on success, error on failure.
896 * @sk_alloc_security: 894 * @sk_alloc_security:
897 * Allocate and attach a security structure to the sk->sk_security field, 895 * Allocate and attach a security structure to the sk->sk_security field,
@@ -915,9 +913,9 @@
915 * @secmark_relabel_packet: 913 * @secmark_relabel_packet:
916 * check if the process should be allowed to relabel packets to 914 * check if the process should be allowed to relabel packets to
917 * the given secid 915 * the given secid
918 * @security_secmark_refcount_inc 916 * @secmark_refcount_inc:
919 * tells the LSM to increment the number of secmark labeling rules loaded 917 * tells the LSM to increment the number of secmark labeling rules loaded
920 * @security_secmark_refcount_dec 918 * @secmark_refcount_dec:
921 * tells the LSM to decrement the number of secmark labeling rules loaded 919 * tells the LSM to decrement the number of secmark labeling rules loaded
922 * @req_classify_flow: 920 * @req_classify_flow:
923 * Sets the flow's sid to the openreq sid. 921 * Sets the flow's sid to the openreq sid.
@@ -1122,41 +1120,41 @@
1122 * 1120 *
1123 * @msg_queue_alloc_security: 1121 * @msg_queue_alloc_security:
1124 * Allocate and attach a security structure to the 1122 * Allocate and attach a security structure to the
1125 * msq->q_perm.security field. The security field is initialized to 1123 * @perm->security field. The security field is initialized to
1126 * NULL when the structure is first created. 1124 * NULL when the structure is first created.
1127 * @msq contains the message queue structure to be modified. 1125 * @perm contains the IPC permissions of the message queue.
1128 * Return 0 if operation was successful and permission is granted. 1126 * Return 0 if operation was successful and permission is granted.
1129 * @msg_queue_free_security: 1127 * @msg_queue_free_security:
1130 * Deallocate security structure for this message queue. 1128 * Deallocate security field @perm->security for the message queue.
1131 * @msq contains the message queue structure to be modified. 1129 * @perm contains the IPC permissions of the message queue.
1132 * @msg_queue_associate: 1130 * @msg_queue_associate:
1133 * Check permission when a message queue is requested through the 1131 * Check permission when a message queue is requested through the
1134 * msgget system call. This hook is only called when returning the 1132 * msgget system call. This hook is only called when returning the
1135 * message queue identifier for an existing message queue, not when a 1133 * message queue identifier for an existing message queue, not when a
1136 * new message queue is created. 1134 * new message queue is created.
1137 * @msq contains the message queue to act upon. 1135 * @perm contains the IPC permissions of the message queue.
1138 * @msqflg contains the operation control flags. 1136 * @msqflg contains the operation control flags.
1139 * Return 0 if permission is granted. 1137 * Return 0 if permission is granted.
1140 * @msg_queue_msgctl: 1138 * @msg_queue_msgctl:
1141 * Check permission when a message control operation specified by @cmd 1139 * Check permission when a message control operation specified by @cmd
1142 * is to be performed on the message queue @msq. 1140 * is to be performed on the message queue with permissions @perm.
1143 * The @msq may be NULL, e.g. for IPC_INFO or MSG_INFO. 1141 * The @perm may be NULL, e.g. for IPC_INFO or MSG_INFO.
1144 * @msq contains the message queue to act upon. May be NULL. 1142 * @perm contains the IPC permissions of the msg queue. May be NULL.
1145 * @cmd contains the operation to be performed. 1143 * @cmd contains the operation to be performed.
1146 * Return 0 if permission is granted. 1144 * Return 0 if permission is granted.
1147 * @msg_queue_msgsnd: 1145 * @msg_queue_msgsnd:
1148 * Check permission before a message, @msg, is enqueued on the message 1146 * Check permission before a message, @msg, is enqueued on the message
1149 * queue, @msq. 1147 * queue with permissions @perm.
1150 * @msq contains the message queue to send message to. 1148 * @perm contains the IPC permissions of the message queue.
1151 * @msg contains the message to be enqueued. 1149 * @msg contains the message to be enqueued.
1152 * @msqflg contains operational flags. 1150 * @msqflg contains operational flags.
1153 * Return 0 if permission is granted. 1151 * Return 0 if permission is granted.
1154 * @msg_queue_msgrcv: 1152 * @msg_queue_msgrcv:
1155 * Check permission before a message, @msg, is removed from the message 1153 * Check permission before a message, @msg, is removed from the message
1156 * queue, @msq. The @target task structure contains a pointer to the 1154 * queue. The @target task structure contains a pointer to the
1157 * process that will be receiving the message (not equal to the current 1155 * process that will be receiving the message (not equal to the current
1158 * process when inline receives are being performed). 1156 * process when inline receives are being performed).
1159 * @msq contains the message queue to retrieve message from. 1157 * @perm contains the IPC permissions of the message queue.
1160 * @msg contains the message destination. 1158 * @msg contains the message destination.
1161 * @target contains the task structure for recipient process. 1159 * @target contains the task structure for recipient process.
1162 * @type contains the type of message requested. 1160 * @type contains the type of message requested.
@@ -1166,34 +1164,34 @@
1166 * Security hooks for System V Shared Memory Segments 1164 * Security hooks for System V Shared Memory Segments
1167 * 1165 *
1168 * @shm_alloc_security: 1166 * @shm_alloc_security:
1169 * Allocate and attach a security structure to the shp->shm_perm.security 1167 * Allocate and attach a security structure to the @perm->security
1170 * field. The security field is initialized to NULL when the structure is 1168 * field. The security field is initialized to NULL when the structure is
1171 * first created. 1169 * first created.
1172 * @shp contains the shared memory structure to be modified. 1170 * @perm contains the IPC permissions of the shared memory structure.
1173 * Return 0 if operation was successful and permission is granted. 1171 * Return 0 if operation was successful and permission is granted.
1174 * @shm_free_security: 1172 * @shm_free_security:
1175 * Deallocate the security struct for this memory segment. 1173 * Deallocate the security structure @perm->security for the memory segment.
1176 * @shp contains the shared memory structure to be modified. 1174 * @perm contains the IPC permissions of the shared memory structure.
1177 * @shm_associate: 1175 * @shm_associate:
1178 * Check permission when a shared memory region is requested through the 1176 * Check permission when a shared memory region is requested through the
1179 * shmget system call. This hook is only called when returning the shared 1177 * shmget system call. This hook is only called when returning the shared
1180 * memory region identifier for an existing region, not when a new shared 1178 * memory region identifier for an existing region, not when a new shared
1181 * memory region is created. 1179 * memory region is created.
1182 * @shp contains the shared memory structure to be modified. 1180 * @perm contains the IPC permissions of the shared memory structure.
1183 * @shmflg contains the operation control flags. 1181 * @shmflg contains the operation control flags.
1184 * Return 0 if permission is granted. 1182 * Return 0 if permission is granted.
1185 * @shm_shmctl: 1183 * @shm_shmctl:
1186 * Check permission when a shared memory control operation specified by 1184 * Check permission when a shared memory control operation specified by
1187 * @cmd is to be performed on the shared memory region @shp. 1185 * @cmd is to be performed on the shared memory region with permissions @perm.
1188 * The @shp may be NULL, e.g. for IPC_INFO or SHM_INFO. 1186 * The @perm may be NULL, e.g. for IPC_INFO or SHM_INFO.
1189 * @shp contains shared memory structure to be modified. 1187 * @perm contains the IPC permissions of the shared memory structure.
1190 * @cmd contains the operation to be performed. 1188 * @cmd contains the operation to be performed.
1191 * Return 0 if permission is granted. 1189 * Return 0 if permission is granted.
1192 * @shm_shmat: 1190 * @shm_shmat:
1193 * Check permissions prior to allowing the shmat system call to attach the 1191 * Check permissions prior to allowing the shmat system call to attach the
1194 * shared memory segment @shp to the data segment of the calling process. 1192 * shared memory segment with permissions @perm to the data segment of the
1195 * The attaching address is specified by @shmaddr. 1193 * calling process. The attaching address is specified by @shmaddr.
1196 * @shp contains the shared memory structure to be modified. 1194 * @perm contains the IPC permissions of the shared memory structure.
1197 * @shmaddr contains the address to attach memory region to. 1195 * @shmaddr contains the address to attach memory region to.
1198 * @shmflg contains the operational flags. 1196 * @shmflg contains the operational flags.
1199 * Return 0 if permission is granted. 1197 * Return 0 if permission is granted.
@@ -1201,34 +1199,34 @@
1201 * Security hooks for System V Semaphores 1199 * Security hooks for System V Semaphores
1202 * 1200 *
1203 * @sem_alloc_security: 1201 * @sem_alloc_security:
1204 * Allocate and attach a security structure to the sma->sem_perm.security 1202 * Allocate and attach a security structure to the @perm->security
1205 * field. The security field is initialized to NULL when the structure is 1203 * field. The security field is initialized to NULL when the structure is
1206 * first created. 1204 * first created.
1207 * @sma contains the semaphore structure 1205 * @perm contains the IPC permissions of the semaphore.
1208 * Return 0 if operation was successful and permission is granted. 1206 * Return 0 if operation was successful and permission is granted.
1209 * @sem_free_security: 1207 * @sem_free_security:
1210 * deallocate security struct for this semaphore 1208 * Deallocate security structure @perm->security for the semaphore.
1211 * @sma contains the semaphore structure. 1209 * @perm contains the IPC permissions of the semaphore.
1212 * @sem_associate: 1210 * @sem_associate:
1213 * Check permission when a semaphore is requested through the semget 1211 * Check permission when a semaphore is requested through the semget
1214 * system call. This hook is only called when returning the semaphore 1212 * system call. This hook is only called when returning the semaphore
1215 * identifier for an existing semaphore, not when a new one must be 1213 * identifier for an existing semaphore, not when a new one must be
1216 * created. 1214 * created.
1217 * @sma contains the semaphore structure. 1215 * @perm contains the IPC permissions of the semaphore.
1218 * @semflg contains the operation control flags. 1216 * @semflg contains the operation control flags.
1219 * Return 0 if permission is granted. 1217 * Return 0 if permission is granted.
1220 * @sem_semctl: 1218 * @sem_semctl:
1221 * Check permission when a semaphore operation specified by @cmd is to be 1219 * Check permission when a semaphore operation specified by @cmd is to be
1222 * performed on the semaphore @sma. The @sma may be NULL, e.g. for 1220 * performed on the semaphore. The @perm may be NULL, e.g. for
1223 * IPC_INFO or SEM_INFO. 1221 * IPC_INFO or SEM_INFO.
1224 * @sma contains the semaphore structure. May be NULL. 1222 * @perm contains the IPC permissions of the semaphore. May be NULL.
1225 * @cmd contains the operation to be performed. 1223 * @cmd contains the operation to be performed.
1226 * Return 0 if permission is granted. 1224 * Return 0 if permission is granted.
1227 * @sem_semop: 1225 * @sem_semop:
1228 * Check permissions before performing operations on members of the 1226 * Check permissions before performing operations on members of the
1229 * semaphore set @sma. If the @alter flag is nonzero, the semaphore set 1227 * semaphore set. If the @alter flag is nonzero, the semaphore set
1230 * may be modified. 1228 * may be modified.
1231 * @sma contains the semaphore structure. 1229 * @perm contains the IPC permissions of the semaphore.
1232 * @sops contains the operations to perform. 1230 * @sops contains the operations to perform.
1233 * @nsops contains the number of operations to perform. 1231 * @nsops contains the number of operations to perform.
1234 * @alter contains the flag indicating whether changes are to be made. 1232 * @alter contains the flag indicating whether changes are to be made.
@@ -1301,13 +1299,12 @@
1301 * Check permission before accessing the kernel message ring or changing 1299 * Check permission before accessing the kernel message ring or changing
1302 * logging to the console. 1300 * logging to the console.
1303 * See the syslog(2) manual page for an explanation of the @type values. 1301 * See the syslog(2) manual page for an explanation of the @type values.
1304 * @type contains the type of action. 1302 * @type contains the SYSLOG_ACTION_* constant from <include/linux/syslog.h>
1305 * @from_file indicates the context of action (if it came from /proc).
1306 * Return 0 if permission is granted. 1303 * Return 0 if permission is granted.
1307 * @settime: 1304 * @settime:
1308 * Check permission to change the system time. 1305 * Check permission to change the system time.
1309 * struct timespec64 is defined in include/linux/time64.h and timezone 1306 * struct timespec64 is defined in <include/linux/time64.h> and timezone
1310 * is defined in include/linux/time.h 1307 * is defined in <include/linux/time.h>
1311 * @ts contains new time 1308 * @ts contains new time
1312 * @tz contains new timezone 1309 * @tz contains new timezone
1313 * Return 0 if permission is granted. 1310 * Return 0 if permission is granted.
@@ -1349,7 +1346,7 @@
1349 * @audit_rule_init: 1346 * @audit_rule_init:
1350 * Allocate and initialize an LSM audit rule structure. 1347 * Allocate and initialize an LSM audit rule structure.
1351 * @field contains the required Audit action. 1348 * @field contains the required Audit action.
1352 * Fields flags are defined in include/linux/audit.h 1349 * Fields flags are defined in <include/linux/audit.h>
1353 * @op contains the operator the rule uses. 1350 * @op contains the operator the rule uses.
1354 * @rulestr contains the context where the rule will be applied to. 1351 * @rulestr contains the context where the rule will be applied to.
1355 * @lsmrule contains a pointer to receive the result. 1352 * @lsmrule contains a pointer to receive the result.
@@ -1357,9 +1354,9 @@
1357 * -EINVAL in case of an invalid rule. 1354 * -EINVAL in case of an invalid rule.
1358 * 1355 *
1359 * @audit_rule_known: 1356 * @audit_rule_known:
1360 * Specifies whether given @rule contains any fields related to 1357 * Specifies whether given @krule contains any fields related to
1361 * current LSM. 1358 * current LSM.
1362 * @rule contains the audit rule of interest. 1359 * @krule contains the audit rule of interest.
1363 * Return 1 in case of relation found, 0 otherwise. 1360 * Return 1 in case of relation found, 0 otherwise.
1364 * 1361 *
1365 * @audit_rule_match: 1362 * @audit_rule_match:
@@ -1368,13 +1365,13 @@
1368 * @secid contains the security id in question. 1365 * @secid contains the security id in question.
1369 * @field contains the field which relates to current LSM. 1366 * @field contains the field which relates to current LSM.
1370 * @op contains the operator that will be used for matching. 1367 * @op contains the operator that will be used for matching.
1371 * @rule points to the audit rule that will be checked against. 1368 * @lrule points to the audit rule that will be checked against.
1372 * Return 1 if secid matches the rule, 0 if it does not, -ERRNO on failure. 1369 * Return 1 if secid matches the rule, 0 if it does not, -ERRNO on failure.
1373 * 1370 *
1374 * @audit_rule_free: 1371 * @audit_rule_free:
1375 * Deallocate the LSM audit rule structure previously allocated by 1372 * Deallocate the LSM audit rule structure previously allocated by
1376 * audit_rule_init. 1373 * audit_rule_init.
1377 * @rule contains the allocated rule 1374 * @lsmrule contains the allocated rule
1378 * 1375 *
1379 * @inode_invalidate_secctx: 1376 * @inode_invalidate_secctx:
1380 * Notify the security module that it must revalidate the security context 1377 * Notify the security module that it must revalidate the security context
@@ -1387,9 +1384,7 @@
1387 * this hook to initialize the security context in its incore inode to the 1384 * this hook to initialize the security context in its incore inode to the
1388 * value provided by the server for the file when the server returned the 1385 * value provided by the server for the file when the server returned the
1389 * file's attributes to the client. 1386 * file's attributes to the client.
1390 *
1391 * Must be called with inode->i_mutex locked. 1387 * Must be called with inode->i_mutex locked.
1392 *
1393 * @inode we wish to set the security context of. 1388 * @inode we wish to set the security context of.
1394 * @ctx contains the string which we wish to set in the inode. 1389 * @ctx contains the string which we wish to set in the inode.
1395 * @ctxlen contains the length of @ctx. 1390 * @ctxlen contains the length of @ctx.
@@ -1402,9 +1397,7 @@
1402 * this hook to change the security context in its incore inode and on the 1397 * this hook to change the security context in its incore inode and on the
1403 * backing filesystem to a value provided by the client on a SETATTR 1398 * backing filesystem to a value provided by the client on a SETATTR
1404 * operation. 1399 * operation.
1405 *
1406 * Must be called with inode->i_mutex locked. 1400 * Must be called with inode->i_mutex locked.
1407 *
1408 * @dentry contains the inode we wish to set the security context of. 1401 * @dentry contains the inode we wish to set the security context of.
1409 * @ctx contains the string which we wish to set in the inode. 1402 * @ctx contains the string which we wish to set in the inode.
1410 * @ctxlen contains the length of @ctx. 1403 * @ctxlen contains the length of @ctx.
@@ -1412,7 +1405,6 @@
1412 * @inode_getsecctx: 1405 * @inode_getsecctx:
1413 * On success, returns 0 and fills out @ctx and @ctxlen with the security 1406 * On success, returns 0 and fills out @ctx and @ctxlen with the security
1414 * context for the given @inode. 1407 * context for the given @inode.
1415 *
1416 * @inode we wish to get the security context of. 1408 * @inode we wish to get the security context of.
1417 * @ctx is a pointer in which to place the allocated security context. 1409 * @ctx is a pointer in which to place the allocated security context.
1418 * @ctxlen points to the place to put the length of @ctx. 1410 * @ctxlen points to the place to put the length of @ctx.
@@ -1652,28 +1644,28 @@ union security_list_options {
1652 int (*msg_msg_alloc_security)(struct msg_msg *msg); 1644 int (*msg_msg_alloc_security)(struct msg_msg *msg);
1653 void (*msg_msg_free_security)(struct msg_msg *msg); 1645 void (*msg_msg_free_security)(struct msg_msg *msg);
1654 1646
1655 int (*msg_queue_alloc_security)(struct kern_ipc_perm *msq); 1647 int (*msg_queue_alloc_security)(struct kern_ipc_perm *perm);
1656 void (*msg_queue_free_security)(struct kern_ipc_perm *msq); 1648 void (*msg_queue_free_security)(struct kern_ipc_perm *perm);
1657 int (*msg_queue_associate)(struct kern_ipc_perm *msq, int msqflg); 1649 int (*msg_queue_associate)(struct kern_ipc_perm *perm, int msqflg);
1658 int (*msg_queue_msgctl)(struct kern_ipc_perm *msq, int cmd); 1650 int (*msg_queue_msgctl)(struct kern_ipc_perm *perm, int cmd);
1659 int (*msg_queue_msgsnd)(struct kern_ipc_perm *msq, struct msg_msg *msg, 1651 int (*msg_queue_msgsnd)(struct kern_ipc_perm *perm, struct msg_msg *msg,
1660 int msqflg); 1652 int msqflg);
1661 int (*msg_queue_msgrcv)(struct kern_ipc_perm *msq, struct msg_msg *msg, 1653 int (*msg_queue_msgrcv)(struct kern_ipc_perm *perm, struct msg_msg *msg,
1662 struct task_struct *target, long type, 1654 struct task_struct *target, long type,
1663 int mode); 1655 int mode);
1664 1656
1665 int (*shm_alloc_security)(struct kern_ipc_perm *shp); 1657 int (*shm_alloc_security)(struct kern_ipc_perm *perm);
1666 void (*shm_free_security)(struct kern_ipc_perm *shp); 1658 void (*shm_free_security)(struct kern_ipc_perm *perm);
1667 int (*shm_associate)(struct kern_ipc_perm *shp, int shmflg); 1659 int (*shm_associate)(struct kern_ipc_perm *perm, int shmflg);
1668 int (*shm_shmctl)(struct kern_ipc_perm *shp, int cmd); 1660 int (*shm_shmctl)(struct kern_ipc_perm *perm, int cmd);
1669 int (*shm_shmat)(struct kern_ipc_perm *shp, char __user *shmaddr, 1661 int (*shm_shmat)(struct kern_ipc_perm *perm, char __user *shmaddr,
1670 int shmflg); 1662 int shmflg);
1671 1663
1672 int (*sem_alloc_security)(struct kern_ipc_perm *sma); 1664 int (*sem_alloc_security)(struct kern_ipc_perm *perm);
1673 void (*sem_free_security)(struct kern_ipc_perm *sma); 1665 void (*sem_free_security)(struct kern_ipc_perm *perm);
1674 int (*sem_associate)(struct kern_ipc_perm *sma, int semflg); 1666 int (*sem_associate)(struct kern_ipc_perm *perm, int semflg);
1675 int (*sem_semctl)(struct kern_ipc_perm *sma, int cmd); 1667 int (*sem_semctl)(struct kern_ipc_perm *perm, int cmd);
1676 int (*sem_semop)(struct kern_ipc_perm *sma, struct sembuf *sops, 1668 int (*sem_semop)(struct kern_ipc_perm *perm, struct sembuf *sops,
1677 unsigned nsops, int alter); 1669 unsigned nsops, int alter);
1678 1670
1679 int (*netlink_send)(struct sock *sk, struct sk_buff *skb); 1671 int (*netlink_send)(struct sock *sk, struct sk_buff *skb);