History

LSM: fix documentation for the sem_* hooks

The sem_* hooks were changed in the commit "sem/security: Pass kern_ipc_perm not sem_array into the sem security hooks" (aefad9593ec5). The type of the argument sma was changed from sem_array to kern_ipc_perm. This patch updates the documentation for the hooks accordingly.

Denis Efremov committed 7 years ago

Commit e9220bc1 parent ab012bc1 file · +16 −16Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/lsm_hooks.h+16−16
@@ -1190,34 +1190,34 @@ · 1189 unmodified lines
1190 * Security hooks for System V Semaphores1190 * Security hooks for System V Semaphores
1191 *1191 *
1192 * @sem_alloc_security:1192 * @sem_alloc_security:
1193 * Allocate and attach a security structure to the sma->sem_perm.security1193 * Allocate and attach a security structure to the @perm->security
1194 * field. The security field is initialized to NULL when the structure is1194 * field. The security field is initialized to NULL when the structure is
1195 * first created.1195 * first created.
1196 * @sma contains the semaphore structure1196 * @perm contains the IPC permissions of the semaphore.
1197 * Return 0 if operation was successful and permission is granted.1197 * Return 0 if operation was successful and permission is granted.
1198 * @sem_free_security:1198 * @sem_free_security:
1199 * deallocate security struct for this semaphore1199 * Deallocate security structure @perm->security for the semaphore.
1200 * @sma contains the semaphore structure.1200 * @perm contains the IPC permissions of the semaphore.
1201 * @sem_associate:1201 * @sem_associate:
1202 * Check permission when a semaphore is requested through the semget1202 * Check permission when a semaphore is requested through the semget
1203 * system call. This hook is only called when returning the semaphore1203 * system call. This hook is only called when returning the semaphore
1204 * identifier for an existing semaphore, not when a new one must be1204 * identifier for an existing semaphore, not when a new one must be
1205 * created.1205 * created.
1206 * @sma contains the semaphore structure.1206 * @perm contains the IPC permissions of the semaphore.
1207 * @semflg contains the operation control flags.1207 * @semflg contains the operation control flags.
1208 * Return 0 if permission is granted.1208 * Return 0 if permission is granted.
1209 * @sem_semctl:1209 * @sem_semctl:
1210 * Check permission when a semaphore operation specified by @cmd is to be1210 * Check permission when a semaphore operation specified by @cmd is to be
1211 * performed on the semaphore @sma. The @sma may be NULL, e.g. for1211 * performed on the semaphore. The @perm may be NULL, e.g. for
1212 * IPC_INFO or SEM_INFO.1212 * IPC_INFO or SEM_INFO.
1213 * @sma contains the semaphore structure. May be NULL.1213 * @perm contains the IPC permissions of the semaphore. May be NULL.
1214 * @cmd contains the operation to be performed.1214 * @cmd contains the operation to be performed.
1215 * Return 0 if permission is granted.1215 * Return 0 if permission is granted.
1216 * @sem_semop:1216 * @sem_semop:
1217 * Check permissions before performing operations on members of the1217 * Check permissions before performing operations on members of the
1218 * semaphore set @sma. If the @alter flag is nonzero, the semaphore set1218 * semaphore set. If the @alter flag is nonzero, the semaphore set
1219 * may be modified.1219 * may be modified.
1220 * @sma contains the semaphore structure.1220 * @perm contains the IPC permissions of the semaphore.
1221 * @sops contains the operations to perform.1221 * @sops contains the operations to perform.
1222 * @nsops contains the number of operations to perform.1222 * @nsops contains the number of operations to perform.
1223 * @alter contains the flag indicating whether changes are to be made.1223 * @alter contains the flag indicating whether changes are to be made.
@@ -1654,11 +1654,11 @@ union security_list_options { · 430 unmodified lines
1654 int (*shm_shmat)(struct kern_ipc_perm *shp, char __user *shmaddr,1654 int (*shm_shmat)(struct kern_ipc_perm *shp, char __user *shmaddr,
1655 int shmflg);1655 int shmflg);
1656 1656
1657 int (*sem_alloc_security)(struct kern_ipc_perm *sma);1657 int (*sem_alloc_security)(struct kern_ipc_perm *perm);
1658 void (*sem_free_security)(struct kern_ipc_perm *sma);1658 void (*sem_free_security)(struct kern_ipc_perm *perm);
1659 int (*sem_associate)(struct kern_ipc_perm *sma, int semflg);1659 int (*sem_associate)(struct kern_ipc_perm *perm, int semflg);
1660 int (*sem_semctl)(struct kern_ipc_perm *sma, int cmd);1660 int (*sem_semctl)(struct kern_ipc_perm *perm, int cmd);
1661 int (*sem_semop)(struct kern_ipc_perm *sma, struct sembuf *sops,1661 int (*sem_semop)(struct kern_ipc_perm *perm, struct sembuf *sops,
1662 unsigned nsops, int alter);1662 unsigned nsops, int alter);
1663 1663
1664 int (*netlink_send)(struct sock *sk, struct sk_buff *skb);1664 int (*netlink_send)(struct sock *sk, struct sk_buff *skb);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t