Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ip2unix for openSUSE:Factory checked in at 2026-06-02 16:02:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ip2unix (Old) and /work/SRC/openSUSE:Factory/.ip2unix.new.1937 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ip2unix" Tue Jun 2 16:02:02 2026 rev:8 rq:1356425 version:2.2.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ip2unix/ip2unix.changes 2026-03-04 21:10:46.622231443 +0100 +++ /work/SRC/openSUSE:Factory/.ip2unix.new.1937/ip2unix.changes 2026-06-02 16:02:36.702681018 +0200 @@ -1,0 +2,17 @@ +Mon Jun 1 17:13:44 UTC 2026 - Adam Mizerski <[email protected]> + +- update to 2.2.2 + - Fixed + - Out of range string_view access in globpath. Thanks to Adam Mizerski. + - Typo in README and manpage. + - Invalid use of PROVIDE in linker script. + - reject rule not working with sendto/sendmsg. + - Bug in accept if stdin was closed and accept would return FD 0. + - Broken abstract socket support if used with from-abstract. + - Race condition if the program uses library calls wrapped by ip2unix before + initialisation was done. +- removed patch ip2unix-2.2.1-fix_out_of_range_string_view_access.patch + (applied upstream) +- reenable all tests + +------------------------------------------------------------------- Old: ---- ip2unix-2.2.1-fix_out_of_range_string_view_access.patch ip2unix-2.2.1.tar.gz New: ---- ip2unix-2.2.2.tar.gz ----------(Old B)---------- Old: initialisation was done. - removed patch ip2unix-2.2.1-fix_out_of_range_string_view_access.patch (applied upstream) ----------(Old E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ip2unix.spec ++++++ --- /var/tmp/diff_new_pack.z8zwj5/_old 2026-06-02 16:02:37.778725640 +0200 +++ /var/tmp/diff_new_pack.z8zwj5/_new 2026-06-02 16:02:37.782725806 +0200 @@ -17,13 +17,12 @@ Name: ip2unix -Version: 2.2.1 +Version: 2.2.2 Release: 0 Summary: Turn IP sockets into Unix domain sockets License: LGPL-3.0-only URL: https://github.com/nixcloud/ip2unix Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz -Patch0: https://patch-diff.githubusercontent.com/raw/nixcloud/ip2unix/pull/35.patch#/ip2unix-2.2.1-fix_out_of_range_string_view_access.patch BuildRequires: asciidoc BuildRequires: meson >= 0.47.0 BuildRequires: python3 @@ -66,11 +65,7 @@ %meson_install %check -# exclude test 'ip2unix:integration' (timeout) -test_list=$(%meson_test --list) 2> /dev/null -test_list=${test_list//ip2unix:integration} -test_list=${test_list//integration} -%meson_test $test_list +%meson_test %files %{_bindir}/%{name} ++++++ ip2unix-2.2.1.tar.gz -> ip2unix-2.2.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/CHANGELOG.md new/ip2unix-2.2.2/CHANGELOG.md --- old/ip2unix-2.2.1/CHANGELOG.md 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/CHANGELOG.md 2026-05-23 00:11:07.000000000 +0200 @@ -4,6 +4,19 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning]. +## [2.2.2] - 2026-05-23 + +### Fixed + +- Out of range `string_view` access in `globpath`. Thanks to Adam Mizerski. +- Typo in README and manpage. +- Invalid use of `PROVIDE` in linker script. +- `reject` rule not working with `sendto`/`sendmsg`. +- Bug in `accept` if `stdin` was closed and accept would return FD 0. +- Broken abstract socket support if used with `from-abstract`. +- Race condition if the program uses library calls wrapped by `ip2unix` before + initialisation was done. + ## [2.2.1] - 2023-08-18 ### Fixed @@ -138,6 +151,7 @@ - The initial release, which evolved from an early prototype specific to a certain use case into a more generic command line tool. +[2.2.2]: https://github.com/nixcloud/ip2unix/compare/v2.2.1...v2.2.2 [2.2.1]: https://github.com/nixcloud/ip2unix/compare/v2.2.0...v2.2.1 [2.2.0]: https://github.com/nixcloud/ip2unix/compare/v2.1.4...v2.2.0 [2.1.4]: https://github.com/nixcloud/ip2unix/compare/v2.1.3...v2.1.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/README.adoc new/ip2unix-2.2.2/README.adoc --- old/ip2unix-2.2.1/README.adoc 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/README.adoc 2026-05-23 00:11:07.000000000 +0200 @@ -218,7 +218,7 @@ *port*='PORT'[-'PORT_END']:: Match the UDP or TCP port number which for outgoing connections specifies the -target port and for incomping connections the port that the socket is bound to. +target port and for incoming connections the port that the socket is bound to. + If a range is specified by separating two port numbers via `-`, the given range is matched instead of just a single port. The range is inclusive, so if diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/flake.lock new/ip2unix-2.2.2/flake.lock --- old/ip2unix-2.2.1/flake.lock 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/flake.lock 2026-05-23 00:11:07.000000000 +0200 @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1690893464, - "narHash": "sha256-YiFBn3K4l1AzVt8NeSg9ZJNvHxX2k+AkS74s/s4ASRA=", + "lastModified": 1778869304, + "narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e0e6b6909977de63dab514efbf5470bc31e7055e", + "rev": "d233902339c02a9c334e7e593de68855ad26c4cb", "type": "github" }, "original": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/flake.nix new/ip2unix-2.2.2/flake.nix --- old/ip2unix-2.2.1/flake.nix 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/flake.nix 2026-05-23 00:11:07.000000000 +0200 @@ -18,18 +18,18 @@ attrs = fun pkgs; stdenv = attrs.stdenv or pkgs.stdenv; - libyamlcpp = - if stdenv.cc.isClang then pkgs.libyamlcpp - else pkgs.libyamlcpp.override { inherit stdenv; }; + yaml-cpp = + if stdenv.cc.isClang then pkgs.yaml-cpp + else pkgs.yaml-cpp.override { inherit stdenv; }; in stdenv.mkDerivation (removeAttrs attrs [ "stdenv" ] // rec { inherit (self.packages.${system}.ip2unix) name version src; mesonFlags = [ "-Dtest-timeout=3600" ] ++ attrs.mesonFlags or []; - nativeBuildInputs = [ pkgs.meson pkgs.ninja pkgs.pkgconfig ] + nativeBuildInputs = [ pkgs.meson pkgs.ninja pkgs.pkg-config ] ++ attrs.nativeBuildInputs or []; - buildInputs = [ libyamlcpp ] ++ attrs.buildInputs or []; + buildInputs = [ yaml-cpp ] ++ attrs.buildInputs or []; doCheck = attrs.doCheck or true; @@ -180,7 +180,7 @@ pkgs.docbook5 pkgs.python3Packages.pytest pkgs.python3Packages.pytest-timeout pkgs.systemd ]; - buildInputs = [ pkgs.libyamlcpp ]; + buildInputs = [ pkgs.yaml-cpp ]; doCheck = true; @@ -314,7 +314,16 @@ in lib.optional (majorVersion != null && isEligible) { name = "${compiler}${lib.head majorVersion}"; value = lib.genAttrs req.systems (withSystemFull getPackageAttrs); - }) nixpkgs.legacyPackages.x86_64-linux; + }) (import nixpkgs { + # We use x86_64-linux only for evaluating the package attributes + # available, the final evaluation of the packages themselves are done + # using the real target system. + system = "x86_64-linux"; + # This is to avoid evaluation errors. For example llvmPackages_10 has + # been removed and with aliases enabled, we get an attribute that + # directly leads to a "throw". + config.allowAliases = false; + }); in lib.listToAttrs (mapAttrsToOneList mkCompilerPackages { clang = { @@ -368,6 +377,9 @@ rsession.x86_64-linux = tests/programs/rsession.nix; }; + # FIXME: Currently address/thread sanitizers do not work with integration + # tests because lib[at]san runtimes need to be the initial library + # to be loaded. sanitizer = lib.mapAttrs (name: let genDrv = { fun ? forEachSystem, override ? x: {} }: fun (super: { mesonFlags = [ "-Db_sanitize=${name}" ]; @@ -377,10 +389,9 @@ nativeBuildInputs = [ super.python3 ]; } // override super); in genDrv) { - # FIXME: Currently those do not work with integration tests because - # lib[at]san runtimes need to be the initial library to be - # loaded. - address = {}; + address.fun = fun: let + supportedSystems = lib.remove "aarch64-linux" hydraSystems; + in lib.genAttrs supportedSystems (withSystem fun); thread.fun = fun: let supportedSystems = lib.remove "i686-linux" hydraSystems; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/meson.build new/ip2unix-2.2.2/meson.build --- old/ip2unix-2.2.1/meson.build 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/meson.build 2026-05-23 00:11:07.000000000 +0200 @@ -1,6 +1,6 @@ project('ip2unix', 'cpp', default_options: ['cpp_std=c++17', 'warning_level=3'], - meson_version: '>=0.47.0', version: '2.2.1') + meson_version: '>=0.47.0', version: '2.2.2') script_generrno = files('scripts/generrno.py') script_genoffsets = files('scripts/genoffsets.py') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/scripts/gensyms.py new/ip2unix-2.2.2/scripts/gensyms.py --- old/ip2unix-2.2.1/scripts/gensyms.py 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/scripts/gensyms.py 2026-05-23 00:11:07.000000000 +0200 @@ -37,5 +37,5 @@ sys.stdout.write("{\n global:" + exported + "\n local: *;\n};\n") elif ACTION == '--ldscript': symbols = find_symbols('WRAP_SYM') - lines = map(lambda s: f'PROVIDE({s} = ip2unix_wrap_{s});', symbols) + lines = map(lambda s: f'{s} = ip2unix_wrap_{s};', symbols) sys.stdout.write("\n".join(lines) + "\n") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/src/globpath.cc new/ip2unix-2.2.2/src/globpath.cc --- old/ip2unix-2.2.1/src/globpath.cc 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/src/globpath.cc 2026-05-23 00:11:07.000000000 +0200 @@ -81,7 +81,8 @@ } else if (this->pattern[nextpat] == pathchar) { found = true; } - nextpat++; + if (++nextpat >= this->patlen) + return MatchResult::Invalid; } while (this->pattern[nextpat] != ']'); // Range has ended preliminary (like eg. "[a-]") so we need to match the @@ -157,7 +158,7 @@ if (this->pattern[patpos] == '*') { size_t anum; // Eat up all consecutive "any string" wildcard characters. - for (anum = 0; this->pattern[patpos] == '*'; ++anum) { + for (anum = 0; patpos < this->patlen && this->pattern[patpos] == '*'; ++anum) { // If the wildcard is the last character in pattern, anything // from the rest of path will match. if (patpos >= this->patlen) { @@ -171,7 +172,7 @@ // If the number of asterisks is two followed by a slash, we need // to do recursive globbing, like eg. "a/**/b" or "**/foo". - bool is_slash = this->pattern[patpos] == '/'; + bool is_slash = patpos < this->patlen && this->pattern[patpos] == '/'; if (anum == 2 && last_slash + 2 == patpos && is_slash) { *pattern_pos = patpos + 1; *path_pos = pathpos; @@ -201,7 +202,7 @@ MatchResult result = this->match_fixed(&patpos, &pathpos); if (result == MatchResult::GotSlash) { - if (this->pattern[patpos++] == '/') { + if (patpos < this->patlen && this->pattern[patpos++] == '/') { last_slash = patpos; pathpos++; } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/src/preload.cc new/ip2unix-2.2.2/src/preload.cc --- old/ip2unix-2.2.1/src/preload.cc 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/src/preload.cc 2026-05-23 00:11:07.000000000 +0200 @@ -37,8 +37,23 @@ static std::mutex g_rules_mutex; +static std::once_flag g_rules_init_flag; static std::shared_ptr<const std::vector<Rule>> g_rules = nullptr; +/* + * This is needed because non-local initialisation is not guaranteed to have + * happened as soon as one of our wrapper functions is called. + */ +static bool g_initialised = false; + +__attribute__((constructor(65535))) void mark_initialised(void) { + g_initialised = true; +} + +__attribute__((destructor(65535))) void mark_uninitialised(void) { + g_initialised = false; +} + using RuleMatch = std::optional<std::pair<size_t, const Rule>>; static void init_rules(void) @@ -170,7 +185,7 @@ static RuleMatch match_rule(const SockAddr &addr, const Socket::Ptr sock, const RuleDir dir) { - init_rules(); + std::call_once(g_rules_init_flag, init_rules); size_t rulepos = 0; for ( @@ -318,15 +333,15 @@ RuleDir dir, int fd, const struct sockaddr *addr, socklen_t addrlen) { - if ( + if (!g_initialised || ( addr->sa_family != AF_INET && addr->sa_family != AF_INET6 && addr->sa_family != AF_UNIX - ) return std::invoke(realfun, fd, addr, addrlen); + )) return std::invoke(realfun, fd, addr, addrlen); // NOLINTNEXTLINE(performance-unnecessary-value-param) return Socket::when<int>(fd, [&](Socket::Ptr sock) { - SockAddr inaddr(addr); + SockAddr inaddr(addr, addrlen); if (dir == RuleDir::OUTGOING) { /* If we already got something from a recvfrom or recvmsg, we @@ -409,7 +424,7 @@ return Socket::when<int>(fd, [&](Socket::Ptr sock) { if (sock->rewrite_peer_address) { int accfd = real::accept4(fd, nullptr, nullptr, flags); - if (accfd > 0) + if (accfd >= 0) return sock->accept(accfd, addr, addrlen); return accfd; } @@ -535,7 +550,7 @@ { TRACE_CALL("sendto", fd, buf, len, flags, addr, addrlen); - if (addr == nullptr) + if (!g_initialised || addr == nullptr) return real::sendto(fd, buf, len, flags, addr, addrlen); // NOLINTNEXTLINE(performance-unnecessary-value-param) @@ -543,7 +558,7 @@ if (!sock->rewrite_peer_address) return real::sendto(fd, buf, len, flags, addr, addrlen); - SockAddr addrcopy(addr); + SockAddr addrcopy(addr, addrlen); // XXX: Make all of this DRY! std::optional<SockAddr> newdest = sock->rewrite_dest_peermap(addrcopy); @@ -552,7 +567,7 @@ RuleMatch rule = match_rule(addrcopy, sock, RuleDir::OUTGOING); - if (!rule || !rule->second.action.socket_path) + if (!rule) return real::sendto(fd, buf, len, flags, addr, addrlen); if (rule->second.action.reject) { @@ -560,6 +575,9 @@ return ssize_t{-1}; } + if (!rule->second.action.socket_path) + return real::sendto(fd, buf, len, flags, addr, addrlen); + newdest = sock->rewrite_dest( addrcopy, *rule->second.action.socket_path @@ -583,7 +601,7 @@ { TRACE_CALL("sendmsg", fd, msg, flags); - if (msg->msg_name == nullptr) + if (!g_initialised || msg->msg_name == nullptr) return real::sendmsg(fd, msg, flags); // NOLINTNEXTLINE(performance-unnecessary-value-param) @@ -591,7 +609,10 @@ if (!sock->rewrite_peer_address) return real::sendmsg(fd, msg, flags); - SockAddr addrcopy(reinterpret_cast<const sockaddr*>(msg->msg_name)); + SockAddr addrcopy( + reinterpret_cast<const sockaddr*>(msg->msg_name), + msg->msg_namelen + ); // XXX: Make all of this DRY! std::optional<SockAddr> newdest = sock->rewrite_dest_peermap(addrcopy); @@ -600,7 +621,7 @@ RuleMatch rule = match_rule(addrcopy, sock, RuleDir::OUTGOING); - if (!rule || !rule->second.action.socket_path) + if (!rule) return real::sendmsg(fd, msg, flags); if (rule->second.action.reject) { @@ -608,6 +629,9 @@ return ssize_t{-1}; } + if (!rule->second.action.socket_path) + return real::sendmsg(fd, msg, flags); + newdest = sock->rewrite_dest( addrcopy, *rule->second.action.socket_path @@ -671,10 +695,13 @@ { TRACE_CALL("close", fd); + if (!g_initialised) + return real::close(fd); + #ifdef SYSTEMD_SUPPORT { std::scoped_lock<std::mutex> lock(g_rules_mutex); - init_rules(); + std::call_once(g_rules_init_flag, init_rules); if (Systemd::has_fd(fd)) { LOG(DEBUG) << "Prevented socket fd " << fd << " from being closed," << " because it's a file descriptor passed by systemd."; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/src/sockaddr.cc new/ip2unix-2.2.2/src/sockaddr.cc --- old/ip2unix-2.2.1/src/sockaddr.cc 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/src/sockaddr.cc 2026-05-23 00:11:07.000000000 +0200 @@ -27,9 +27,9 @@ { } -SockAddr::SockAddr(const sockaddr *addr) +SockAddr::SockAddr(const sockaddr *addr, socklen_t addrlen) : inner({}) - , inner_size(family2size(addr->sa_family)) + , inner_size(addrlen) { memcpy(&this->inner, addr, this->inner_size); } @@ -52,14 +52,19 @@ switch (path.type) { case SocketPath::Type::FILESYSTEM: strncpy(ua.sun_path, path.value.c_str(), sizeof(ua.sun_path) - 1); - return SockAddr(reinterpret_cast<const sockaddr*>(&ua)); + return SockAddr( + reinterpret_cast<const sockaddr*>(&ua), + sizeof(sockaddr_un) + ); #ifdef ABSTRACT_SUPPORT case SocketPath::Type::ABSTRACT: ua.sun_path[0] = '\0'; memcpy(ua.sun_path + 1, path.value.c_str(), path.value.size()); - SockAddr sa(reinterpret_cast<const sockaddr*>(&ua)); - sa.inner_size = sizeof(sa_family_t) + path.value.size() + 1; + SockAddr sa( + reinterpret_cast<const sockaddr*>(&ua), + sizeof(sa_family_t) + path.value.size() + 1 + ); return sa; #endif } @@ -69,8 +74,10 @@ SockAddr SockAddr::copy() const { - SockAddr sa(reinterpret_cast<const sockaddr*>(&this->inner)); - sa.inner_size = this->inner_size; + SockAddr sa( + reinterpret_cast<const sockaddr*>(&this->inner), + this->inner_size + ); return sa; } @@ -178,13 +185,32 @@ return false; } -std::optional<SocketPath> SockAddr::get_sockpath(void) const +std::optional<SocketPath> SockAddr::get_sockpath() const { if (this->is_unix()) { - return SocketPath( - SocketPath::Type::FILESYSTEM, - std::string(this->cast_un()->sun_path) - ); + const char *sun_path = this->cast_un()->sun_path; + socklen_t pathlen = this->size() - sizeof(sa_family_t); + + // If the path length is zero, it's an unnamed socket and we don't have + // any path or abstract name. + if (pathlen == 0) + return std::nullopt; + +#ifdef ABSTRACT_SUPPORT + if (*sun_path == '\0') { + return SocketPath( + SocketPath::Type::ABSTRACT, + std::string(sun_path + 1, pathlen - 1) + ); + } else { +#endif + return SocketPath( + SocketPath::Type::FILESYSTEM, + std::string(sun_path) + ); +#ifdef ABSTRACT_SUPPORT + } +#endif } return std::nullopt; @@ -256,9 +282,7 @@ } if (this->is_unix()) { - const sockaddr_un *addr = this->cast_un(); - const sockaddr_un *othr = other.cast_un(); - return std::string(addr->sun_path) == std::string(othr->sun_path); + return this->get_sockpath() == other.get_sockpath(); } return false; @@ -281,8 +305,10 @@ for (const unsigned char &comp : addr->sin6_addr.s6_addr) hashprep << comp; } else if (this->is_unix()) { - const sockaddr_un *addr = this->cast_un(); - hashprep << '|' << std::string(addr->sun_path); + auto maybe_sockpath = this->get_sockpath(); + if (maybe_sockpath) { + hashprep << '|' << maybe_sockpath->value; + } } return std::hash<std::string>{}(hashprep.str()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/src/sockaddr.hh new/ip2unix-2.2.2/src/sockaddr.hh --- old/ip2unix-2.2.1/src/sockaddr.hh 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/src/sockaddr.hh 2026-05-23 00:11:07.000000000 +0200 @@ -21,7 +21,7 @@ struct SockAddr { SockAddr(); - SockAddr(const sockaddr*); + SockAddr(const sockaddr*, socklen_t); static std::optional<SockAddr> unix(const SocketPath&); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/src/socket.cc new/ip2unix-2.2.2/src/socket.cc --- old/ip2unix-2.2.1/src/socket.cc 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/src/socket.cc 2026-05-23 00:11:07.000000000 +0200 @@ -331,7 +331,7 @@ if (this->domain == AF_UNIX) { SocketPath newpath = this->format_sockpath(path, addr); USOCK_OR_EFAULT(newpath); - return real::connect(this->fd, dest.cast(), dest.size()); + return real::bind(this->fd, dest.cast(), dest.size()); } if (!this->make_unix()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/tests/meson.build new/ip2unix-2.2.2/tests/meson.build --- old/ip2unix-2.2.1/tests/meson.build 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/tests/meson.build 2026-05-23 00:11:07.000000000 +0200 @@ -34,6 +34,11 @@ ' tests for socket activation.') endif endif + + if abstract_enabled + pytest_args += ['--abstract-support'] + endif + test('integration', pytest, args: pytest_args, timeout: timeout, workdir: meson.current_source_dir(), depends: [ip2unix, libip2unix, helper_accept_no_peer_addr], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/tests/programs/rsession.nix new/ip2unix-2.2.2/tests/programs/rsession.nix --- old/ip2unix-2.2.1/tests/programs/rsession.nix 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/tests/programs/rsession.nix 2026-05-23 00:11:07.000000000 +0200 @@ -4,7 +4,7 @@ pkgs.runCommand "test-rsession" { nativeBuildInputs = [ ip2unix pkgs.R pkgs.curl - "${pkgs.rstudio.override { hunspellDicts = {}; }}/lib/rstudio" + (pkgs.rstudio.override { server = true; }) ]; LD_LIBRARY_PATH = "${pkgs.R}/lib/R/lib"; R_HOME = "${pkgs.R}/lib/R"; @@ -15,7 +15,7 @@ export HOME="$PWD" export LANG=C - ip2unix -r path=test.socket rsession \ + ip2unix -r path=test.socket,noremove rsession \ --standalone=1 --program-mode=server --log-stderr=1 \ --www-address 127.0.0.1 --www-port 8080 & while [ ! -e test.socket ]; do sleep 1; done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/tests/test_accept_no_peer_addr.py new/ip2unix-2.2.2/tests/test_accept_no_peer_addr.py --- old/ip2unix-2.2.1/tests/test_accept_no_peer_addr.py 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/tests/test_accept_no_peer_addr.py 2026-05-23 00:11:07.000000000 +0200 @@ -15,7 +15,7 @@ while True: try: client.connect(sockfile) - except FileNotFoundError: + except (FileNotFoundError, ConnectionRefusedError): pass else: break diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/tests/test_closeallfds.py new/ip2unix-2.2.2/tests/test_closeallfds.py --- old/ip2unix-2.2.1/tests/test_closeallfds.py 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/tests/test_closeallfds.py 2026-05-23 00:11:07.000000000 +0200 @@ -41,7 +41,7 @@ while True: try: client.connect(sockfile) - except FileNotFoundError: + except (FileNotFoundError, ConnectionRefusedError): pass else: break diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/tests/test_double_accept.py new/ip2unix-2.2.2/tests/test_double_accept.py --- old/ip2unix-2.2.1/tests/test_double_accept.py 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/tests/test_double_accept.py 2026-05-23 00:11:07.000000000 +0200 @@ -38,7 +38,7 @@ while True: try: client.connect(sockfile) - except FileNotFoundError: + except (FileNotFoundError, ConnectionRefusedError): pass else: break diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/tests/test_port_range.py new/ip2unix-2.2.2/tests/test_port_range.py --- old/ip2unix-2.2.1/tests/test_port_range.py 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/tests/test_port_range.py 2026-05-23 00:11:07.000000000 +0200 @@ -42,7 +42,7 @@ while True: try: client.connect(path.replace('%p', str(port))) - except FileNotFoundError: + except (FileNotFoundError, ConnectionRefusedError): pass else: break diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ip2unix-2.2.1/tests/test_reject.py new/ip2unix-2.2.2/tests/test_reject.py --- old/ip2unix-2.2.1/tests/test_reject.py 2023-08-18 20:23:23.000000000 +0200 +++ new/ip2unix-2.2.2/tests/test_reject.py 2026-05-23 00:11:07.000000000 +0200 @@ -20,6 +20,12 @@ with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as server: with assert_reject(errno.EPERM): + server.sendto(b'dummy', ('127.0.0.1', 1234)) + + with assert_reject(errno.EPERM): + server.sendmsg([b'dummy'], [], 0, ('127.0.0.1', 1234)) + + with assert_reject(errno.EPERM): server.bind(('127.0.0.1', 1234)) with assert_reject(errno.EPERM): @@ -27,6 +33,12 @@ with socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) as server: with assert_reject(errno.EACCES): + server.sendto(b'dummy', ('1234::1', 1234)) + + with assert_reject(errno.EACCES): + server.sendmsg([b'dummy'], [], 0, ('1234::1', 1234)) + + with assert_reject(errno.EACCES): server.bind(('1234::1', 1234)) with assert_reject(errno.EACCES):
