The Samba-Bugzilla – Attachment 16989 Details for
Bug 14900
Regression: Samba 4.15.2 on macOS segfaults intermittently during strcpy in tdbsam_getsampwnam
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
samba.rb (Usage: `brew install --build-from-source ./samba.rb && brew test ./samba.rb`)
samba.rb (text/x-ruby-script), 5.53 KB, created by
Akihiro Suda
on 2021-11-11 07:11:43 UTC
(
hide
)
Description:
samba.rb (Usage: `brew install --build-from-source ./samba.rb && brew test ./samba.rb`)
Filename:
MIME Type:
Creator:
Akihiro Suda
Created:
2021-11-11 07:11:43 UTC
Size:
5.53 KB
patch
obsolete
># From https://github.com/Homebrew/homebrew-core/pull/89142 > ># Test: ># brew install --build-from-source ./samba.rb ># brew test ./samba.rb > ># The test segfaults intermittently: https://github.com/Homebrew/homebrew-core/pull/89142#issuecomment-965096496 ># > BACKTRACE: 34 stack frames: ># > #0 0 libsamba-util.0.0.1.dylib 0x000000010f4521ef log_stack_trace + 52 ># > #1 1 libsamba-util.0.0.1.dylib 0x000000010f4522be smb_panic + 14 ># > #2 2 libsamba-util.0.0.1.dylib 0x000000010f4524e0 BlockSignals + 0 ># > #3 3 libsamba-util.0.0.1.dylib 0x000000010f452058 smb_panic_log + 0 ># > #4 4 libsystem_platform.dylib 0x00007ff808c66e2d _sigtramp + 29 ># > #5 5 ??? 0x0000000000000001 0x0 + 1 ># > #6 6 libsystem_platform.dylib 0x00007ff808c65008 _platform_strlcpy + 28 ># > #7 7 libsystem_c.dylib 0x00007ff808b22cd8 __strlcpy_chk + 30 ># > #8 8 libsamba-passdb.0.28.0.dylib 0x000000010fdea642 tdbsam_getsampwnam + 81 ># > #9 9 libsamba-passdb.0.28.0.dylib 0x000000010fde907a pdb_default_id_to_sid + 97 ># > ... > >class Samba < Formula > # Samba can be used to share directories with the guest in QEMU user-mode > # (SLIRP) networking with the `-net nic -net user,smb=/share/this/with/guest` > # option. The shared folder appears in the guest as "\\10.0.2.4\qemu". > desc "SMB/CIFS file, print, and login server for UNIX" > homepage "https://www.samba.org/" > url "https://download.samba.org/pub/samba/stable/samba-4.15.2.tar.gz" > sha256 "6281d7c6a8c49f7990a9f249a66784b35180fe249557ef1147cd8a6d166a2113" > license "GPL-3.0-or-later" > > livecheck do > url "https://www.samba.org/samba/download/" > regex(/href=.*?samba[._-]v?(\d+(?:\.\d+)+)\.t/i) > end > > # configure requires python3 binary to be present, even when --disable-python is set. > depends_on "python@3.10" => :build > depends_on "gnutls" > > uses_from_macos "bison" => :build > uses_from_macos "flex" => :build > uses_from_macos "perl" => :build > > resource "Parse::Yapp" do > url "https://cpan.metacpan.org/authors/id/W/WB/WBRASWELL/Parse-Yapp-1.21.tar.gz" > sha256 "3810e998308fba2e0f4f26043035032b027ce51ce5c8a52a8b8e340ca65f13e5" > 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 > ENV.prepend_create_path "PERL5LIB", buildpath/"lib/perl5" > ENV.prepend_path "PATH", buildpath/"bin" > resource("Parse::Yapp").stage do > system "perl", "Makefile.PL", "INSTALL_BASE=#{buildpath}" > system "make" > system "make", "install" > end > end > ENV.append "LDFLAGS", "-Wl,-rpath,#{lib}/private" if OS.linux? > system "./configure", > "--disable-cephfs", > "--disable-cups", > "--disable-iprint", > "--disable-glusterfs", > "--disable-python", > "--without-acl-support", > "--without-ad-dc", > "--without-ads", > "--without-ldap", > "--without-libarchive", > "--without-json", > "--without-pam", > "--without-regedit", > "--without-syslog", > "--without-utmp", > "--without-winbind", > "--with-shared-modules=!vfs_snapper", > "--prefix=#{prefix}", > "--sysconfdir=#{etc}", > "--localstatedir=#{var}" > system "make" > system "make", "install" > if OS.mac? > # macOS has its own SMB daemon as /usr/sbin/smbd, so rename our smbd to samba-dot-org-smbd to avoid conflict. > # samba-dot-org-smbd is used by qemu.rb . > # Rename profiles as well to avoid conflicting with /usr/bin/profiles > mv sbin/"smbd", sbin/"samba-dot-org-smbd" > mv bin/"profiles", bin/"samba-dot-org-profiles" > end > end > > def caveats > on_macos do > <<~EOS > To avoid conflicting with macOS system binaries, some files were installed with non-standard name: > - smbd: #{HOMEBREW_PREFIX}/sbin/samba-dot-org-smbd > - profiles: #{HOMEBREW_PREFIX}/bin/samba-dot-org-profiles > EOS > end > end > > test do > smbd = "#{sbin}/smbd" > on_macos do > smbd = "#{sbin}/samba-dot-org-smbd" > end > > system smbd, "--build-options", "--configfile=/dev/null" > system smbd, "--version" > > mkdir_p "samba/state" > mkdir_p "samba/data" > (testpath/"samba/data/hello").write "hello" > > # mimic smb.conf generated by qemu > # https://github.com/qemu/qemu/blob/v6.0.0/net/slirp.c#L862 > (testpath/"smb.conf").write <<~EOS > [global] > private dir=#{testpath}/samba/state > interfaces=127.0.0.1 > bind interfaces only=yes > pid directory=#{testpath}/samba/state > lock directory=#{testpath}/samba/state > state directory=#{testpath}/samba/state > cache directory=#{testpath}/samba/state > ncalrpc dir=#{testpath}/samba/state/ncalrpc > log file=#{testpath}/samba/state/log.smbd > smb passwd file=#{testpath}/samba/state/smbpasswd > security = user > map to guest = Bad User > load printers = no > printing = bsd > disable spoolss = yes > usershare max shares = 0 > [test] > path=#{testpath}/samba/data > read only=no > guest ok=yes > force user=#{ENV["USER"]} > EOS > > port = free_port > spawn smbd, "--debug-stdout", "-F", "--configfile=smb.conf", "--port=#{port}", "--debuglevel=4", in: "/dev/null" > > sleep 5 > mkdir_p "got" > system "smbclient", "-p", port.to_s, "-N", "//127.0.0.1/test", "-c", "get hello #{testpath}/got/hello" > assert_equal "hello", (testpath/"got/hello").read > end >end
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 14900
: 16989 |
17147
|
17165