Skip to content

Commit 552d131

Browse files
committed
linux: add GRND_INSECURE constant
This is available on kernels ≥5.6 and was added to glibc in 2.32.
1 parent 53f78cd commit 552d131

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
@@ -1728,6 +1728,9 @@ fn test_android(target: &str) {
17281728
// linux 5.12 min
17291729
"MPOL_F_NUMA_BALANCING" => true,
17301730

1731+
// GRND_INSECURE was added in platform-tools-30.0.0
1732+
"GRND_INSECURE" => true,
1733+
17311734
_ => false,
17321735
}
17331736
});
@@ -3317,6 +3320,9 @@ fn test_linux(target: &str) {
33173320
// linux 5.17 min
33183321
"PR_SET_VMA" | "PR_SET_VMA_ANON_NAME" => true,
33193322

3323+
// GRND_INSECURE was added in glibc-2.32
3324+
"GRND_INSECURE" => true,
3325+
33203326
_ => false,
33213327
}
33223328
});

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
@@ -1781,6 +1781,7 @@ pub const PR_SET_VMA_ANON_NAME: ::c_int = 0;
17811781

17821782
pub const GRND_NONBLOCK: ::c_uint = 0x0001;
17831783
pub const GRND_RANDOM: ::c_uint = 0x0002;
1784+
pub const GRND_INSECURE: ::c_uint = 0x0004;
17841785

17851786
pub const SECCOMP_MODE_DISABLED: ::c_uint = 0;
17861787
pub const SECCOMP_MODE_STRICT: ::c_uint = 1;

0 commit comments

Comments
 (0)