@@ -10,29 +10,29 @@ use crate::{bindings, cred::Credential, file::File, to_result, Result};
1010/// context.
1111pub fn binder_set_context_mgr ( mgr : & Credential ) -> Result {
1212 // SAFETY: `mrg.0` is valid because the shared reference guarantees a nonzero refcount.
13- to_result ( || unsafe { bindings:: security_binder_set_context_mgr ( mgr. 0 . get ( ) ) } )
13+ to_result ( unsafe { bindings:: security_binder_set_context_mgr ( mgr. 0 . get ( ) ) } )
1414}
1515
1616/// Calls the security modules to determine if binder transactions are allowed from task `from` to
1717/// task `to`.
1818pub fn binder_transaction ( from : & Credential , to : & Credential ) -> Result {
1919 // SAFETY: `from` and `to` are valid because the shared references guarantee nonzero refcounts.
20- to_result ( || unsafe { bindings:: security_binder_transaction ( from. 0 . get ( ) , to. 0 . get ( ) ) } )
20+ to_result ( unsafe { bindings:: security_binder_transaction ( from. 0 . get ( ) , to. 0 . get ( ) ) } )
2121}
2222
2323/// Calls the security modules to determine if task `from` is allowed to send binder objects
2424/// (owned by itself or other processes) to task `to` through a binder transaction.
2525pub fn binder_transfer_binder ( from : & Credential , to : & Credential ) -> Result {
2626 // SAFETY: `from` and `to` are valid because the shared references guarantee nonzero refcounts.
27- to_result ( || unsafe { bindings:: security_binder_transfer_binder ( from. 0 . get ( ) , to. 0 . get ( ) ) } )
27+ to_result ( unsafe { bindings:: security_binder_transfer_binder ( from. 0 . get ( ) , to. 0 . get ( ) ) } )
2828}
2929
3030/// Calls the security modules to determine if task `from` is allowed to send the given file to
3131/// task `to` (which would get its own file descriptor) through a binder transaction.
3232pub fn binder_transfer_file ( from : & Credential , to : & Credential , file : & File ) -> Result {
3333 // SAFETY: `from`, `to` and `file` are valid because the shared references guarantee nonzero
3434 // refcounts.
35- to_result ( || unsafe {
35+ to_result ( unsafe {
3636 bindings:: security_binder_transfer_file ( from. 0 . get ( ) , to. 0 . get ( ) , file. 0 . get ( ) )
3737 } )
3838}
0 commit comments