Skip to content

Commit 837310d

Browse files
committed
Auto merge of #942 - wictory:pledge_changed, r=alexcrichton
Arguments of pledge(2) changed. The arguments of pledge(2) have changed. However, the changes have to yet been propagated to Bitrig. https://marc.info/?l=openbsd-tech&m=151268831628549&w=2
2 parents 1669334 + 349d343 commit 837310d

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ extern {
9191
locale: *const ::c_char,
9292
base: ::locale_t) -> ::locale_t;
9393
pub fn uselocale(loc: ::locale_t) -> ::locale_t;
94+
pub fn pledge(promises: *const ::c_char,
95+
paths: *mut *const ::c_char) -> ::c_int;
9496
pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char;
9597
}
9698

src/unix/bsd/netbsdlike/openbsdlike/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,8 +720,6 @@ extern {
720720
newlen: ::size_t)
721721
-> ::c_int;
722722
pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;
723-
pub fn pledge(promises: *const ::c_char,
724-
paths: *mut *const ::c_char) -> ::c_int;
725723
pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
726724
pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
727725
}

src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ extern {
5050
addrlen: *mut ::socklen_t, flags: ::c_int) -> ::c_int;
5151
pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
5252
envp: *const *const ::c_char) -> ::c_int;
53+
pub fn pledge(promises: *const ::c_char,
54+
execpromises: *const ::c_char) -> ::c_int;
5355
}
5456

5557
cfg_if! {

0 commit comments

Comments
 (0)