Skip to content

Commit 29f07dd

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 c253699 + c6eda66 commit 29f07dd

File tree

5 files changed

+7
-0
lines changed

5 files changed

+7
-0
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3317,6 +3317,9 @@ fn test_linux(target: &str) {
33173317
// linux 5.17 min
33183318
"PR_SET_VMA" | "PR_SET_VMA_ANON_NAME" => true,
33193319

3320+
// GRND_INSECURE was added in glibc-2.32
3321+
"GRND_INSECURE" => true,
3322+
33203323
_ => false,
33213324
}
33223325
});

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)