Changeset 719a208 in mainline for kernel/generic/src/ddi/ddi.c


Ignore:
Timestamp:
2017-05-30T05:59:09Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f2460a50
Parents:
456c086
Message:

Rename SYS_CAP_GRANT/REVOKE to SYS_PERM_GRANT/REVOKE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ddi/ddi.c

    r456c086 r719a208  
    4242#include <ddi/ddi.h>
    4343#include <proc/task.h>
    44 #include <security/cap.h>
     44#include <security/perm.h>
    4545#include <mm/frame.h>
    4646#include <mm/as.h>
     
    9696 *
    9797 * @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.
    9999 * @return EBADMEM if phys is not page aligned.
    100100 * @return ENOENT if there is no task matching the specified ID or
     
    116116         */
    117117        bool priv =
    118             ((cap_get(TASK) & CAP_MEM_MANAGER) == CAP_MEM_MANAGER);
     118            ((perm_get(TASK) & PERM_MEM_MANAGER) == PERM_MEM_MANAGER);
    119119       
    120120        mem_backend_data_t backend_data;
     
    260260 * @param size   Size of the enabled I/O space.
    261261 *
    262  * @return 0 on success, EPERM if the caller lacks capabilities to use this
     262 * @return 0 on success, EPERM if the caller lacks permissions to use this
    263263 *           syscall, ENOENT if there is no task matching the specified ID.
    264264 *
     
    269269         * Make sure the caller is authorised to make this syscall.
    270270         */
    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))
    273273                return EPERM;
    274274       
     
    301301 * @param size   Size of the enabled I/O space.
    302302 *
    303  * @return 0 on success, EPERM if the caller lacks capabilities to use this
     303 * @return 0 on success, EPERM if the caller lacks permissions to use this
    304304 *           syscall, ENOENT if there is no task matching the specified ID.
    305305 *
     
    310310         * Make sure the caller is authorised to make this syscall.
    311311         */
    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))
    314314                return EPERM;
    315315       
Note: See TracChangeset for help on using the changeset viewer.