[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Fri Aug 23 12:54:02 MDT 2013
The branch, master has been updated
via 3ddb77f torture: Split the fsinfo check into a separate test
via e1edffc torture: Split the buffercheck into a separate test
via 8f96d48 torture: Change smb2.getinfo into a suite
via ad8a1e2 libsmb2: Fix opening the rootdirectory, part 2
via 1927676 libsmb2: Fix opening the rootdirectory, part 1
via 971b39b torture: Remove an unused variable
via 83d1495 smbd: Fix a debug message
from 573b455 pkgconfig: Do not hardcode library version numbers in pc files.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3ddb77f7d8d56376661c9ad26acbb32dc7e6e40d
Author: Volker Lendecke <vl at samba.org>
Date: Thu Aug 22 11:47:21 2013 +0000
torture: Split the fsinfo check into a separate test
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri Aug 23 20:53:12 CEST 2013 on sn-devel-104
commit e1edffc8075cc0f83e0f05153712298a96063fba
Author: Volker Lendecke <vl at samba.org>
Date: Thu Aug 22 11:23:22 2013 +0000
torture: Split the buffercheck into a separate test
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 8f96d489715d88c181d88030550a88a7e245e5ae
Author: Volker Lendecke <vl at samba.org>
Date: Thu Aug 22 11:06:59 2013 +0000
torture: Change smb2.getinfo into a suite
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit ad8a1e2a6ee126596abe992bc39da3b8ea1b4f9b
Author: Volker Lendecke <vl at samba.org>
Date: Thu Aug 22 15:04:03 2013 +0000
libsmb2: Fix opening the rootdirectory, part 2
smb2_push_o16s16_blob is wrong for the blob.data==NULL case. It does
not do the same magic that the rest of the routine does with regards to
padding_fix. padding_fix is wrong in its own respect, with a 0-length
blob we end up with a negative padding fix. It's wrong, but it seems
to work.
Why am I doing this? I want to make smb2.getinfo work against
w2k12. smb2_util_roothandle() always gives NT_STATUS_INVALID_PARAMETER
without this and the preceding fix.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 1927676412a5b329b9f6e5e3ec3971bc18e21b31
Author: Volker Lendecke <vl at samba.org>
Date: Thu Aug 22 15:04:03 2013 +0000
libsmb2: Fix opening the rootdirectory, part 1
[MS-SMB2], 2.2.13 says: In the request, the Buffer field MUST be at least one
byte in length. Implement that for the 0-length filename without create blobs.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 971b39bb103410444cfdeaa6e9684c7496a39ab3
Author: Volker Lendecke <vl at samba.org>
Date: Thu Aug 22 11:19:33 2013 +0000
torture: Remove an unused variable
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 83d1495e587d12211587856bce0f583d188b3e81
Author: Volker Lendecke <vl at samba.org>
Date: Thu Aug 22 15:19:32 2013 +0000
smbd: Fix a debug message
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
selftest/knownfail | 5 +++--
source3/smbd/trans2.c | 2 +-
source4/libcli/smb2/create.c | 15 +++++++++++++++
source4/torture/smb2/getinfo.c | 35 +++++++++++++++++++++++++++--------
source4/torture/smb2/smb2.c | 2 +-
source4/torture/smb2/util.c | 2 +-
6 files changed, 48 insertions(+), 13 deletions(-)
Changeset truncated at 500 lines:
diff --git a/selftest/knownfail b/selftest/knownfail
index c075ba6..dd536df 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -170,7 +170,7 @@
^samba4.smb2.oplock.batch10\(.*\)$ # samba 4 oplocks are a mess
^samba4.smb2.oplock.batch20\(.*\)$ # samba 4 oplocks are a mess
^samba4.smb2.oplock.stream1 # samba 4 oplocks are a mess
-^samba4.smb2.getinfo.getinfo # streams on directories does not work
+^samba4.smb2.getinfo.complex # streams on directories does not work
^samba4.ntvfs.cifs.krb5.base.createx_access.createx_access\(.*\)$
^samba4.rpc.lsa.forest.trust #Not fully provided by Samba4
^samba4.blackbox.kinit\(.*\).kinit with user password for expired password\(.*\) # We need to work out why this fails only during the pw change
@@ -206,7 +206,8 @@
^samba3.smb2.streams.rename
^samba3.smb2.streams.rename2
^samba3.smb2.streams.attributes
-^samba3.smb2.getinfo.getinfo
+^samba3.smb2.getinfo.complex
+^samba3.smb2.getinfo.fsinfo # quotas don't work yet
^samba3.smb2.setinfo.setinfo
^samba3.smb2.session.*reauth5 # some special anonymous checks?
^samba3.smb2.compound.interim2 # wrong return code (STATUS_CANCELLED)
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 81f80c3..e7c0da1 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -3374,7 +3374,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
/* access check */
if (get_current_uid(conn) != 0) {
- DEBUG(0,("set_user_quota: access_denied "
+ DEBUG(0,("get_user_quota: access_denied "
"service [%s] user [%s]\n",
lp_servicename(talloc_tos(), SNUM(conn)),
conn->session_info->unix_info->unix_name));
diff --git a/source4/libcli/smb2/create.c b/source4/libcli/smb2/create.c
index 1a7f02b..10fe4f7 100644
--- a/source4/libcli/smb2/create.c
+++ b/source4/libcli/smb2/create.c
@@ -294,6 +294,21 @@ struct smb2_request *smb2_create_send(struct smb2_tree *tree, struct smb2_create
return NULL;
}
+ if (((io->in.fname == NULL) || (strlen(io->in.fname) == 0)) &&
+ (blob.length == 0)) {
+ struct smb2_request_buffer *buf = &req->out;
+
+ status = smb2_grow_buffer(buf, 1);
+ if (!NT_STATUS_IS_OK(status)) {
+ talloc_free(req);
+ return NULL;
+ }
+ buf->dynamic[0] = 0;
+ buf->dynamic += 1;
+ buf->body_size += 1;
+ buf->size += 1;
+ }
+
data_blob_free(&blob);
smb2_transport_send(req);
diff --git a/source4/torture/smb2/getinfo.c b/source4/torture/smb2/getinfo.c
index 16db715..10dd550 100644
--- a/source4/torture/smb2/getinfo.c
+++ b/source4/torture/smb2/getinfo.c
@@ -127,13 +127,19 @@ static bool torture_smb2_fileinfo(struct torture_context *tctx, struct smb2_tree
/*
test fsinfo levels
*/
-static bool torture_smb2_fsinfo(struct torture_context *tctx, struct smb2_tree *tree)
+static bool torture_smb2_fsinfo(struct torture_context *tctx)
{
+ bool ret;
+ struct smb2_tree *tree;
int i;
NTSTATUS status;
struct smb2_handle handle;
printf("Testing fsinfo levels\n");
+
+ ret = torture_smb2_connection(tctx, &tree);
+ torture_assert(tctx, ret, "connection failed");
+
status = smb2_util_roothandle(tree, &handle);
torture_assert_ntstatus_ok(tctx, status, "Unable to create root handle");
@@ -152,13 +158,19 @@ static bool torture_smb2_fsinfo(struct torture_context *tctx, struct smb2_tree *
/*
test for buffer size handling
*/
-static bool torture_smb2_buffercheck(struct torture_context *tctx, struct smb2_tree *tree)
+static bool torture_smb2_buffercheck(struct torture_context *tctx)
{
+ bool ret;
+ struct smb2_tree *tree;
NTSTATUS status;
struct smb2_handle handle;
struct smb2_getinfo b;
printf("Testing buffer size handling\n");
+
+ ret = torture_smb2_connection(tctx, &tree);
+ torture_assert(tctx, ret, "connection failed");
+
status = smb2_util_roothandle(tree, &handle);
torture_assert_ntstatus_ok(tctx, status, "Unable to create root handle");
@@ -179,9 +191,8 @@ static bool torture_smb2_buffercheck(struct torture_context *tctx, struct smb2_t
/* basic testing of all SMB2 getinfo levels
*/
-bool torture_smb2_getinfo(struct torture_context *torture)
+static bool torture_smb2_getinfo(struct torture_context *torture)
{
- TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct smb2_tree *tree;
bool ret = true;
NTSTATUS status;
@@ -209,10 +220,18 @@ bool torture_smb2_getinfo(struct torture_context *torture)
"setup complex dir " DNAME ":streamtwo");
ret &= torture_smb2_fileinfo(torture, tree);
- ret &= torture_smb2_fsinfo(torture, tree);
- ret &= torture_smb2_buffercheck(torture, tree);
-
- talloc_free(mem_ctx);
return ret;
}
+
+struct torture_suite *torture_smb2_getinfo_init(void)
+{
+ struct torture_suite *suite = torture_suite_create(
+ talloc_autofree_context(), "getinfo");
+
+ torture_suite_add_simple_test(suite, "complex", torture_smb2_getinfo);
+ torture_suite_add_simple_test(suite, "fsinfo", torture_smb2_fsinfo);
+ torture_suite_add_simple_test(suite, "buffercheck",
+ torture_smb2_buffercheck);
+ return suite;
+}
diff --git a/source4/torture/smb2/smb2.c b/source4/torture/smb2/smb2.c
index f6a3163..19d7e4a 100644
--- a/source4/torture/smb2/smb2.c
+++ b/source4/torture/smb2/smb2.c
@@ -148,7 +148,7 @@ NTSTATUS torture_smb2_init(void)
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "smb2");
torture_suite_add_simple_test(suite, "connect", torture_smb2_connect);
torture_suite_add_suite(suite, torture_smb2_scan_init());
- torture_suite_add_simple_test(suite, "getinfo", torture_smb2_getinfo);
+ torture_suite_add_suite(suite, torture_smb2_getinfo_init());
torture_suite_add_simple_test(suite, "setinfo", torture_smb2_setinfo);
torture_suite_add_suite(suite, torture_smb2_lock_init());
torture_suite_add_suite(suite, torture_smb2_read_init());
diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c
index cb9a527..4ffcfea 100644
--- a/source4/torture/smb2/util.c
+++ b/source4/torture/smb2/util.c
@@ -485,7 +485,7 @@ NTSTATUS smb2_util_roothandle(struct smb2_tree *tree, struct smb2_handle *handle
io.in.create_disposition = NTCREATEX_DISP_OPEN;
io.in.share_access = NTCREATEX_SHARE_ACCESS_READ|NTCREATEX_SHARE_ACCESS_DELETE;
io.in.create_options = NTCREATEX_OPTIONS_ASYNC_ALERT;
- io.in.fname = NULL;
+ io.in.fname = "";
status = smb2_create(tree, tree, &io);
NT_STATUS_NOT_OK_RETURN(status);
--
Samba Shared Repository
More information about the samba-cvs
mailing list