Update to Samba 4.10.6

Guenther
This commit is contained in:
Günther Deschner 2019-07-08 16:10:49 +02:00
parent b6c2e29b4a
commit f69b2b0217
7 changed files with 11 additions and 4703 deletions

2
.gitignore vendored
View File

@ -167,3 +167,5 @@ samba-3.6.0pre1.tar.gz
/samba-4.10.4.tar.asc
/samba-4.10.5.tar.xz
/samba-4.10.5.tar.asc
/samba-4.10.6.tar.xz
/samba-4.10.6.tar.asc

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,276 +0,0 @@
From 1ea533bd5f7f6febeeb1a4261f2afbb19081e8eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org>
Date: Mon, 3 Jun 2019 14:27:18 +0200
Subject: [PATCH 1/4] Revert "s3/vfs_glusterfs: Dynamically determine NAME_MAX"
This reverts commit 8e3a042eb9e502821b147f1bbb2d98d59f17a095.
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
---
source3/modules/vfs_glusterfs.c | 37 +++++++--------------------------
1 file changed, 8 insertions(+), 29 deletions(-)
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 2b5385e44b0..ba8973fa6d3 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -1454,36 +1454,20 @@ static int vfs_gluster_chflags(struct vfs_handle_struct *handle,
static int vfs_gluster_get_real_filename(struct vfs_handle_struct *handle,
const char *path, const char *name,
- TALLOC_CTX *mem_ctx, char **_found_name)
+ TALLOC_CTX *mem_ctx, char **found_name)
{
int ret;
- char *key_buf = NULL, *val_buf = NULL;
- long name_max;
- char *found_name = NULL;
+ char key_buf[NAME_MAX + 64];
+ char val_buf[NAME_MAX + 1];
- name_max = pathconf(path, _PC_NAME_MAX);
- if ((name_max + 1) < 1) {
- errno = EINVAL;
- return -1;
- }
-
- if (strlen(name) >= name_max) {
+ if (strlen(name) >= NAME_MAX) {
errno = ENAMETOOLONG;
return -1;
}
- key_buf = talloc_asprintf(mem_ctx, "glusterfs.get_real_filename:%s",
- name);
- if (key_buf == NULL) {
- errno = ENOMEM;
- return -1;
- }
+ snprintf(key_buf, NAME_MAX + 64,
+ "glusterfs.get_real_filename:%s", name);
- val_buf = talloc_zero_array(mem_ctx, char, name_max + 1);
- if (val_buf == NULL) {
- errno = ENOMEM;
- return -1;
- }
ret = glfs_getxattr(handle->data, path, key_buf, val_buf, NAME_MAX + 1);
if (ret == -1) {
if (errno == ENOATTR) {
@@ -1492,16 +1476,11 @@ static int vfs_gluster_get_real_filename(struct vfs_handle_struct *handle,
return -1;
}
- found_name = talloc_strdup(mem_ctx, val_buf);
- if (found_name == NULL) {
+ *found_name = talloc_strdup(mem_ctx, val_buf);
+ if (found_name[0] == NULL) {
errno = ENOMEM;
return -1;
}
- *_found_name = found_name;
-
- TALLOC_FREE(key_buf);
- TALLOC_FREE(val_buf);
-
return 0;
}
--
2.21.0
From 01a569bec073ce45f412884d340ecfc50ce41fbe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org>
Date: Mon, 3 Jun 2019 14:27:44 +0200
Subject: [PATCH 2/4] Revert "s3/vfs_glusterfs_fuse: Dynamically determine
NAME_MAX"
This reverts commit e28d172b00cadf492c22bd892e2dda3bf2fe2d70.
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
---
source3/modules/vfs_glusterfs_fuse.c | 32 ++++++----------------------
1 file changed, 6 insertions(+), 26 deletions(-)
diff --git a/source3/modules/vfs_glusterfs_fuse.c b/source3/modules/vfs_glusterfs_fuse.c
index 0b1de9fcdb2..8855cd18d01 100644
--- a/source3/modules/vfs_glusterfs_fuse.c
+++ b/source3/modules/vfs_glusterfs_fuse.c
@@ -28,35 +28,19 @@ static int vfs_gluster_fuse_get_real_filename(struct vfs_handle_struct *handle,
char **_found_name)
{
int ret;
- char *key_buf = NULL, *val_buf = NULL;
- long name_max;
+ char key_buf[NAME_MAX + 64];
+ char val_buf[NAME_MAX + 1];
char *found_name = NULL;
- name_max = pathconf(path, _PC_NAME_MAX);
- if ((name_max + 1) < 1) {
- errno = EINVAL;
- return -1;
- }
-
- if (strlen(name) >= name_max) {
+ if (strlen(name) >= NAME_MAX) {
errno = ENAMETOOLONG;
return -1;
}
- key_buf = talloc_asprintf(mem_ctx, "glusterfs.get_real_filename:%s",
- name);
- if (key_buf == NULL) {
- errno = ENOMEM;
- return -1;
- }
-
- val_buf = talloc_zero_array(mem_ctx, char, name_max + 1);
- if (val_buf == NULL) {
- errno = ENOMEM;
- return -1;
- }
+ snprintf(key_buf, NAME_MAX + 64,
+ "glusterfs.get_real_filename:%s", name);
- ret = getxattr(path, key_buf, val_buf, name_max + 1);
+ ret = getxattr(path, key_buf, val_buf, NAME_MAX + 1);
if (ret == -1) {
if (errno == ENOATTR) {
errno = EOPNOTSUPP;
@@ -70,10 +54,6 @@ static int vfs_gluster_fuse_get_real_filename(struct vfs_handle_struct *handle,
return -1;
}
*_found_name = found_name;
-
- TALLOC_FREE(key_buf);
- TALLOC_FREE(val_buf);
-
return 0;
}
--
2.21.0
From e85bb58532fe82daac6e50e88d08bbab66cb1019 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org>
Date: Mon, 3 Jun 2019 16:25:46 +0200
Subject: [PATCH 3/4] s3/vfs_glusterfs: Avoid using NAME_MAX directly
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13872
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
---
source3/modules/vfs_glusterfs.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index ba8973fa6d3..a9415952b4e 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -47,6 +47,7 @@
#include "modules/posixacl_xattr.h"
#define DEFAULT_VOLFILE_SERVER "localhost"
+#define GLUSTER_NAME_MAX 255
static int read_fd = -1;
static int write_fd = -1;
@@ -1457,18 +1458,19 @@ static int vfs_gluster_get_real_filename(struct vfs_handle_struct *handle,
TALLOC_CTX *mem_ctx, char **found_name)
{
int ret;
- char key_buf[NAME_MAX + 64];
- char val_buf[NAME_MAX + 1];
+ char key_buf[GLUSTER_NAME_MAX + 64];
+ char val_buf[GLUSTER_NAME_MAX + 1];
- if (strlen(name) >= NAME_MAX) {
+ if (strlen(name) >= GLUSTER_NAME_MAX) {
errno = ENAMETOOLONG;
return -1;
}
- snprintf(key_buf, NAME_MAX + 64,
+ snprintf(key_buf, GLUSTER_NAME_MAX + 64,
"glusterfs.get_real_filename:%s", name);
- ret = glfs_getxattr(handle->data, path, key_buf, val_buf, NAME_MAX + 1);
+ ret = glfs_getxattr(handle->data, path, key_buf, val_buf,
+ GLUSTER_NAME_MAX + 1);
if (ret == -1) {
if (errno == ENOATTR) {
errno = EOPNOTSUPP;
--
2.21.0
From 7cc9e3fe24dd476360837c04538345752048e6be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org>
Date: Mon, 3 Jun 2019 16:28:36 +0200
Subject: [PATCH 4/4] s3/vfs_glusterfs_fuse: Avoid using NAME_MAX directly
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13872
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Jun 11 00:29:19 UTC 2019 on sn-devel-184
---
source3/modules/vfs_glusterfs_fuse.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/source3/modules/vfs_glusterfs_fuse.c b/source3/modules/vfs_glusterfs_fuse.c
index 8855cd18d01..d92f5e2b08b 100644
--- a/source3/modules/vfs_glusterfs_fuse.c
+++ b/source3/modules/vfs_glusterfs_fuse.c
@@ -21,6 +21,8 @@
#include "smbd/smbd.h"
#include "system/filesys.h"
+#define GLUSTER_NAME_MAX 255
+
static int vfs_gluster_fuse_get_real_filename(struct vfs_handle_struct *handle,
const char *path,
const char *name,
@@ -28,19 +30,19 @@ static int vfs_gluster_fuse_get_real_filename(struct vfs_handle_struct *handle,
char **_found_name)
{
int ret;
- char key_buf[NAME_MAX + 64];
- char val_buf[NAME_MAX + 1];
+ char key_buf[GLUSTER_NAME_MAX + 64];
+ char val_buf[GLUSTER_NAME_MAX + 1];
char *found_name = NULL;
- if (strlen(name) >= NAME_MAX) {
+ if (strlen(name) >= GLUSTER_NAME_MAX) {
errno = ENAMETOOLONG;
return -1;
}
- snprintf(key_buf, NAME_MAX + 64,
+ snprintf(key_buf, GLUSTER_NAME_MAX + 64,
"glusterfs.get_real_filename:%s", name);
- ret = getxattr(path, key_buf, val_buf, NAME_MAX + 1);
+ ret = getxattr(path, key_buf, val_buf, GLUSTER_NAME_MAX + 1);
if (ret == -1) {
if (errno == ENOATTR) {
errno = EOPNOTSUPP;
--
2.21.0

View File

@ -1,115 +0,0 @@
From bb253743e7e757c3ee063b12f79689f4f8355a71 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@fedoraproject.org>
Date: Wed, 12 Jun 2019 12:27:04 +0200
Subject: [PATCH] wafsamba: Use native waf timer
__main__:1: DeprecationWarning: time.clock has been deprecated in Python 3.3
and will be removed from Python 3.8: use time.perf_counter
or time.process_time instead
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13998
Signed-off-by: Lukas Slebodnik <lslebodn@fedoraproject.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 8f082904ce580f1a6b8a06ebcc323c99e892bd1f)
---
buildtools/wafsamba/samba_deps.py | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py
index f8c38809bd2..03c37079a8c 100644
--- a/buildtools/wafsamba/samba_deps.py
+++ b/buildtools/wafsamba/samba_deps.py
@@ -1,6 +1,6 @@
# Samba automatic dependency handling and project rules
-import os, sys, re, time
+import os, sys, re
from waflib import Build, Options, Logs, Utils, Errors
from waflib.Logs import debug
@@ -1102,8 +1102,7 @@ def check_project_rules(bld):
if not force_project_rules and load_samba_deps(bld, tgt_list):
return
- global tstart
- tstart = time.clock()
+ timer = Utils.Timer()
bld.new_rules = True
Logs.info("Checking project rules ...")
@@ -1112,26 +1111,26 @@ def check_project_rules(bld):
expand_subsystem_deps(bld)
- debug("deps: expand_subsystem_deps: %f" % (time.clock() - tstart))
+ debug("deps: expand_subsystem_deps: %s" % str(timer))
replace_grouping_libraries(bld, tgt_list)
- debug("deps: replace_grouping_libraries: %f" % (time.clock() - tstart))
+ debug("deps: replace_grouping_libraries: %s" % str(timer))
build_direct_deps(bld, tgt_list)
- debug("deps: build_direct_deps: %f" % (time.clock() - tstart))
+ debug("deps: build_direct_deps: %s" % str(timer))
break_dependency_loops(bld, tgt_list)
- debug("deps: break_dependency_loops: %f" % (time.clock() - tstart))
+ debug("deps: break_dependency_loops: %s" % str(timer))
if Options.options.SHOWDEPS:
show_dependencies(bld, Options.options.SHOWDEPS, set())
calculate_final_deps(bld, tgt_list, loops)
- debug("deps: calculate_final_deps: %f" % (time.clock() - tstart))
+ debug("deps: calculate_final_deps: %s" % str(timer))
if Options.options.SHOW_DUPLICATES:
show_object_duplicates(bld, tgt_list)
@@ -1140,7 +1139,7 @@ def check_project_rules(bld):
for f in [ build_dependencies, build_includes, add_init_functions ]:
debug('deps: project rules checking %s', f)
for t in tgt_list: f(t)
- debug("deps: %s: %f" % (f, time.clock() - tstart))
+ debug("deps: %s: %s" % (f, str(timer)))
debug('deps: project rules stage1 completed')
@@ -1148,17 +1147,17 @@ def check_project_rules(bld):
Logs.error("Duplicate sources present - aborting")
sys.exit(1)
- debug("deps: check_duplicate_sources: %f" % (time.clock() - tstart))
+ debug("deps: check_duplicate_sources: %s" % str(timer))
if not bld.check_group_ordering(tgt_list):
Logs.error("Bad group ordering - aborting")
sys.exit(1)
- debug("deps: check_group_ordering: %f" % (time.clock() - tstart))
+ debug("deps: check_group_ordering: %s" % str(timer))
show_final_deps(bld, tgt_list)
- debug("deps: show_final_deps: %f" % (time.clock() - tstart))
+ debug("deps: show_final_deps: %s" % str(timer))
debug('deps: project rules checking completed - %u targets checked',
len(tgt_list))
@@ -1166,7 +1165,7 @@ def check_project_rules(bld):
if not bld.is_install:
save_samba_deps(bld, tgt_list)
- debug("deps: save_samba_deps: %f" % (time.clock() - tstart))
+ debug("deps: save_samba_deps: %s" % str(timer))
Logs.info("Project rules pass")
--
2.21.0

View File

@ -6,13 +6,13 @@
# ctdb is enabled by default, you can disable it with: --without clustering
%bcond_without clustering
%define main_release 2
%define main_release 0
%define samba_version 4.10.5
%define samba_version 4.10.6
%define talloc_version 2.1.16
%define tdb_version 1.3.18
%define tevent_version 0.9.39
%define ldb_version 1.5.4
%define ldb_version 1.5.5
# This should be rc1 or nil
%define pre_release %nil
@ -118,11 +118,7 @@ Source14: samba.pamd
Source201: README.downgrade
Patch0: samba-4.10.6-vfs_fruit.patch
Patch1: samba-4.10.6-vfs_glusterfs.patch
Patch2: samba-4.10.6-smbspool.patch
Patch3: samba-4.10.x-waf_update.patch
Patch4: samba-4.10.x-waf_timer.patch
Patch0: samba-4.10.x-waf_update.patch
Requires(pre): /usr/sbin/groupadd
Requires(post): systemd
@ -3441,6 +3437,9 @@ fi
%endif # with_clustering_support
%changelog
* Mon Jul 08 2019 Guenther Deschner <gdeschner@redhat.com> - 4.10.6-0
- Update to Samba 4.10.6
* Mon Jul 01 2019 Guenther Deschner <gdeschner@redhat.com> - 4.10.5-2
- resolves: #1718113 - Avoid deprecated time.clock in wafsamba
- resolves: #1711638 - Update to latest waf version 2.0.17

View File

@ -1,2 +1,2 @@
SHA512 (samba-4.10.5.tar.xz) = 87aceccb5ff1ca3ce62b05aaf3827671a639693832faf56aee200b11ca6b1124e67f5880e4f1e73185278c5369225aad0cf3d3ef889f12fa690e73d2accfb410
SHA512 (samba-4.10.5.tar.asc) = 599b1a2e19cd4362aeb3dfecba3523e9f3e18645b6e169516ea6825c81fdc7c7480e11235f977e1282cc769d0434a85ba567791ae9b1ad9b515b26277c87bc67
SHA512 (samba-4.10.6.tar.xz) = 1189e25271d3f708efebe99e840028dd82f82de458771bf9e8373c6b21643e3968165963b4a9efb5eac356734a4b4c7857f6fb2a077f3c8ca463ebae5a889cfc
SHA512 (samba-4.10.6.tar.asc) = 21dc113313d98185ee97be1c59e791862d55dcd509b82f98d8fb5f2123b09c7be7265305734b0b17fb95aca729c1b7df48751cb6d6b645dbfbf092e174e07cbc