Fortune for memfd_secret-shim's current commit: Half curse − 半凶master
parent
5b683de5ee
commit
7eaf4df51c
@ -0,0 +1,21 @@
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <memfd_secret.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int fd = memfd_secret(0);
|
||||
|
||||
if(fd < 0) {
|
||||
perror("memfd_secret() failed");
|
||||
return 1;
|
||||
}
|
||||
printf("Created memfd_secret (sec: %d): fd = %d\n", (int)_has_memfd_secret(), fd);
|
||||
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in new issue