Changeset 7f1c620 in mainline for generic/src/security/cap.c
- Timestamp:
- 2006-07-04T17:17:56Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ffa3ef5
- Parents:
- 991779c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/security/cap.c
r991779c5 r7f1c620 95 95 * @return Zero on success or an error code from @ref errno.h. 96 96 */ 97 __nativesys_cap_grant(sysarg64_t *uspace_taskid_arg, cap_t caps)97 unative_t sys_cap_grant(sysarg64_t *uspace_taskid_arg, cap_t caps) 98 98 { 99 99 sysarg64_t taskid_arg; … … 103 103 104 104 if (!(cap_get(TASK) & CAP_CAP)) 105 return ( __native) EPERM;105 return (unative_t) EPERM; 106 106 107 107 rc = copy_from_uspace(&taskid_arg, uspace_taskid_arg, sizeof(sysarg64_t)); 108 108 if (rc != 0) 109 return ( __native) rc;109 return (unative_t) rc; 110 110 111 111 ipl = interrupts_disable(); … … 115 115 spinlock_unlock(&tasks_lock); 116 116 interrupts_restore(ipl); 117 return ( __native) ENOENT;117 return (unative_t) ENOENT; 118 118 } 119 119 … … 140 140 * @return Zero on success or an error code from @ref errno.h. 141 141 */ 142 __nativesys_cap_revoke(sysarg64_t *uspace_taskid_arg, cap_t caps)142 unative_t sys_cap_revoke(sysarg64_t *uspace_taskid_arg, cap_t caps) 143 143 { 144 144 sysarg64_t taskid_arg; … … 149 149 rc = copy_from_uspace(&taskid_arg, uspace_taskid_arg, sizeof(sysarg64_t)); 150 150 if (rc != 0) 151 return ( __native) rc;151 return (unative_t) rc; 152 152 153 153 ipl = interrupts_disable(); … … 157 157 spinlock_unlock(&tasks_lock); 158 158 interrupts_restore(ipl); 159 return ( __native) ENOENT;159 return (unative_t) ENOENT; 160 160 } 161 161 … … 168 168 spinlock_unlock(&tasks_lock); 169 169 interrupts_restore(ipl); 170 return ( __native) EPERM;170 return (unative_t) EPERM; 171 171 } 172 172
Note:
See TracChangeset
for help on using the changeset viewer.