[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via bf446bcf612 third_party/heimdal_build: Update fallthrough macro for switch statements via ef28247f3bb third_party/heimdal: import lorikeet-heimdal-202210310104 (commit 0fc20ff4144973047e6aaaeb2fc8708bd75be222) via ab4c7bda8da heimdal: Fix the 32-bit build on FreeBSD via 074e9284971 third_party/heimdal: Introduce macro for common plugin structure elements via 6353f9e9c47 Add Heimdal test file test_base.c to bi-directional encoding ignore list from bdbb38d16c8 s3: libsmbclient: Fix smbc_getxattr() to return 0 on success. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit bf446bcf612791c7fcf8284cca4061b651b7d4f6 Author: Joseph Sutton Date: Wed Sep 28 14:34:31 2022 +1300 third_party/heimdal_build: Update fallthrough macro for switch statements This is an adaptation to Heimdal: commit 133f5174820b34e2a12c3f3412bf554cae2ee22f Author: Daria Phoebe Brashear Date: Fri Sep 16 09:57:24 2022 -0400 rewrite fallthrough to HEIM_FALLTHROUGH to deal with new Apple SDKs Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Wed Nov 2 05:21:29 UTC 2022 on sn-devel-184 commit ef28247f3bbbd7cf9daed7a4dba28855496ce38e Author: Andrew Bartlett Date: Mon Oct 31 14:33:09 2022 +1300 third_party/heimdal: import lorikeet-heimdal-202210310104 (commit 0fc20ff4144973047e6aaaeb2fc8708bd75be222) This commit won't compile on it's own, as we need to fix the build system to cope in the next commit. The purpose of this commit is to update to a new lorikeet-heimdal tree that includes the previous two patches and is rebased on a current Heimdal master snapshot. Signed-off-by: Andrew Bartlett Reviewed-by: Joseph Sutton commit ab4c7bda8daccdb99adaf6ec7fddf8b5f84be09a Author: Volker Lendecke Date: Fri Jul 22 18:38:21 2022 +0200 heimdal: Fix the 32-bit build on FreeBSD REF: https://github.com/heimdal/heimdal/pull/1004 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15220 Signed-off-by: Volker Lendecke Reviewed-by: Andrew Bartlett commit 074e92849715ed3485703cfbba3771d405e4e78a Author: Joseph Sutton Date: Sat Oct 22 10:11:53 2022 +1300 third_party/heimdal: Introduce macro for common plugin structure elements Heimdal's HDB plugin interface, and hence Samba's KDC that depends upon it, doesn't work on 32-bit builds due to structure fields being arranged in the wrong order. This problem presents itself in the form of segmentation faults on 32-bit systems, but goes unnoticed on 64-bit builds thanks to extra structure padding absorbing the errant fields. This commit reorders the HDB plugin structure fields to prevent crashes and introduces a common macro to ensure every plugin presents a consistent interface. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15110 Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett commit 6353f9e9c47d02dc0e18585bfaad48b2ce85441d Author: Andrew Bartlett Date: Thu Oct 27 13:07:34 2022 +1300 Add Heimdal test file test_base.c to bi-directional encoding ignore list Heimdal commit c6a46f0c96dde73ef4f3a247a1e904d4cf15aeb2 introduces test data that triggers our LTR and RTL detection code. Signed-off-by: Andrew Bartlett Reviewed-by: Joseph Sutton --- Summary of changes: python/samba/tests/source_chars.py |1 + third_party/heimdal/.github/workflows/osx.yml |6 +- third_party/heimdal/.github/workflows/windows.yml |2 + third_party/heimdal/admin/Makefile.am |1 + third_party/heimdal/admin/add.c| 178 +++- third_party/heimdal/admin/copy.c | 19 +- third_party/heimdal/admin/get.c| 38 +- third_party/heimdal/admin/ktutil-commands.in | 33 +- third_party/heimdal/admin/ktutil.1 | 72 +- third_party/heimdal/admin/list.c | 139 ++- third_party/heimdal/apply_heimdal.sh |6 +- third_party/heimdal/configure.ac | 20 +- third_party/heimdal/doc/Makefile.am|3 +- third_party/heimdal/doc/NTMakefile |1 - third_party/heimdal/doc/apps.texi | 201 +--- third_party/heimdal/doc/copyright.texi |2 - third_party/heimdal/doc/heimdal.texi | 21 +- third_party/heimdal/doc/hx509.texi |6 +- third_party/heimdal/doc/kerberos4.texi | 173 third_party/heimdal/doc/migration.texi | 12 +- third_party/heimdal/doc/misc.texi
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via bdbb38d16c8 s3: libsmbclient: Fix smbc_getxattr() to return 0 on success. via 74636dfe24c s4: torture: Show return value for smbc_getxattr() is incorrect (returns >0 for success, should return zero). from ffc59fe0946 smbd: Correct store_smb2_posix_info size check https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit bdbb38d16c8eaff33484bb747efa639c4d8e7f35 Author: Jeremy Allison Date: Fri Oct 28 15:31:39 2022 -0700 s3: libsmbclient: Fix smbc_getxattr() to return 0 on success. Remove knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14808 Signed-off-by: Jeremy Allison Reviewed-by: David Mulder Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Nov 1 18:31:22 UTC 2022 on sn-devel-184 commit 74636dfe24c15677261fc40c0a4ec62404898cf4 Author: Jeremy Allison Date: Fri Oct 28 15:28:41 2022 -0700 s4: torture: Show return value for smbc_getxattr() is incorrect (returns >0 for success, should return zero). Add torture test to show smbc_getxattr() should return -1 on failure, 0 on success. Add knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14808 Signed-off-by: Jeremy Allison Reviewed-by: David Mulder --- Summary of changes: source3/libsmb/libsmb_xattr.c | 6 +- source4/torture/libsmbclient/libsmbclient.c | 94 + 2 files changed, 99 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c index 58ee4965220..1e8d2718a22 100644 --- a/source3/libsmb/libsmb_xattr.c +++ b/source3/libsmb/libsmb_xattr.c @@ -2180,7 +2180,11 @@ SMBC_getxattr_ctx(SMBCCTX *context, errno = SMBC_errno(context, srv->cli); } TALLOC_FREE(frame); -return ret; + /* +* static function cacl_get returns a value greater than zero +* on success. Map this to zero meaning success. +*/ +return ret < 0 ? -1 : 0; } /* Unsupported attribute name */ diff --git a/source4/torture/libsmbclient/libsmbclient.c b/source4/torture/libsmbclient/libsmbclient.c index d335cad3a4e..55ea26f5bc8 100644 --- a/source4/torture/libsmbclient/libsmbclient.c +++ b/source4/torture/libsmbclient/libsmbclient.c @@ -1473,6 +1473,98 @@ static bool torture_libsmbclient_getatr(struct torture_context *tctx) return true; } +static bool torture_libsmbclient_getxattr(struct torture_context *tctx) +{ + const char *smburl = torture_setting_string(tctx, "smburl", NULL); + int fhandle = -1; + SMBCCTX *ctx = NULL; + char *getxattr_name = NULL; + char value[4096]; + bool ok = false; + int ret = -1; + + if (smburl == NULL) { + torture_fail(tctx, +"option --option=torture:smburl=" +"smb://user:password@server missing\n"); + } + + ok = torture_libsmbclient_init_context(tctx, ); + torture_assert(tctx, ok, "Failed to init context"); + smbc_set_context(ctx); + + getxattr_name = talloc_asprintf(tctx, + "%s/getxattr", + smburl); + if (getxattr_name == NULL) { + torture_result(tctx, + TORTURE_FAIL, + __location__": %s", + "talloc fail\n"); + return false; + } + /* Ensure the file doesn't exist. */ + smbc_unlink(getxattr_name); + + /* Create testfile. */ + fhandle = smbc_creat(getxattr_name, 0666); + if (fhandle < 0) { + torture_fail_goto(tctx, + done, + talloc_asprintf(tctx, + "failed to create file '%s': %s", + getxattr_name, + strerror(errno))); + } + ret = smbc_close(fhandle); + torture_assert_int_equal_goto(tctx, + ret, + 0, + ok, + done, + talloc_asprintf(tctx, + "failed to close handle for '%s'", + getxattr_name)); + + /* +* Ensure getting a non-existent attribute returns -1. +*/ + ret = smbc_getxattr(getxattr_name, "foobar", value, sizeof(value)); + torture_assert_int_equal_goto(tctx, + ret, + -1, + ok, + done, + talloc_asprintf(tctx, + "smbc_getxattr(foobar) on '%s' should " +