Skip to content

Commit dcd0a69

Browse files
committed
Auto merge of #2743 - zx2c4-forks:grnd_insecure, r=Amanieu
linux: add GRND_INSECURE constant This is available on kernels ≥5.6.
2 parents 5ac0884 + 552d131 commit dcd0a69

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

libc-test/build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,6 +1732,9 @@ fn test_android(target: &str) {
17321732
// linux 5.12 min
17331733
"MPOL_F_NUMA_BALANCING" => true,
17341734

1735+
// GRND_INSECURE was added in platform-tools-30.0.0
1736+
"GRND_INSECURE" => true,
1737+
17351738
_ => false,
17361739
}
17371740
});
@@ -3322,6 +3325,9 @@ fn test_linux(target: &str) {
33223325
// linux 5.17 min
33233326
"PR_SET_VMA" | "PR_SET_VMA_ANON_NAME" => true,
33243327

3328+
// GRND_INSECURE was added in glibc-2.32
3329+
"GRND_INSECURE" => true,
3330+
33253331
_ => false,
33263332
}
33273333
});

libc-test/semver/android.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ GENL_NAMSIZ
661661
GENL_UNS_ADMIN_PERM
662662
GRND_NONBLOCK
663663
GRND_RANDOM
664+
GRND_INSECURE
664665
GRPQUOTA
665666
HPFS_SUPER_MAGIC
666667
HUGETLBFS_MAGIC

libc-test/semver/linux.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ GLOB_NOSORT
649649
GLOB_NOSPACE
650650
GRND_NONBLOCK
651651
GRND_RANDOM
652+
GRND_INSECURE
652653
IBSHIFT
653654
IFA_ADDRESS
654655
IFA_ANYCAST

src/unix/linux_like/android/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,6 +1792,7 @@ pub const NETLINK_GET_STRICT_CHK: ::c_int = 12;
17921792

17931793
pub const GRND_NONBLOCK: ::c_uint = 0x0001;
17941794
pub const GRND_RANDOM: ::c_uint = 0x0002;
1795+
pub const GRND_INSECURE: ::c_uint = 0x0004;
17951796

17961797
pub const SECCOMP_MODE_DISABLED: ::c_uint = 0;
17971798
pub const SECCOMP_MODE_STRICT: ::c_uint = 1;

src/unix/linux_like/linux/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,6 +1784,7 @@ pub const PR_SET_VMA_ANON_NAME: ::c_int = 0;
17841784

17851785
pub const GRND_NONBLOCK: ::c_uint = 0x0001;
17861786
pub const GRND_RANDOM: ::c_uint = 0x0002;
1787+
pub const GRND_INSECURE: ::c_uint = 0x0004;
17871788

17881789
pub const SECCOMP_MODE_DISABLED: ::c_uint = 0;
17891790
pub const SECCOMP_MODE_STRICT: ::c_uint = 1;

0 commit comments

Comments
 (0)