summaryrefslogtreecommitdiff
path: root/CHANGELOG.md
AgeCommit message (Collapse)Author
2022-11-11Nuke deprecated Errno flagsAlex Saveau
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2022-10-23Add a Statfs::flags methodAlan Somers
It returns the mount flags on the BSDs. On Linux, it returns a slightly different set of flags.
2022-10-23Define `MntFlags` and `unmount` on all of the BSDs.Alan Somers
2022-10-14Update changelogMichael Baikov
2022-10-13add eaccess on FreeBSD, DragonFly and Linux (musl and glibc)Steve Lau
2022-10-10add faccessat on illumosSteve Lau
2022-10-08add syncfs on linuxSteve Lau
2022-10-02re-export RLIM_INFINITY from libcSteve Lau
2022-09-30statfs: add namespace fs magicPedro Tammela
Namespace filesystem magic is missing from FsType constants.
2022-09-27Merge #1825bors[bot]
1825: Add a `sched_getcpu` wrapper r=rtzoeller a=jonas-schievink Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2022-09-27Add a `sched_getcpu` wrapperJonas Schievink
2022-09-25fix crash on Android platformwdsgyj
2022-09-12Merge branch 'master' into issue1814-expose-domainname-of-utsnameSteveLau
2022-09-12Merge #1808bors[bot]
1808: expose memfd on freebsd r=asomers a=i509VCB Resolves #1775 Co-authored-by: i509VCB <git@i509.me>
2022-09-12fix issue1814Steve Lau
2022-09-11Handle unacceptable name gracefully in {User,Group}::from_nameWATANABE Yuki
Calling `unwrap` on the result of `CString::new` may cause the current thread to panic, which is a bit surprising undocumented behavior. It would be more reasonable to treat the erroneous name as a non-existing user or group.
2022-09-07expose memfd on freebsdi509VCB
2022-08-25Add sched_getaffinity and sched_setaffinity on FreeBSDRyan Zoeller
2022-08-22Merge #1805bors[bot]
1805: Add `line` field to `Termios` struct r=rtzoeller a=tertsdiepraam Fixes https://github.com/nix-rust/nix/issues/1802 I have to admit I'm not really sure how to test this properly, so if that's necessary I require some help :) Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
2022-08-22add line field to Termios structTerts Diepraam
2022-08-20fix microsecond calculation for TimeSpecS.J.R. van Schaik
2022-08-14Raise the MSRV to 1.56.1 in anticipation of the next releaseAlan Somers
And fix some documentation lints warned about by the newer rustdoc.
2022-08-13[skip ci] add a CHANGELOG section for the next releaseAlan Somers
2022-08-13(cargo-release) version 0.25.0Alan Somers
2022-08-13[skip ci] reformat CHANGELOG prior to 0.25.0 releaseAlan Somers
2022-08-12Merge #1776bors[bot]
1776: Add support for the IP_SENDSRCADDR control message r=rtzoeller a=matttpt This control message is available on FreeBSD, NetBSD, and OpenBSD. When used with `sendmsg`, it sets the IPv4 source address. This adds support through a new `ControlMessage::Ipv4SendSrcAddr` variant that complements `ControlMessageOwned::Ipv4RecvDstAddr`. A few notes: * `IP_SENDSRCADDR` is actually just an alias for `IP_RECVDSTADDR` (though the code doesn't depend on this). * On NetBSD, `IP_PKTINFO` can be used to accomplish the same thing and is already supported by nix. On FreeBSD and OpenBSD, though, `IP_SENDSRCADDR` is the only method I'm aware of. * The accompanying test binds a UDP socket to all local interfaces (0.0.0.0). If this is not acceptable, please let me know; however, FreeBSD requires this to use `IP_SENDSRCADDR`. I'll add a change-log entry once I see the PR number. Thanks! Co-authored-by: Matthew Ingwersen <matttpt@gmail.com>
2022-08-05add faccessatZhang Miaolei
2022-08-05Add support for the IP_SENDSRCADDR control messageMatthew Ingwersen
This control message (actually just an alias for IP_RECVDSTADDR) sets the IPv4 source address when used with sendmsg. It is available on FreeBSD, NetBSD, OpenBSD, and DragonFlyBSD.
2022-07-26Merge #1772bors[bot]
1772: Add support for RecvOrigDstAddr on Linux r=asomers a=brianmay Fixes #1767 Co-authored-by: Brian May <brian@linuxpenguins.xyz>
2022-07-26Add support for RecvOrigDstAddr on LinuxBrian May
Fixes #1767
2022-07-25Add memfd for target_os = "android"Felix Obenhuber
Memory fds (`memfd`) are implemented and exported by Androids bionic. Export the `memfd` module if the target os is `android`. https://cs.android.com/android/platform/superproject/+/master:bionic/libc/include/sys/mman.h;drc=23c7543b8e608ebcbb38b952761b54bb56065577;bpv=1;bpt=1;l=182
2022-07-24Add ETH_P_ALL protocol number to SockProtocolvaldaarhun
Add note to Changelog.md Make changes in comments Co-authored-by: Alan Somers <asomers@gmail.com> Add Android as target os for ETH_P_ALL
2022-07-23[skip ci] Add 0.24.2 release notes to CHANGELOGAlan Somers
2022-07-15Merge #1741bors[bot]
1741: SigSet: A new unsafe helper method to create a SigSet from a sigset_t r=rtzoeller a=germag Currently, the only way to create a `SigSet` from a `sigset_t` object is by using pointer casts, like: ``` unsafe { let sigset = *(&sigset as *const libc::sigset_t as *const SigSet) }; ``` This is un-ergonomic for library creators with interfaces to C. So, let's add a new unsafe method that creates a `SigSet` from a `libc::sigset_t` object. We can't implement `From` since converting from `libc::sigset_t` to `SigSet` is unsafe, because objects of type `libc::sigset_t` must be initialized by calling either `sigemptyset(3)` or `sigfillset(3)` before being used. In other case, the results are undefined. We can't implement `TryFrom` either, because there is no way to check if an object of type `libc::sigset_t` is initialized. Signed-off-by: German Maglione <gmaglione@redhat.com> Co-authored-by: German Maglione <gmaglione@redhat.com>
2022-07-14Fix a buffer overflow in sys::socket::recvfromAlan Somers
IPv4 and stream sockets are unaffected, but for datagram sockets of other address types libc::recvfrom might overwrite part of the stack. Fixes #1762
2022-07-13Add chflagsmusikid
2022-07-13Added non-standard Linux `SysconfVar` variantsSteven Engler
2022-07-12SigSet: Add the `repr(transparent)` attributeGerman Maglione
This commit adds the `repr(transparent)` attribute to the `SigSet` struct, to make sure that its representation is exactly like the `sigset_t` struct from C, in all cases. Signed-off-by: German Maglione <gmaglione@redhat.com>
2022-07-12SigSet: A new unsafe helper method to create a SigSet from a sigset_tGerman Maglione
Currently, the only way to create a `SigSet` from a `sigset_t` object is by using pointer casts, like: ``` unsafe { let sigset = *(&sigset as *const libc::sigset_t as *const SigSet) }; ``` This is un-ergonomic for library creators with interfaces to C. So, let's add a new unsafe method that creates a `SigSet` from a `libc::sigset_t` object. We can't implement `From` since converting from `libc::sigset_t` to `SigSet` is unsafe, because objects of type `libc::sigset_t` must be initialized by calling either `sigemptyset(3)` or `sigfillset(3)` before being used. In other case, the results are undefined. We can't implement `TryFrom` either, because there is no way to check if an object of type `libc::sigset_t` is initialized. Signed-off-by: German Maglione <gmaglione@redhat.com>
2022-07-11Merge #1759 #1760bors[bot]
1759: More docs for dir and mqueue r=rtzoeller a=asomers Add doc comments for the `dir` and `mqueue` modules. Also, delete dead code in `mqueue` 1760: Add const constructors for TimeSpec and TimeVal r=rtzoeller a=asomers These are basically the same as From<libc::timespec> and From<libc::timeval>, but they're const and require less typing. Co-authored-by: Alan Somers <asomers@gmail.com>
2022-07-10Add const constructors for TimeSpec and TimeValAlan Somers
These are basically the same as From<libc::timespec> and From<libc::timeval>, but they're const and require less typing.
2022-07-11Added CHANGELOGLeo Lu
2022-06-27Change gethostname to return an OsStringNathaniel Daniel
2022-06-27Change gethostname to use a buffer of MaybeUninit valuesNathaniel Daniel
2022-06-20Add getrusage wrapperGustavo Noronha Silva
Includes an enum to specify what to get resource usage for, and a new struct that provides a more readable view into libc::rusage, including using TimeVal for user and system CPU time.
2022-06-09Merge #1739bors[bot]
1739: ppoll: make sigmask parameter optional r=rtzoeller a=stefano-garzarella ppoll(2) supports 'sigmask' as NULL. In that case no signal mask manipulation is performed. Let's make `sigmask` parameter of `nix::poll::ppoll` optional to allow that behaviour. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Co-authored-by: Stefano Garzarella <sgarzare@redhat.com>
2022-06-09ppoll: make sigmask parameter optionalStefano Garzarella
ppoll(2) supports 'sigmask' as NULL. In that case no signal mask manipulation is performed. Let's make `sigmask` parameter of `nix::poll::ppoll` optional to allow that behaviour. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2022-06-07Mention fix in changelog.Andrew Walbran
2022-05-31Enable SockaddrStorage::{as_link_addr, as_link_addr_mut} on Linux.Alan Somers
This was an oversight from #1684. Fixes #1728
2022-05-30Add infallible conversion from uid_t and gid_tKeith Koskie
Implements the following traits: * From<uid_t> for Uid * From<gid_t> for Gid