[SCM] Samba Shared Repository - branch v4-3-test updated
Karolin Seeger
kseeger at samba.org
Mon Feb 15 13:37:05 UTC 2016
The branch, v4-3-test has been updated
via 6c1a5f0 param: Fix str_list_v3 to accept ; again
via 11b89bd loadparm: Fix memory leak issue.
via 4526ba6 s3: smbd: posix_acls: Fix check for setting u:g:o entry on a filesystem with no ACL support.
via ebb7d66 s3:smbd:open: Skip redundant call to file_set_dosmode when creating a new file.
from f1d0341 docs-xml: fix typo in smbspool_krb5_wrapper manpage.
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-3-test
- Log -----------------------------------------------------------------
commit 6c1a5f0c230dbb98b60230d169512def09966678
Author: Volker Lendecke <vl at samba.org>
Date: Thu Feb 11 13:11:46 2016 +0100
param: Fix str_list_v3 to accept ; again
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Volker Lendecke <vl at samba.org>
Autobuild-Date(master): Thu Feb 11 19:19:55 CET 2016 on sn-devel-144
https://bugzilla.samba.org/show_bug.cgi?id=11732
Autobuild-User(v4-3-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-3-test): Mon Feb 15 14:36:43 CET 2016 on sn-devel-104
commit 11b89bdc2570b670149f7f3bd8d98224b181b75c
Author: Hemanth Thummala <hemanth.thummala at nutanix.com>
Date: Tue Feb 2 10:33:20 2016 -0800
loadparm: Fix memory leak issue.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11708
Signed-off-by: Hemanth Thummala <hemanth.thummala at nutanix.com>
Reviewed-by: Alexander Bokovoy <ab at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Thu Feb 4 12:39:14 CET 2016 on sn-devel-144
(cherry picked from commit 8247d93701ed838190fe74044a63a56d63d37bf5)
commit 4526ba628ed7ee2bbd6751fb0155efff0b970dba
Author: Jeremy Allison <jra at samba.org>
Date: Tue Feb 9 12:47:43 2016 -0800
s3: smbd: posix_acls: Fix check for setting u:g:o entry on a filesystem with no ACL support.
Since 4.0.x we add 2 additional ACE entries, one SMB_ACL_USER
and SMB_ACL_GROUP to match the existing SMB_ACL_USER_OBJ and
SMB_ACL_GROUP_OBJ entries. The two additional entries break
the simple "must have 3 entries" check done inside convert_canon_ace_to_posix_perms().
Replace this with a more complete test.
Problem and initial fix provided by <tcleamy at ucdavis.edu>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10489
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Uri Simchoni <uri at samba.org>
Autobuild-User(master): Uri Simchoni <uri at samba.org>
Autobuild-Date(master): Thu Feb 11 11:14:53 CET 2016 on sn-devel-144
(cherry picked from commit 5172bf0c5b0672c1479c2ad776460956aa469bca)
commit ebb7d6602bd4c8f86e8d47e0581160f6d900ede9
Author: Jose A. Rivera <jarrpa at samba.org>
Date: Wed Feb 3 20:58:19 2016 -0600
s3:smbd:open: Skip redundant call to file_set_dosmode when creating a new file.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11727
Signed-off-by: Jose A. Rivera <jarrpa at samba.org>
Pair-programmed-with: Ira Cooper <ira at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri Feb 5 04:37:43 CET 2016 on sn-devel-144
(cherry picked from commit aec07b8b60ff9589a3c84eef6adeca464e6c01f6)
-----------------------------------------------------------------------
Summary of changes:
lib/util/util_strlist.c | 18 +++++++++++++++++-
source3/param/loadparm.c | 2 +-
source3/smbd/open.c | 4 ++--
source3/smbd/posix_acls.c | 39 ++++++++++++++++++++++++++++++++++++++-
4 files changed, 58 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/util/util_strlist.c b/lib/util/util_strlist.c
index 987fdfb..2c1c2d5 100644
--- a/lib/util/util_strlist.c
+++ b/lib/util/util_strlist.c
@@ -552,7 +552,23 @@ char **str_list_make_v3(TALLOC_CTX *mem_ctx, const char *string,
TALLOC_FREE(list);
return NULL;
}
- if (!sep) sep = LIST_SEP;
+
+ /*
+ * DON'T REPLACE THIS BY "LIST_SEP". The common version of
+ * LIST_SEP does not contain the ;, which used to be accepted
+ * by Samba 4.0 before param merges. It would be the far
+ * better solution to split the _v3 version again to source3/
+ * where it belongs, see the _v3 in its name.
+ *
+ * Unfortunately it is referenced in /lib/param/loadparm.c,
+ * which depends on the version that the AD-DC mandates,
+ * namely without the ; as part of the list separator. I am
+ * missing the waf fu to properly work around the wrong
+ * include paths here for this defect.
+ */
+ if (sep == NULL) {
+ sep = " \t,;\n\r";
+ }
num = 0;
str = s;
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 7fd1c0d..c576b22 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -1400,7 +1400,7 @@ static int add_a_service(const struct loadparm_service *pservice, const char *na
return (-1);
}
ServicePtrs = tsp;
- ServicePtrs[iNumServices] = talloc_zero(NULL, struct loadparm_service);
+ ServicePtrs[iNumServices] = talloc_zero(ServicePtrs, struct loadparm_service);
if (!ServicePtrs[iNumServices]) {
DEBUG(0,("add_a_service: out of memory!\n"));
return (-1);
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 530c573..eb6058f 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -3167,8 +3167,8 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
}
if (info != FILE_WAS_OPENED) {
- /* Files should be initially set as archive */
- if (lp_map_archive(SNUM(conn)) ||
+ /* Overwritten files should be initially set as archive */
+ if ((info == FILE_WAS_OVERWRITTEN && lp_map_archive(SNUM(conn))) ||
lp_store_dos_attributes(SNUM(conn))) {
if (!posix_open) {
if (file_set_dosmode(conn, smb_fname,
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index b69e5b4..80d4fea 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -3085,7 +3085,7 @@ static bool convert_canon_ace_to_posix_perms( files_struct *fsp, canon_ace *file
canon_ace *group_ace = NULL;
canon_ace *other_ace = NULL;
- if (ace_count != 3) {
+ if (ace_count > 5) {
DEBUG(3,("convert_canon_ace_to_posix_perms: Too many ACE "
"entries for file %s to convert to posix perms.\n",
fsp_str_dbg(fsp)));
@@ -3107,6 +3107,43 @@ static bool convert_canon_ace_to_posix_perms( files_struct *fsp, canon_ace *file
return False;
}
+ /*
+ * Ensure all ACE entries are owner, group or other.
+ * We can't set if there are any other SIDs.
+ */
+ for (ace_p = file_ace_list; ace_p; ace_p = ace_p->next) {
+ if (ace_p == owner_ace || ace_p == group_ace ||
+ ace_p == other_ace) {
+ continue;
+ }
+ if (ace_p->owner_type == UID_ACE) {
+ if (ace_p->unix_ug.id != owner_ace->unix_ug.id) {
+ DEBUG(3,("Invalid uid %u in ACE for file %s.\n",
+ (unsigned int)ace_p->unix_ug.id,
+ fsp_str_dbg(fsp)));
+ return false;
+ }
+ } else if (ace_p->owner_type == GID_ACE) {
+ if (ace_p->unix_ug.id != group_ace->unix_ug.id) {
+ DEBUG(3,("Invalid gid %u in ACE for file %s.\n",
+ (unsigned int)ace_p->unix_ug.id,
+ fsp_str_dbg(fsp)));
+ return false;
+ }
+ } else {
+ /*
+ * There should be no duplicate WORLD_ACE entries.
+ */
+
+ DEBUG(3,("Invalid type %u, uid %u in "
+ "ACE for file %s.\n",
+ (unsigned int)ace_p->owner_type,
+ (unsigned int)ace_p->unix_ug.id,
+ fsp_str_dbg(fsp)));
+ return false;
+ }
+ }
+
*posix_perms = (mode_t)0;
*posix_perms |= owner_ace->perms;
--
Samba Shared Repository
More information about the samba-cvs
mailing list