mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-20 02:25:14 -07:00
mshield requires memory protection
This commit is contained in:
parent
bfeca0eb73
commit
495fdb3693
@ -725,6 +725,15 @@ sodium_mprotect_readwrite(void *ptr)
|
|||||||
return _sodium_mprotect(ptr, _mprotect_readwrite);
|
return _sodium_mprotect(ptr, _mprotect_readwrite);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef HAVE_PAGE_PROTECTION
|
||||||
|
int
|
||||||
|
sodium_mshield(void *ptr)
|
||||||
|
{
|
||||||
|
(void) ptr;
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
#else
|
||||||
int
|
int
|
||||||
sodium_mshield(void *ptr)
|
sodium_mshield(void *ptr)
|
||||||
{
|
{
|
||||||
@ -750,6 +759,7 @@ sodium_mshield(void *ptr)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
sodium_munshield(void *ptr)
|
sodium_munshield(void *ptr)
|
||||||
|
Loading…
Reference in New Issue
Block a user