Update to 4.3.5

Guenther
This commit is contained in:
Günther Deschner 2016-02-23 13:00:50 +01:00
parent 196c353d92
commit a483fb81f7
4 changed files with 62 additions and 73 deletions

1
.gitignore vendored
View File

@ -57,3 +57,4 @@ samba-3.6.0pre1.tar.gz
/samba-4.3.2.tar.xz
/samba-4.3.3.tar.xz
/samba-4.3.4.tar.xz
/samba-4.3.5.tar.xz

View File

@ -1,65 +0,0 @@
From d8a03eeab8ece3d9001b087fc658272174f92a25 Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <ab@samba.org>
Date: Fri, 22 Jan 2016 11:44:03 +0200
Subject: [PATCH] s3-parm: clean up defaults when removing global parameters
When globals are re-initialized, they are cleared and globals' talloc
context is freed. However, parm_table still contains a reference to the
global value in the defaults. This confuses lpcfg_string_free() after
commit 795c543d858b2452f062a02846c2f908fe4cffe4 because it tries to
free already freed pointer which is passed by lp_save_defaults():
....
case P_STRING:
case P_USTRING:
lpcfg_string_set(Globals.ctx,
&parm_table[i].def.svalue,
*(char **)lp_parm_ptr(NULL, &parm_table[i]));
....
here &parm_table[i].def.svalue is passed to lpcfg_string_free() but it
is a pointer to a value allocated with previous Globals.ctx which
already was freed.
This specifically affects registry backend of smb.conf in lp_load_ex()
where init_globals() called explicitly to re-init globals after
lp_save_defaults() if we have registry backend defined.
Signed-off-by: Alexander Bokovoy <ab@samba.org>
---
source3/param/loadparm.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 9f4a2b4..f8ecab7 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -399,8 +399,25 @@ static void free_parameters_by_snum(int snum)
*/
static void free_global_parameters(void)
{
+ uint32_t i;
+ struct parm_struct *parm;
+
free_param_opts(&Globals.param_opt);
free_parameters_by_snum(GLOBAL_SECTION_SNUM);
+
+ /* Reset references in the defaults because the context is going to be freed */
+ for (i=0; parm_table[i].label; i++) {
+ parm = &parm_table[i];
+ if ((parm->type == P_STRING) ||
+ (parm->type == P_USTRING)) {
+ if ((parm->def.svalue != NULL) &&
+ (*(parm->def.svalue) != '\0')) {
+ if (talloc_parent(parm->def.svalue) == Globals.ctx) {
+ parm->def.svalue = NULL;
+ }
+ }
+ }
+ }
TALLOC_FREE(Globals.ctx);
}
--
2.5.0

View File

@ -6,9 +6,9 @@
# ctdb is enabled by default, you can disable it with: --without clustering
%bcond_without clustering
%define main_release 1
%define main_release 0
%define samba_version 4.3.4
%define samba_version 4.3.5
%define talloc_version 2.1.3
%define tdb_version 1.3.7
%define tevent_version 0.9.25
@ -107,8 +107,6 @@ Source6: samba.pamd
Source200: README.dc
Source201: README.downgrade
Patch1: samba-4.3-s3-parm-clean-up-defaults-when-removing-global-param.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Requires(pre): /usr/sbin/groupadd
@ -375,6 +373,20 @@ Provides: samba-glusterfs
Samba VFS module for GlusterFS integration.
%endif
### KRB5-PRINTING
%package krb5-printing
Summary: Samba CUPS backend for printing with Kerberos
Group: Applications/System
Requires(pre): %{name}-client
Requires(post): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives
%description krb5-printing
If you need Kerberos for print jobs to a printer connection to cups via the SMB
backend, then you need to install that package. It will allow cups to access
the Kerberos credentials cache of the user issuing the print job.
### LIBS
%package libs
Summary: Samba libraries
@ -672,7 +684,6 @@ and use CTDB instead.
%prep
%setup -q -n samba-%{version}%{pre_release}
%patch1 -p1
%build
%global _talloc_lib ,talloc,pytalloc,pytalloc-util
@ -789,6 +800,11 @@ then
exit -1
fi
# Move smbspool_krb5_wrapper
install -d -m 0755 %{buildroot}%{_libexecdir}/samba
mv %{buildroot}%{_bindir}/smbspool_krb5_wrapper %{buildroot}%{_libexecdir}/samba
touch %{buildroot}%{_libexecdir}/samba/cups_backend_smb
# Install other stuff
install -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/samba
@ -879,13 +895,39 @@ if [ -d /var/cache/samba ]; then
ln -sf /var/cache/samba /var/lib/samba/
fi
%postun common -p /sbin/ldconfig
%post client
%{_sbindir}/update-alternatives --install %{_libexecdir}/samba/cups_backend_smb \
cups_backend_smb \
%{_bindir}/smbspool 10
%postun client
if [ $1 -eq 0 ] ; then
%{_sbindir}/update-alternatives --remove cups_backend_smb %{_libexecdir}/samba/smbspool
fi
%post client-libs -p /sbin/ldconfig
%postun client-libs -p /sbin/ldconfig
%post common-libs -p /sbin/ldconfig
%postun common-libs -p /sbin/ldconfig
%if %with_dc
%post dc-libs -p /sbin/ldconfig
%postun dc-libs -p /sbin/ldconfig
%endif # with_dc
%endif
%post krb5-printing
%{_sbindir}/update-alternatives --install %{_libexecdir}/samba/cups_backend_smb \
cups_backend_smb \
%{_libexecdir}/samba/smbspool_krb5_wrapper 50
%postun krb5-printing
if [ $1 -eq 0 ] ; then
%{_sbindir}/update-alternatives --remove cups_backend_smb %{_libexecdir}/samba/smbspool_krb5_wrapper
fi
%post libs -p /sbin/ldconfig
@ -1123,6 +1165,8 @@ rm -rf %{buildroot}
%{_bindir}/smbta-util
%{_bindir}/smbtar
%{_bindir}/smbtree
%dir %{_libexecdir}/samba
%ghost %{_libexecdir}/samba/cups_backend_smb
%{_mandir}/man1/dbwrap_tool.1*
%{_mandir}/man1/nmblookup.1*
%{_mandir}/man1/oLschema2ldif.1*
@ -1662,6 +1706,12 @@ rm -rf %{buildroot}
%{_mandir}/man8/vfs_glusterfs.8*
%endif
### KRB5-PRINTING
%files krb5-printing
%defattr(-,root,root)
%attr(0700,root,root) %{_libexecdir}/samba/smbspool_krb5_wrapper
%{_mandir}/man8/smbspool_krb5_wrapper.8*
### LIBS
%files libs
%defattr(-,root,root)
@ -1981,6 +2031,9 @@ rm -rf %{buildroot}
%endif # with_clustering_support
%changelog
* Tue Feb 23 2016 Guenther Deschner <gdeschner@redhat.com> - 4.3.5-0
- resolves: #1261230 - Update to Samba 4.3.5
* Fri Jan 22 2016 Alexander Bokovoy <abokovoy@redhat.com> - 4.3.4-1
- resolves: #1300038 - PANIC: Bad talloc magic value - wrong talloc version used/mixed

View File

@ -1 +1 @@
d0ba6f4da4a7fc4304084d42a2a1a8c7 samba-4.3.4.tar.xz
e0e213ec0f733b63af02596963fbedd3 samba-4.3.5.tar.xz