1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

65 Commits

Author SHA1 Message Date
Andrew Tridgell
382231ca36 r4445: put the unlink test in a subdirectory, and ensure it cleans up 2007-10-10 13:07:51 -05:00
Andrew Tridgell
a44fa5319d r4430: - fixed the BASE-LOCK* tests to use a subdirectory, and properly setup the directory before each test,
thus avoiding errors due to previous failures
2007-10-10 13:07:48 -05:00
Stefan Metzmacher
b94f92bc66 r4063: - change char * -> uint8_t in struct request_buffer
- change smbcli_read/write to take void * for the buffers to match read(2)/write(2)

all this fixes a lot of gcc-4 warnings

metze
2007-10-10 13:06:21 -05:00
Andrew Tridgell
eec698254f r4055: fixed more places to use type safe allocation macros 2007-10-10 13:06:20 -05:00
Andrew Tridgell
0928b1f5b6 r4037: fixed a bunch of "might be uninitialised" warnings after enabling -O1 in my compile 2007-10-10 13:06:16 -05:00
Andrew Tridgell
17a4e0b3ac r4035: more effort on consistent naming of the access mask bits.
This removes the duplicate named SEC_RIGHTS_MAXIMUM_ALLOWED and
SEC_RIGHTS_FULL_CONTROL, which are just other names for
SEC_FLAG_MAXIMUM_ALLOWED and SEC_RIGHTS_FILE_ALL. The latter names
match the new naming conventions in security.idl

Also added names for the generic->specific mappings for files are
directories
2007-10-10 13:06:16 -05:00
Andrew Tridgell
31a7bddbb3 r4013: got rid of a bunch of unused or unmaintained code
- removed the clitar code. It is unmaintained, and a horribly badly done hack

 - removed client.h as it contained mostly unused definitions

 - removed the unused clidfs.c code
2007-10-10 13:06:15 -05:00
Andrew Tridgell
01c0fa722f r4011: get rid of rpc_secdes.h and replace it with a single sane set of
definitions for security access masks, in security.idl

The previous definitions were inconsistently named, and contained many
duplicate and misleading entries. I kept finding myself tripping up
while using them.
2007-10-10 13:06:13 -05:00
Andrew Tridgell
0950681091 r3975: added LFN filesystem attribute bit definition from ethereal
apologies for not committing this earlier
2007-10-10 13:06:10 -05:00
Stefan Metzmacher
234166606d r3971: fix compiler warnings
metze
2007-10-10 13:06:09 -05:00
Stefan Metzmacher
45401b757e r3958: fix the build for now
tridge: please fix that!

metze
2007-10-10 13:06:08 -05:00
Andrew Tridgell
9debe29381 r3945: expanded the BASE-PROPERTIES test to print a nicely formatted list of
the capabilities and filesystem attribute bits of the server.
2007-10-10 13:06:07 -05:00
Jeremy Allison
a2ea2166dc r3888: Just proving :-) to tridge that a Setfileinfo with a modified
write time is sticky, and causes any subsequent writes not to update
the last write time. Added write that extends the file followed by
fnum specific smbflush. It stays the same time :-).
Jeremy.
2007-10-10 13:06:02 -05:00
Jeremy Allison
c9211d0847 r3887: Much better understanding of delayed write time, and the interaction
with setfileinfo modifying the write time. I have some ideas on how
to emulate this in the Samba server now but the commented case will
be very hard...
Jeremy.
2007-10-10 13:06:02 -05:00
Jeremy Allison
2e47e241f9 r3886: Trying to understand delayed file write update times. Added another
test that uses 2 connections and queries the time via pathinfo, not fileinfo.
MSDN states : "When writing to a file, the last write time is not fully updated
until all handles used for writing have been closed." - but this is obviously
untrue. W2K3 seems to use a 2 second granularity for this. Next I'll try using
SetFileTime equivalent to see if this takes the same time to take effect.
Jeremy.
2007-10-10 13:06:02 -05:00
Andrew Tridgell
f7fb34715b r3699: - split the delayed write testing out of RAW-WRITE, as it is not yet
clear what the correct behaviour is for delayed stat info update.

- use a common torture_setup_dir() function for setting up a test
  directory in torture tests.
2007-10-10 13:05:45 -05:00
Andrew Tridgell
25e0138464 r3634: - fixed BASE-DISCONNECT test to force the async packets to be sent by
waiting for a chkpath response

- fixed open async send in BASE-DISCONNECT

with these changes BASE-DISCONNECT crashes Samba4, as it was designed
to do. I'll work on a fix :)
2007-10-10 13:05:41 -05:00
Andrew Tridgell
5205f598b8 r3633: - moved module init functions to after smb.conf and command line
parsing, so that module init can take account of lp_ parms (thats
  why gensec:krb5=no wasn't working)

- added a BASE-DISCONNECT torture test that tests server response to
  clients disconnecting with open lock and open requests pending
2007-10-10 13:05:41 -05:00
Andrew Tridgell
eeec57d4f6 r3608: added BASE-DENYDOS test
this test demonstrates how w2k3 handles the special semantics of
DENY_DOS when 2 opens happen on the same connection. The 2nd open
doesn't actually do a NTFS open, it happens as a secondary reference
to the same internal file handle in the CIFS layer. The evidence is
that the 2nd open shares the same POSITION_INFORMATION field as the
first open, but only for the special DENY_DOS cases that would
normally be refused.
2007-10-10 13:05:38 -05:00
Andrew Tridgell
cb76bd218e r3580: - on file overwrite in ntcreatex we need to replace the file permissions.
- pvfs now passes BASE-OPENATTR

- pvfs also passes the BASE-DEFER_OPEN test, but it is not a well
  formed test for regular running so I am removing it from the list of
  tests to run in test_posix.sh (the test is covered better by RAW-MUX
  anyway)
2007-10-10 13:05:35 -05:00
Andrew Tridgell
09b4652b40 r3574: the RAW-OPEN test changes broke a couple of the other tests. This
fixes most of them, although RAW-SEARCH still fails (due to an
interaction with the new xattr code)
2007-10-10 13:05:33 -05:00
Andrew Tridgell
0d51511d40 r3507: - added deferred replies on sharing violation in pvfs open. The
deferred reply is short-circuited immediately when the file is
  closed by another user, allowing it to be opened by the waiting user.

- added a sane set of timeval manipulation routines

- converted all the events code and code that uses it to use struct
  timeval instead of time_t, which allows for microsecond resolution
  instead of 1 second resolution. This was needed for doing the pvfs
  deferred open code, and is why the patch is so big.
2007-10-10 13:05:23 -05:00
Andrew Tridgell
c6f4865744 r3481: split out client.h and events.h 2007-10-10 13:05:20 -05:00
Andrew Tridgell
b97e395c81 r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ioctl.h) 2007-10-10 13:05:17 -05:00
Andrew Tridgell
6b1f86aea8 r3449: more include file reduction
the ldb part isn't ideal, I will have to think of a better solution
2007-10-10 13:05:13 -05:00
Andrew Tridgell
264ce91810 r3447: more include/system/XXX.h include files 2007-10-10 13:05:12 -05:00
Andrew Tridgell
dd0618d595 r3426: removed 2 unused files, and some unused variables 2007-10-10 13:05:08 -05:00
Andrew Tridgell
386ac565c4 r3419: moved the libcli/raw structures into libcli/raw/libcliraw.h
and made them private
2007-10-10 13:05:07 -05:00
Andrew Tridgell
adf4a68270 r3400: - allow callers to control the flags2 field in raw packets
- added testing of the FLAGS2_READ_PERMIT_EXECUTE bit in the ntdeny tests
2007-10-10 13:05:05 -05:00
Andrew Tridgell
c36851d230 r3387: fixed pvfs to pass the NTDENY tests. The tricky bit was
SA_RIGHT_FILE_EXECUTE, which depends on a flags2 bit
2007-10-10 13:05:04 -05:00
Andrew Tridgell
b95493d3d1 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)
2007-10-10 13:05:03 -05:00
Andrew Tridgell
e23edf762c 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 :)
2007-10-10 13:05:03 -05:00
Andrew Tridgell
7067bb9b52 r3324: made the smbtorture code completely warning free 2007-10-10 13:04:55 -05:00
Andrew Tridgell
d4042c4364 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
2007-10-10 13:04:46 -05:00
Andrew Tridgell
efaa0eaec4 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
2007-10-10 13:04:41 -05:00
Andrew Tridgell
eca85d26ed 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
2007-10-10 13:04:40 -05:00
Andrew Tridgell
3f60775916 r3188: tidy up the rename test a bit more 2007-10-10 13:04:38 -05:00
Andrew Tridgell
c5e72b05d7 r3182: separate out the BASE-RENAME test into torture/basic/rename.c 2007-10-10 13:04:37 -05:00
Andrew Tridgell
739c9e401c r3155: reformat a delete test 2007-10-10 13:02:26 -05:00
Andrew Tridgell
d7b0dece6f r3152: reformatted some of the delete test code 2007-10-10 13:02:26 -05:00
Andrew Tridgell
022b21460a r3150: printing __location__ is more useful than a operation number 2007-10-10 13:02:26 -05:00
Andrew Tridgell
50379a0a58 r3149: separate the delete on close test into torture/basic/delete.c 2007-10-10 13:02:26 -05:00
Andrew Tridgell
6e87feb89c r3148: make --failures work for the BASE-DENY1 and BASE-DENY2 tests 2007-10-10 13:02:25 -05:00
Andrew Tridgell
4395c0557a 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.
2007-10-10 13:00:00 -05:00
Andrew Tridgell
f4a91be635 r3011: separated the locktest code into a separate module in smbtorture 2007-10-10 12:59:57 -05:00
Andrew Tridgell
814881f0e5 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;
}
2007-10-10 12:59:39 -05:00
Andrew Tridgell
c82a9cf750 r2680: switched the libcli/raw/ code over to use talloc_reference(), which simplifies things quite a bit 2007-10-10 12:59:21 -05:00
Andrew Tridgell
c315d6ac1c 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
2007-10-10 12:59:18 -05:00
Andrew Tridgell
26da45a801 r2628: got rid of some warnings and converted a few more places to use hierarchical memory allocation 2007-10-10 12:59:14 -05:00
Andrew Tridgell
7b23624a0f 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.
2007-10-10 12:59:09 -05:00