From 3849a3e09cfe7bc0ade2a6d80e0ab3028ce9958d Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Sun, 6 Feb 2022 18:43:59 +0900 Subject: [PATCH] samba: apply `[PATCH] smbd: Safeguards for getpwuid` Fix `Regression: Samba 4.15.2 on macOS segfaults intermittently during strcpy in tdbsam_getsampwnam` https://bugzilla.samba.org/show_bug.cgi?id=14900 Closes #94591. Signed-off-by: Akihiro Suda Signed-off-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> --- Formula/samba.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Formula/samba.rb b/Formula/samba.rb index 4244ace11e4..ede2bb6ca89 100644 --- a/Formula/samba.rb +++ b/Formula/samba.rb @@ -7,6 +7,7 @@ class Samba < Formula url "https://download.samba.org/pub/samba/stable/samba-4.15.5.tar.gz" sha256 "69115e33831937ba5151be0247943147765aece658ba743f44741672ad68d17f" license "GPL-3.0-or-later" + revision 1 livecheck do url "https://www.samba.org/samba/download/" @@ -35,6 +36,14 @@ class Samba < Formula sha256 "3810e998308fba2e0f4f26043035032b027ce51ce5c8a52a8b8e340ca65f13e5" end + # [PATCH] smbd: Safeguards for getpwuid + # Fix `Regression: Samba 4.15.2 on macOS segfaults intermittently during strcpy in tdbsam_getsampwnam` + # https://bugzilla.samba.org/show_bug.cgi?id=14900 + patch do + url "https://attachments.samba.org/attachment.cgi?id=17147" + sha256 "ca414d668d4c669e9d1886ccfc81bf5215f002ae7a2ca9491ac99548dd88bf9b" + end + def install # avoid `perl module "Parse::Yapp::Driver" not found` error on macOS 10.xx (not required on 11) if MacOS.version < :big_sur