From fa62534a238c86334d41bc1da68267388cda9b36 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sat, 19 Nov 2022 13:39:31 -0700 Subject: Fix using SockaddrStorage to store Unix domain addresses on Linux Since it has variable length, the user of a sockaddr_un must keep track of its true length. On the BSDs, this is handled by the builtin sun_len field. But on Linux-like operating systems it isn't. Fix this bug by explicitly tracking it for SockaddrStorage just like we already do for UnixAddr. Fixes #1866 --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 10a95ad9..65510788 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,9 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] - ReleaseDate ### Added -- Add `MntFlags` and `unmount` on all of the BSDs. +- Added `SockaddrStorage::{as_unix_addr, as_unix_addr_mut}` + ([#1871](https://github.com/nix-rust/nix/pull/1871)) +- Added `MntFlags` and `unmount` on all of the BSDs. ([#1849](https://github.com/nix-rust/nix/pull/1849)) - Added a 'Statfs::flags' method. ([#1849](https://github.com/nix-rust/nix/pull/1849)) @@ -38,6 +40,8 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Fixed +- Fixed using `SockaddrStorage` to store a Unix-domain socket address on Linux. + ([#1871](https://github.com/nix-rust/nix/pull/1871)) - Fix microsecond calculation for `TimeSpec`. ([#1801](https://github.com/nix-rust/nix/pull/1801)) - Fix `User::from_name` and `Group::from_name` panicking -- cgit v1.2.3