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

390 Commits

Author SHA1 Message Date
Andrew Tridgell
ead3508ac8 r3447: more include/system/XXX.h include files
(This used to be commit 264ce91810)
2007-10-10 13:05:12 -05:00
Andrew Tridgell
c1dc067207 r3426: removed 2 unused files, and some unused variables
(This used to be commit dd0618d595)
2007-10-10 13:05:08 -05:00
Andrew Tridgell
9f1210a243 r3419: moved the libcli/raw structures into libcli/raw/libcliraw.h
and made them private
(This used to be commit 386ac565c4)
2007-10-10 13:05:07 -05:00
Andrew Tridgell
b24fcfc1aa r3400: - allow callers to control the flags2 field in raw packets
- added testing of the FLAGS2_READ_PERMIT_EXECUTE bit in the ntdeny tests
(This used to be commit adf4a68270)
2007-10-10 13:05:05 -05:00
Andrew Tridgell
d93636c29e r3387: fixed pvfs to pass the NTDENY tests. The tricky bit was
SA_RIGHT_FILE_EXECUTE, which depends on a flags2 bit
(This used to be commit c36851d230)
2007-10-10 13:05:04 -05:00
Andrew Tridgell
cb1cff90f1 r3386: - fixed --seed option in smbtorture
- added new tests BASE-NTDENY1 and BASE-NTDENY2. These are the
  ntcreatex equivalents of the BASE-DENY1 and BASE-DENY2
  tests. Unfortunately, with ntcreatex there are 4 million combination
  and trying each one takes 1 second, so randomised testing is the
  only choice. The BASE-DENY1 test can operate in parallel with
  hundreds of connections, speeding things up a bit (as most time is
  spent waiting 1 second for a sharing violation to come back)
(This used to be commit b95493d3d1)
2007-10-10 13:05:03 -05:00
Andrew Tridgell
39883a90cf r3383: avoid multi-part SMBtrans and SMBtrans2 replies until our client library can handle
them properly (they are difficult to do in an async fashion).

By choosing trans.in.max_data to fix in the negotiated buffer size a
server won't send us multi-part replies.

I notice that windows seems to avoid them too :)
(This used to be commit e23edf762c)
2007-10-10 13:05:03 -05:00
Andrew Tridgell
ba6d5fcb97 r3324: made the smbtorture code completely warning free
(This used to be commit 7067bb9b52)
2007-10-10 13:04:55 -05:00
Andrew Tridgell
d16b621ca9 r3251: - move the openattr test code into basic/attr.c
- cleaned up the RAW-WRITE test so it passes against w2k3, and gives
  more useful error messages
(This used to be commit d4042c4364)
2007-10-10 13:04:46 -05:00
Andrew Tridgell
ee0c87b4c9 r3207: - reformat error msgs in BASE-DIR* tests
- added support for mandatory attributes in old style directory search

- we now pass BASE-DIR1 and BASE-DIR2
(This used to be commit efaa0eaec4)
2007-10-10 13:04:41 -05:00
Andrew Tridgell
d200f9385f r3203: moved more test functions into torture/basic/*.c
the idea is that torture/torture.c should eventually be just the
harness code, which will make it easier to read
(This used to be commit eca85d26ed)
2007-10-10 13:04:40 -05:00
Andrew Tridgell
ced8ad3d04 r3188: tidy up the rename test a bit more
(This used to be commit 3f60775916)
2007-10-10 13:04:38 -05:00
Andrew Tridgell
35a11f0e61 r3182: separate out the BASE-RENAME test into torture/basic/rename.c
(This used to be commit c5e72b05d7)
2007-10-10 13:04:37 -05:00
Andrew Tridgell
2641612a49 r3155: reformat a delete test
(This used to be commit 739c9e401c)
2007-10-10 13:02:26 -05:00
Andrew Tridgell
e9381dfd70 r3152: reformatted some of the delete test code
(This used to be commit d7b0dece6f)
2007-10-10 13:02:26 -05:00
Andrew Tridgell
5a698367e1 r3150: printing __location__ is more useful than a operation number
(This used to be commit 022b21460a)
2007-10-10 13:02:26 -05:00
Andrew Tridgell
86457e659c r3149: separate the delete on close test into torture/basic/delete.c
(This used to be commit 50379a0a58)
2007-10-10 13:02:26 -05:00
Andrew Tridgell
f539cc1b7d r3148: make --failures work for the BASE-DENY1 and BASE-DENY2 tests
(This used to be commit 6e87feb89c)
2007-10-10 13:02:25 -05:00
Andrew Tridgell
d0cc571e30 r3029: implemented byte range lock timeouts.
This adds a pvfs_wait_message() routine which uses the new messaging
system, event timers and talloc destructors to give a nice generic
async event handling system with a easy to use interface. The
extensions to pvfs_lock.c are based on calls to pvfs_wait_message()
routines.

We now pass all of our smbtorture locking tests, although while
writing this code I have thought of some additonal tests that should
be added, particularly for lock cancel operations. I'll work on that
soon.

This commit also extends the smbtorture lock tests to test the rather
weird 0xEEFFFFFF locking semantics that I have discovered in
win2003. Win2003 treats the 0xEEFFFFFF boundary as special, and will
give different error codes on either side of it. Locks on both sides
are allowed, the only difference is which error code is given when a
lock is denied. Anyone like to hazard a guess as to why? It has
me stumped.
(This used to be commit 4395c0557a)
2007-10-10 13:00:00 -05:00
Andrew Tridgell
f6da6a10de r3011: separated the locktest code into a separate module in smbtorture
(This used to be commit f4a91be635)
2007-10-10 12:59:57 -05:00
Andrew Tridgell
7d32679e96 r2857: this commit gets rid of smb_ucs2_t, wpstring and fpstring, plus lots of associated functions.
The motivation for this change was to avoid having to convert to/from
ucs2 strings for so many operations. Doing that was slow, used many
static buffers, and was also incorrect as it didn't cope properly with
unicode codepoints above 65536 (which could not be represented
correctly as smb_ucs2_t chars)

The two core functions that allowed this change are next_codepoint()
and push_codepoint(). These functions allow you to correctly walk a
arbitrary multi-byte string a character at a time without converting
the whole string to ucs2.

While doing this cleanup I also fixed several ucs2 string handling
bugs. See the commit for details.

The following code (which counts the number of occuraces of 'c' in a
string) shows how to use the new interface:

size_t count_chars(const char *s, char c)
{
	size_t count = 0;

	while (*s) {
		size_t size;
		codepoint_t c2 = next_codepoint(s, &size);
		if (c2 == c) count++;
		s += size;
	}

	return count;
}
(This used to be commit 814881f0e5)
2007-10-10 12:59:39 -05:00
Andrew Tridgell
aa12305945 r2680: switched the libcli/raw/ code over to use talloc_reference(), which simplifies things quite a bit
(This used to be commit c82a9cf750)
2007-10-10 12:59:21 -05:00
Andrew Tridgell
e3880fa759 r2660: - converted the libcli/raw/ library to use talloc_increase_ref_count()
rather than manual reference counts

- properly support SMBexit in the cifs and posix backends

- added a logoff method to all backends

With these changes the RAW-CONTEXT test now passes against the posix backend
(This used to be commit c315d6ac1c)
2007-10-10 12:59:18 -05:00
Andrew Tridgell
223e78990a r2628: got rid of some warnings and converted a few more places to use hierarchical memory allocation
(This used to be commit 26da45a801)
2007-10-10 12:59:14 -05:00
Andrew Tridgell
8e5acb6df0 r2589: a simple test to help find security related memory leaks. Run valgrind on smbd with
--show-leak=yes and --show-reachable=yes to track them down.
(This used to be commit 7b23624a0f)
2007-10-10 12:59:09 -05:00
Andrew Bartlett
9a9dcc7250 r2552: Character set conversion and string handling updates.
The intial motivation for this commit was to merge in some of the
bugfixes present in Samba3's chrcnv and string handling code into
Samba4.  However, along the way I found a lot of unused functions, and
decided to do a bit more...

The strlen_m code now does not use a fixed buffer, but more work is
needed to finish off other functions in str_util.c.  These fixed
length buffers hav caused very nasty, hard to chase down bugs at some
sites.

The strupper_m() function has a strupper_talloc() to replace it (we
need to go around and fix more uses, but it's a start).  Use of these
new functions will avoid bugs where the upper or lowercase version of
a string is a different length.

I have removed the push_*_allocate functions, which are replaced by
calls to push_*_talloc.  Likewise, pstring and other 'fixed length'
wrappers are removed, where possible.

I have removed the first ('base pointer') argument, used by push_ucs2,
as the Samba4 way of doing things ensures that this is always on an
even boundary anyway.  (It was used in only one place, in any case).
(This used to be commit dfecb01506)
2007-10-10 12:59:05 -05:00
Andrew Bartlett
70c88af1f9 r2551: Add const.
Andrew Bartlett
(This used to be commit 066789a479)
2007-10-10 12:59:05 -05:00
Andrew Bartlett
8ab562dcb2 r2536: This is a classic case for the use of our new talloc code, and
convert_string_talloc().

Andrew Bartlett
(This used to be commit 79776006b3)
2007-10-10 12:59:03 -05:00
Andrew Tridgell
31c1c7846f r2159: converted samba4 over to UTF-16.
I had previously thought this was unnecessary, as windows doesn't use
standards compliant UTF-16, and for filesystem operations treats bytes
as UCS-2, but Bjoern Jacke has pointed out to me that this means we
don't correctly store extended UTF-16 characters as UTF-8 on
disk. This can be seen with (for example) the gothic characters with
codepoints above 64k.

This commit also adds a LOCAL-ICONV torture test that tests the first
1 million codepoints against the system iconv library, and tests 5
million random UTF-16LE buffers for identical error handling to the
system iconv library.

the lib/iconv.c changes need backporting to samba3
(This used to be commit 756f28ac95)
2007-10-10 12:58:27 -05:00
Stefan Metzmacher
e89e5eee38 r1997: fix compiler warning
metze
(This used to be commit eb9de893b8)
2007-10-10 12:58:16 -05:00
Andrew Tridgell
b7e1ea20dc r1985: take advantage of the new talloc in a few more places
(This used to be commit 6ffdfd7799)
2007-10-10 12:58:14 -05:00
Stefan Metzmacher
c5fbb6f23c r1654: rename cli_ -> smbcli_
rename CLI_ -> SMBCLI_

metze
(This used to be commit 8441750fd9)
2007-10-10 12:57:47 -05:00
Andrew Tridgell
5ddf678e01 r1578: the first stage of the async client rewrite.
Up to now the client code has had an async API, and operated
asynchronously at the packet level, but was not truly async in that it
assumed that it could always write to the socket and when a partial
packet came in that it could block waiting for the rest of the packet.

This change makes the SMB client library full async, by adding a
separate outgoing packet queue, using non-blocking socket IO and
having a input buffer that can fill asynchonously until the full
packet has arrived.

The main complexity was in dealing with the events structure when
using the CIFS proxy backend. In that case the same events structure
needs to be used in both the client library and the main smbd server,
so that when the client library is waiting for a reply that the main
server keeps processing packets. This required some changes in the
events library code.

Next step is to make the generated rpc client code use these new
capabilities.
(This used to be commit 96bf4da3ed)
2007-10-10 12:57:42 -05:00
Stefan Metzmacher
121e074232 r1228: use int64_t instead of long long
(jra: please use: void, char int, uint_t, [u]int<8|16|32|64>_t types in new code)

metze
(This used to be commit 626bb153c4)
2007-10-10 12:56:45 -05:00
Jeremy Allison
a125e49d67 r1086: Add defer open test to check timeout on sharing violation open.
This has found some signing errors in the Samba3.0 implementation
of the deferred open code. Still working on these...
Jeremy
(This used to be commit 0068cb12ef)
2007-10-10 12:56:37 -05:00
Stefan Metzmacher
770e3307ce r962: convert 'unsigned' and 'unsigned int' to uint_t
metze
(This used to be commit 57151e80eb)
2007-10-10 12:56:23 -05:00
Stefan Metzmacher
fcd718c7d8 r890: convert samba4 to use [u]int8_t instead of [u]int8
metze
(This used to be commit 2986c5f08c)
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
f88bf54c7f r889: convert samba4 to use [u]int16_t instead of [u]int16
metze
(This used to be commit af6f1f8a01)
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
f9d8f8843d r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
(This used to be commit 0e5517d937)
2007-10-10 12:56:15 -05:00
Andrew Tridgell
47dfe299c8 - moved some of the base tests into torture/basic/
- added a CHARSET set of tests, which determines how the server deals
with some specific charset issues related to UTF-16
support. Interestingly, Samba3 already passes all but one of these
tests, because our incorrect UCS-2 and UTF-8 implementations where we
don't check the validity of characters actually matches what Windows
does! This means that adding UTF-16 support to Samba is going to be
_much_ easier than we expected.
(This used to be commit c8497a4236)
2004-03-26 02:39:48 +00:00