Ignore:
File:
1 edited

Legend:

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

    r8cd680c r63e27ef  
    4040 */
    4141
     42#include <assert.h>
    4243#include <ddi/ddi.h>
    4344#include <proc/task.h>
    44 #include <security/cap.h>
     45#include <security/perm.h>
    4546#include <mm/frame.h>
    4647#include <mm/as.h>
     
    9697 *
    9798 * @return EOK on success.
    98  * @return EPERM if the caller lacks capabilities to use this syscall.
     99 * @return EPERM if the caller lacks permissions to use this syscall.
    99100 * @return EBADMEM if phys is not page aligned.
    100101 * @return ENOENT if there is no task matching the specified ID or
     
    106107    unsigned int flags, uintptr_t *virt, uintptr_t bound)
    107108{
    108         ASSERT(TASK);
     109        assert(TASK);
    109110       
    110111        if ((phys % FRAME_SIZE) != 0)
     
    116117         */
    117118        bool priv =
    118             ((cap_get(TASK) & CAP_MEM_MANAGER) == CAP_MEM_MANAGER);
     119            ((perm_get(TASK) & PERM_MEM_MANAGER) == PERM_MEM_MANAGER);
    119120       
    120121        mem_backend_data_t backend_data;
     
    211212NO_TRACE static int physmem_unmap(uintptr_t virt)
    212213{
    213         ASSERT(TASK);
     214        assert(TASK);
    214215
    215216        return as_area_destroy(TASK->as, virt);
     
    260261 * @param size   Size of the enabled I/O space.
    261262 *
    262  * @return 0 on success, EPERM if the caller lacks capabilities to use this
     263 * @return 0 on success, EPERM if the caller lacks permissions to use this
    263264 *           syscall, ENOENT if there is no task matching the specified ID.
    264265 *
     
    269270         * Make sure the caller is authorised to make this syscall.
    270271         */
    271         cap_t caps = cap_get(TASK);
    272         if (!(caps & CAP_IO_MANAGER))
     272        perm_t perms = perm_get(TASK);
     273        if (!(perms & PERM_IO_MANAGER))
    273274                return EPERM;
    274275       
     
    301302 * @param size   Size of the enabled I/O space.
    302303 *
    303  * @return 0 on success, EPERM if the caller lacks capabilities to use this
     304 * @return 0 on success, EPERM if the caller lacks permissions to use this
    304305 *           syscall, ENOENT if there is no task matching the specified ID.
    305306 *
     
    310311         * Make sure the caller is authorised to make this syscall.
    311312         */
    312         cap_t caps = cap_get(TASK);
    313         if (!(caps & CAP_IO_MANAGER))
     313        perm_t perms = perm_get(TASK);
     314        if (!(perms & PERM_IO_MANAGER))
    314315                return EPERM;
    315316       
     
    368369    unsigned int flags, uintptr_t *phys)
    369370{
    370         ASSERT(TASK);
     371        assert(TASK);
    371372       
    372373        // TODO: implement locking of non-anonymous mapping
     
    378379    uintptr_t *virt, uintptr_t bound)
    379380{
    380         ASSERT(TASK);
     381        assert(TASK);
    381382       
    382383        size_t frames = SIZE2FRAMES(size);
Note: See TracChangeset for help on using the changeset viewer.