From c249295c9420bf86fe93b19e9969ed712202e382 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 17:37:20 +0100 Subject: [PATCH] disable winbind by default; add idmap conf in default smb.conf to fix startup with winbind; fix systemd tmpfile /var/run path [release 4.9.4-2mamba;Wed Feb 13 2019] --- samba-4.9.4-conf-idmap.patch | 12 ++++++++++++ samba.spec | 13 ++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 samba-4.9.4-conf-idmap.patch diff --git a/samba-4.9.4-conf-idmap.patch b/samba-4.9.4-conf-idmap.patch new file mode 100644 index 0000000..af3960c --- /dev/null +++ b/samba-4.9.4-conf-idmap.patch @@ -0,0 +1,12 @@ +--- samba-4.9.4/examples/smb.conf.default.orig 2019-02-13 18:58:06.784980885 +0100 ++++ samba-4.9.4/examples/smb.conf.default 2019-02-13 18:59:19.097289090 +0100 +@@ -108,6 +108,9 @@ + ; delete user from group script = /usr/sbin/deluser %u %g + ; delete group script = /usr/sbin/groupdel %g + ++# Needed when used with Winbind ++idmap config * : backend = tdb ++idmap config * : range = 3000-7999 + + #============================ Share Definitions ============================== + [homes] diff --git a/samba.spec b/samba.spec index e9c4f53..acbb38b 100644 --- a/samba.spec +++ b/samba.spec @@ -7,7 +7,7 @@ Name: samba Version: 4.9.4 -Release: 1mamba +Release: 2mamba Summary: Samba provides seamless file and print services to SMB/CIFS clients Group: System/Servers Vendor: openmamba @@ -33,6 +33,7 @@ Source13: winbind-nm-dispatcher Patch0: samba-4.0.6-libtirpc.patch Patch1: samba-4.1.14-no-as-needed.patch # openmamba patches: +Patch2: samba-4.9.4-conf-idmap.patch Patch10: %{name}-3.0.23-smbldaptools-rootbinddn.patch Patch11: %{name}-3.2.4-remove_strlcpy_strlcat.patch Patch12: %{name}-3.5.8-mount_disable_setuid_check.patch @@ -232,6 +233,7 @@ This package contains the winbind daemon and the wbinfo tool. #:<< _EOF #%patch0 -p1 #%patch1 -p1 +%patch2 -p1 %build #:<< _EOF @@ -318,9 +320,7 @@ sed -i "s|/usr/local/samba/var/log|/var/log/samba/log|;\ #done #sed -i "s|/var/run/|/run/|" packaging/systemd/samba.conf.tmp install -D -m0644 packaging/systemd/samba.conf.tmp %{buildroot}%{_tmpfilesdir}/samba.conf -#install -D -m0644 packaging/systemd/samba.conf.tmp %{buildroot}%{_tmpfilesdir}/nmb.conf -#install -D -m0644 packaging/systemd/samba.conf.tmp %{buildroot}%{_tmpfilesdir}/smb.conf -#install -D -m0644 packaging/systemd/samba.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/samba +sed -i "s|/var/run/samba|/run/samba|" %{buildroot}%{_tmpfilesdir}/samba.conf install -D -m 0644 examples/LDAP/samba.schema \ %{buildroot}/etc/openldap/schema/samba.schema @@ -370,7 +370,7 @@ install -d %{buildroot}%{_presetdir} cat > %{buildroot}%{_presetdir}/50-samba.preset << _EOF enable nmb enable smb -enable winbind +disable winbind _EOF %clean @@ -802,6 +802,9 @@ fi %{_mandir}/man8/winbindd.* %changelog +* Wed Feb 13 2019 Silvan Calarco 4.9.4-2mamba +- disable winbind by default; add idmap conf in default smb.conf to fix startup with winbind; fix systemd tmpfile /var/run path + * Sat Jan 12 2019 Automatic Build System 4.9.4-1mamba - automatic version update by autodist