From 6e06e462e97b05850f2f9b48eb2f9b16a219c785 Mon Sep 17 00:00:00 2001 From: CuriouslyCurious Date: Tue, 18 Jul 2023 00:07:11 +0200 Subject: [PATCH] Add secure_getenv for Linux variants --- libc-test/semver/linux.txt | 1 + src/unix/linux_like/mod.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/libc-test/semver/linux.txt b/libc-test/semver/linux.txt index e818d2dce675e..8772e773c1d88 100644 --- a/libc-test/semver/linux.txt +++ b/libc-test/semver/linux.txt @@ -3413,6 +3413,7 @@ sched_setparam sched_setscheduler sctp_assoc_t seccomp_data +secure_getenv seed48 seekdir sem_close diff --git a/src/unix/linux_like/mod.rs b/src/unix/linux_like/mod.rs index 3117c18b86a1a..674fe0e132ba6 100644 --- a/src/unix/linux_like/mod.rs +++ b/src/unix/linux_like/mod.rs @@ -1736,6 +1736,7 @@ extern "C" { pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: ::c_int) -> ::c_int; pub fn ptsname_r(fd: ::c_int, buf: *mut ::c_char, buflen: ::size_t) -> ::c_int; pub fn clearenv() -> ::c_int; + pub fn secure_getenv(name: *const ::c_char) -> *mut ::c_char; pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int) -> ::c_int; pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t, suid: *mut ::uid_t) -> ::c_int;