Changeset b7fd2a0 in mainline for kernel/generic/src/security/perm.c
- Timestamp:
- 2018-01-13T03:10:29Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/security/perm.c
r36f0738 rb7fd2a0 84 84 * 85 85 */ 86 static int perm_grant(task_id_t taskid, perm_t perms)86 static errno_t perm_grant(task_id_t taskid, perm_t perms) 87 87 { 88 88 if (!(perm_get(TASK) & PERM_PERM)) … … 116 116 * 117 117 */ 118 static int perm_revoke(task_id_t taskid, perm_t perms)118 static errno_t perm_revoke(task_id_t taskid, perm_t perms) 119 119 { 120 120 irq_spinlock_lock(&tasks_lock, true); … … 158 158 * 159 159 */ 160 sys arg_t sys_perm_grant(sysarg64_t *uspace_taskid, perm_t perms)160 sys_errno_t sys_perm_grant(sysarg64_t *uspace_taskid, perm_t perms) 161 161 { 162 162 sysarg64_t taskid; 163 int rc = copy_from_uspace(&taskid, uspace_taskid, sizeof(sysarg64_t));163 errno_t rc = copy_from_uspace(&taskid, uspace_taskid, sizeof(sysarg64_t)); 164 164 if (rc != 0) 165 return (sys arg_t) rc;165 return (sys_errno_t) rc; 166 166 167 167 return perm_grant((task_id_t) taskid, perms); … … 179 179 * 180 180 */ 181 sys arg_t sys_perm_revoke(sysarg64_t *uspace_taskid, perm_t perms)181 sys_errno_t sys_perm_revoke(sysarg64_t *uspace_taskid, perm_t perms) 182 182 { 183 183 sysarg64_t taskid; 184 int rc = copy_from_uspace(&taskid, uspace_taskid, sizeof(sysarg64_t));184 errno_t rc = copy_from_uspace(&taskid, uspace_taskid, sizeof(sysarg64_t)); 185 185 if (rc != 0) 186 return (sys arg_t) rc;186 return (sys_errno_t) rc; 187 187 188 188 return perm_revoke((task_id_t) taskid, perms); … … 203 203 * 204 204 */ 205 sys arg_t sys_perm_grant(sysarg_t taskid, perm_t perms)205 sys_errno_t sys_perm_grant(sysarg_t taskid, perm_t perms) 206 206 { 207 207 return perm_grant((task_id_t) taskid, perms); … … 219 219 * 220 220 */ 221 sys arg_t sys_perm_revoke(sysarg_t taskid, perm_t perms)221 sys_errno_t sys_perm_revoke(sysarg_t taskid, perm_t perms) 222 222 { 223 223 return perm_revoke((task_id_t) taskid, perms);
Note:
See TracChangeset
for help on using the changeset viewer.