Changeset 719a208 in mainline for kernel/generic/src/ddi/ddi.c
- Timestamp:
- 2017-05-30T05:59:09Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f2460a50
- Parents:
- 456c086
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ddi/ddi.c
r456c086 r719a208 42 42 #include <ddi/ddi.h> 43 43 #include <proc/task.h> 44 #include <security/ cap.h>44 #include <security/perm.h> 45 45 #include <mm/frame.h> 46 46 #include <mm/as.h> … … 96 96 * 97 97 * @return EOK on success. 98 * @return EPERM if the caller lacks capabilities to use this syscall.98 * @return EPERM if the caller lacks permissions to use this syscall. 99 99 * @return EBADMEM if phys is not page aligned. 100 100 * @return ENOENT if there is no task matching the specified ID or … … 116 116 */ 117 117 bool priv = 118 (( cap_get(TASK) & CAP_MEM_MANAGER) == CAP_MEM_MANAGER);118 ((perm_get(TASK) & PERM_MEM_MANAGER) == PERM_MEM_MANAGER); 119 119 120 120 mem_backend_data_t backend_data; … … 260 260 * @param size Size of the enabled I/O space. 261 261 * 262 * @return 0 on success, EPERM if the caller lacks capabilities to use this262 * @return 0 on success, EPERM if the caller lacks permissions to use this 263 263 * syscall, ENOENT if there is no task matching the specified ID. 264 264 * … … 269 269 * Make sure the caller is authorised to make this syscall. 270 270 */ 271 cap_t caps = cap_get(TASK);272 if (!( caps & CAP_IO_MANAGER))271 perm_t perms = perm_get(TASK); 272 if (!(perms & PERM_IO_MANAGER)) 273 273 return EPERM; 274 274 … … 301 301 * @param size Size of the enabled I/O space. 302 302 * 303 * @return 0 on success, EPERM if the caller lacks capabilities to use this303 * @return 0 on success, EPERM if the caller lacks permissions to use this 304 304 * syscall, ENOENT if there is no task matching the specified ID. 305 305 * … … 310 310 * Make sure the caller is authorised to make this syscall. 311 311 */ 312 cap_t caps = cap_get(TASK);313 if (!( caps & CAP_IO_MANAGER))312 perm_t perms = perm_get(TASK); 313 if (!(perms & PERM_IO_MANAGER)) 314 314 return EPERM; 315 315
Note:
See TracChangeset
for help on using the changeset viewer.