mirror of
https://github.com/drasko/codezero.git
synced 2026-01-21 15:23:15 +01:00
Fixed error with ipc transfer type checking.
Tested test0 mutex ipc successfully rejecting to occur when given different micro-capabilities than the actual transfer type.
This commit is contained in:
@@ -90,7 +90,7 @@ int user_mutex_test(void)
|
||||
}
|
||||
|
||||
cap.type = CAP_TYPE_IPC | CAP_RTYPE_THREAD;
|
||||
cap.access = CAP_IPC_EXTENDED | CAP_IPC_SEND | CAP_IPC_RECV;
|
||||
cap.access = CAP_IPC_SHORT | CAP_IPC_SEND | CAP_IPC_RECV;
|
||||
if ((err = cap_request_pager(&cap)) < 0) {
|
||||
printf("Ipc capability request failed. "
|
||||
"err = %d\n", err);
|
||||
@@ -131,7 +131,7 @@ int user_mutex_test(void)
|
||||
|
||||
}
|
||||
/* Sync with the parent */
|
||||
if ((err = l4_send_full(parent, L4_IPC_TAG_SYNC)) < 0) {
|
||||
if ((err = l4_send(parent, L4_IPC_TAG_SYNC)) < 0) {
|
||||
printf("Error: l4_send() failed with %d\n", err);
|
||||
goto out_err;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ int user_mutex_test(void)
|
||||
l4_thread_switch(0);
|
||||
}
|
||||
/* Sync with the child */
|
||||
if ((err = l4_receive_full(child)) < 0) {
|
||||
if ((err = l4_receive(child)) < 0) {
|
||||
printf("Error: l4_receive() failed with %d\n", err);
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user