[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Sun Apr 9 10:45:01 UTC 2023
The branch, master has been updated
via 0cd66fe6bd4 libsmb: Fix test for smbc_getxattr
via 4fc166628fd libsmb: fix regression on smbc_getxattr and fix doc
via a1231c15ffe s3:libads: Remove executable bit from ldap.c
from 3633027e49a rpcd_mdssvc: initialize POSIX locking
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 0cd66fe6bd4ac2aa0b302ddf3eb5068fc9c522ec
Author: Remi Collet <rcollet at redhat.com>
Date: Tue Apr 4 12:16:09 2023 +0200
libsmb: Fix test for smbc_getxattr
Bug: https://bugzilla.samba.org/show_bug.cgi?id=14808
Signed-off-by: Remi Collet <rcollet at redhat.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
Autobuild-User(master): Volker Lendecke <vl at samba.org>
Autobuild-Date(master): Sun Apr 9 10:44:38 UTC 2023 on atb-devel-224
commit 4fc166628fda160d1cd38c140a9664defc5844ab
Author: Remi Collet <rcollet at redhat.com>
Date: Tue Apr 4 10:22:09 2023 +0200
libsmb: fix regression on smbc_getxattr and fix doc
Bug: https://bugzilla.samba.org/show_bug.cgi?id=14808
Signed-off-by: Remi Collet <rcollet at redhat.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
commit a1231c15ffe5468a2d0ffed8adca3f6d6adcf3b4
Author: Andreas Schneider <asn at samba.org>
Date: Thu Apr 6 21:40:31 2023 +0200
s3:libads: Remove executable bit from ldap.c
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/include/libsmbclient.h | 2 +-
source3/libads/ldap.c | 0
source3/libsmb/libsmb_xattr.c | 4 ++--
source4/torture/libsmbclient/libsmbclient.c | 25 +++++++++++++++++++------
4 files changed, 22 insertions(+), 9 deletions(-)
mode change 100755 => 100644 source3/libads/ldap.c
Changeset truncated at 500 lines:
diff --git a/source3/include/libsmbclient.h b/source3/include/libsmbclient.h
index ef8b327e374..056444d008c 100644
--- a/source3/include/libsmbclient.h
+++ b/source3/include/libsmbclient.h
@@ -2419,7 +2419,7 @@ int smbc_getxattr(const char *url,
* required to hold the attribute value will be returned,
* but nothing will be placed into the value buffer.
*
- * @return 0 on success, < 0 on error with errno set:
+ * @return size on success, < 0 on error with errno set:
* - EINVAL The client library is not properly initialized
* or one of the parameters is not of a correct
* form
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
old mode 100755
new mode 100644
diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
index 1e8d2718a22..1f820521193 100644
--- a/source3/libsmb/libsmb_xattr.c
+++ b/source3/libsmb/libsmb_xattr.c
@@ -2182,9 +2182,9 @@ SMBC_getxattr_ctx(SMBCCTX *context,
TALLOC_FREE(frame);
/*
* static function cacl_get returns a value greater than zero
- * on success. Map this to zero meaning success.
+ * which is needed buffer size needed when size_t is 0.
*/
- return ret < 0 ? -1 : 0;
+ return ret;
}
/* Unsupported attribute name */
diff --git a/source4/torture/libsmbclient/libsmbclient.c b/source4/torture/libsmbclient/libsmbclient.c
index 55ea26f5bc8..72af8fc01c9 100644
--- a/source4/torture/libsmbclient/libsmbclient.c
+++ b/source4/torture/libsmbclient/libsmbclient.c
@@ -1542,17 +1542,30 @@ static bool torture_libsmbclient_getxattr(struct torture_context *tctx)
ret));
/*
- * Ensure getting a valid attribute returns 0.
+ * Ensure getting a valid attribute computes its size.
+ */
+ ret = smbc_getxattr(getxattr_name, "system.*", NULL, 0);
+ torture_assert_goto(tctx,
+ ret >= 0,
+ ok,
+ done,
+ talloc_asprintf(tctx,
+ "smbc_getxattr(foobar, NULL) on '%s' should "
+ "get >=0, got %d\n",
+ getxattr_name,
+ ret));
+
+ /*
+ * Ensure getting a valid attribute returns its size.
*/
ret = smbc_getxattr(getxattr_name, "system.*", value, sizeof(value));
- torture_assert_int_equal_goto(tctx,
- ret,
- 0,
+ torture_assert_goto(tctx,
+ ret >= 0,
ok,
done,
talloc_asprintf(tctx,
- "smbc_getxattr(foobar) on '%s' should "
- "get -1, got %d\n",
+ "smbc_getxattr(foobar, value) on '%s' should "
+ "get >=0, got %d\n",
getxattr_name,
ret));
--
Samba Shared Repository
More information about the samba-cvs
mailing list