lp:samba

Created by Jelmer Vernooij and last modified
Get this branch:
bzr branch lp:samba

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Samba Team
Project:
samba
Status:
Development

Import details

Import Status: Failed

This branch is an import of the HEAD branch of the Git repository at git://git.samba.org/samba.git.

The import has been suspended because it failed 5 or more times in succession.

Last successful import was .

Import started on juju-1e3bde-prod-lp-code-import-13 and finished taking 2 minutes — see the log
Import started on juju-1e3bde-prod-lp-code-import-13 and finished taking 1 minute — see the log
Import started on juju-1e3bde-prod-lp-code-import-13 and finished taking 2 minutes — see the log
Import started on juju-1e3bde-prod-lp-code-import-15 and finished taking 3 minutes — see the log

Updating branch...

Launchpad is processing new changes to this branch which will be available in a few minutes. Reload to see the changes.

Recent revisions

73209. By Volker Lendecke <email address hidden>

smbd: Make send_trans2_replies() static

Signed-off-by: Volker Lendecke <email address hidden>
Reviewed-by: Jeremy Allison <email address hidden>

Autobuild-User(master): Jeremy Allison <email address hidden>
Autobuild-Date(master): Thu Dec 22 20:46:53 UTC 2022 on sn-devel-184

73208. By Volker Lendecke <email address hidden>

smbd: Hide the SMB1 posix symlink behaviour behind UCF_LCOMP_LNK_OK

This will be used in the future to also open symlinks as reparse
points, so this won't be specific to only SMB1 posix extensions.

I have tried to avoid additional flags for several weeks by making
openat_pathref_fsp or other flavors of this to always open fsp's with
symlink O_PATH opens, because I think NT_STATUS_OBJECT_NAME_NOT_FOUND
with a valid stat is a really bad and racy way to express that we just
hit a symlink, but I miserably failed. Adding additional flags (another one
will follow) is wrong, but I don't see another way right now.

Signed-off-by: Volker Lendecke <email address hidden>

73207. By Volker Lendecke <email address hidden>

smbd: Simplify filename_convert_dirfsp_nosymlink()

Avoid a nested if, the "&&" is easier to understand for me.

Signed-off-by: Volker Lendecke <email address hidden>
Reviewed-by: Jeremy Allison <email address hidden>

73206. By Volker Lendecke <email address hidden>

smbd: Simplify filename_convert_dirfsp_nosymlink()

Factor out the symlink-case into a more obvious if-statement with less
indentation.

Review with git show -b

Signed-off-by: Volker Lendecke <email address hidden>
Reviewed-by: Jeremy Allison <email address hidden>

73205. By Volker Lendecke <email address hidden>

smbd: Reduce indentation in ucf_flags_from_smb_request()

Signed-off-by: Volker Lendecke <email address hidden>
Reviewed-by: Jeremy Allison <email address hidden>

73204. By Volker Lendecke <email address hidden>

smbd: Implement SET_REPARSE_POINT buffer size checks

Partially survives

samba.tests.reparsepoints.ReparsePoints.test_create_reparse

NTTRANS-FSCTL needs changing: Windows 2016 returns INVALID_BUFFER_SIZE
instead of our NOT_A_REPARSE_POINT. This is not the whole story, but
this smbtorture3 change makes autobuild survive.

Signed-off-by: Volker Lendecke <email address hidden>
Reviewed-by: Jeremy Allison <email address hidden>

73203. By Volker Lendecke <email address hidden>

smbd: Rename "ctx" to the more common "mem_ctx" in reparse functions

Signed-off-by: Volker Lendecke <email address hidden>
Reviewed-by: Jeremy Allison <email address hidden>

73202. By Volker Lendecke <email address hidden>

smbd: Print the file name in reparse point functions

Signed-off-by: Volker Lendecke <email address hidden>
Reviewed-by: Jeremy Allison <email address hidden>

73201. By Douglas Bagnall

lib/compression: add simple python bindings

There are four functions, allowing compression and decompression in
the two formats we support so far. The functions will accept bytes or
unicode strings which are treated as utf-8.

The LZ77+Huffman decompression algorithm requires an exact target
length to decompress, so this is mandatory.

The plain decompression algorithm does not need an exact length, but
you can provide one to help it know how much space to allocate. As
currently written, you can provide a short length and it will often
succeed in decompressing to a different shorter string.

These bindings are intended to make ad-hoc investigation easier, not
for production use. This is reflected in the guesses about output size
that plain_decompress() makes if you don't supply one -- either they
are stupidly wasteful or ridiculously insufficient, depending on
whether or not you were trying to decompress a 20MB string.

>>> a = '12345678'
>>> import compression
>>> b = compression.huffman_compress(a)
>>> b
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 #....
>>> len(b)
262
>>> c = compression.huffman_decompress(b, len(a))
>>> c
b'12345678' # note, c is bytes, a is str
>>> a
'12345678'
>>> d = compression.plain_compress(a)
>>> d
b'\xff\xff\xff\x0012345678'
>>> compression.plain_decompress(d) # no size specified, guesses
b'12345678'
>>> compression.plain_decompress(d,5)
b'12345'
>>> compression.plain_decompress(d,0) # 0 for auto
b'12345678'
>>> compression.plain_decompress(d,1)
b'1'
>>> compression.plain_decompress(a,444)
Traceback (most recent call last):
   compression.CompressionError: unable to decompress data into a buffer of 444 bytes.
>>> compression.plain_decompress(b,444)
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 #...

That last one decompresses the Huffman compressed file with the plain
compressor; pretty much any string is valid for plain decompression.

Signed-off-by: Douglas Bagnall <email address hidden>
Reviewed-by: Jeremy Allison <email address hidden>

73200. By Andreas Schneider <email address hidden>

s3:client: Fix a use-after-free issue in smbclient

Detected by

    make test TESTS="samba3.blackbox.chdir-cache"

with an optimized build or with AddressSanitizer.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15268

Signed-off-by: Andreas Schneider <email address hidden>
Reviewed-by: Ralph Boehme <email address hidden>

Autobuild-User(master): Andreas Schneider <email address hidden>
Autobuild-Date(master): Thu Dec 22 10:52:31 UTC 2022 on sn-devel-184

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers

No subscribers.