1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

14 Commits

Author SHA1 Message Date
Volker Lendecke
f6fe7c39cd libsmb: Add smb2_create_blob_remove()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-02-07 21:01:31 +00:00
Volker Lendecke
23db731593 libsmb: Allow passing in NULL to smb2_create_blob_find()
Will simplify callers a bit, and it does not change semantics
significantly. Zero create blobs won't find anything anyway.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-02-07 21:01:30 +00:00
Noel Power
fa551bf0a4 libcl/smb: clang: Fix 'Value stored to 'next_offset' is never read'
Fixes:

 libcli/smb/smb2_create_blob.c:146:3: warning: Value stored to 'next_offset' is never read <--[clang]
                next_offset += next_pad;
                ^              ~~~~~~~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-07-11 04:08:13 +00:00
Volker Lendecke
068f42bed7 libsmb: Use a direct struct initializer
There's a few ways to initialize a DATA_BLOB to NULL. There's the
variable data_blob_null, there's ZERO_STRUCTP, and the explicit
initializer. And there's the data_blob() macro which calls into
data_blob_talloc_named. You have to look at that routine to see that
this is nothing more than a ZERO_STRUCT() and not calling into
talloc. Choose the more direct way.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-03-18 19:21:23 +00:00
Volker Lendecke
2f3e251dcc libcli: Align integer types
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-03-18 19:21:23 +00:00
Stefan Metzmacher
2b4672f2d3 libcli/smb: fix unitialized padding in smb2_create_blob_push_one() (bug #9209)
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Oct 27 10:05:22 CEST 2012 on sn-devel-104
2012-10-27 10:05:22 +02:00
Jeremy Allison
322e3d42f6 Fix bug #9209 - Parse of invalid SMB2 create blob can cause smbd crash.
Ensure we correctly protect against blobs with data_offset==0
and data_length != 0.

Jeremy.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Sep 27 22:07:02 CEST 2012 on sn-devel-104
2012-09-27 22:07:02 +02:00
Stefan Metzmacher
aa5caf1fe9 libcli/smb: fix padding in smb2_create_blob*
metze
2012-09-19 21:21:36 +02:00
Volker Lendecke
5a100a4b1b libcli: Use data_blob_null
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Wed Apr 25 18:54:51 CEST 2012 on sn-devel-104
2012-04-25 18:54:51 +02:00
Kai Blin
8eb80a9d83 libcli/smb: Get rid of set but unused variable 2011-09-24 21:46:05 -07:00
Jeremy Allison
e99a18cdc0 Remove extraneous debug code.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Sep 22 00:22:12 CEST 2011 on sn-devel-104
2011-09-22 00:22:12 +02:00
Jeremy Allison
d89bbe9b0a Fix bug #8474 - SMB2 create doesn't cope with an Apple client using NULL blob in create
Cope with zero length data_offset and data_length values.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Sep 21 22:12:40 CEST 2011 on sn-devel-104
2011-09-21 22:12:40 +02:00
Stefan Metzmacher
e2845b8089 libcli/smb: add smb2_create_blob_find()
metze
2009-08-15 10:46:35 +02:00
Stefan Metzmacher
1d75a6e224 libcli/smb: move smb2_create_blob code to libcli/smb/
I want to use this in source3/smbd/

metze
2009-08-12 19:22:06 +02:00