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

64 Commits

Author SHA1 Message Date
Andrew Tridgell
16ed45d627 r2738: free up the session information as soon as it is invalidated in the
RAW-CONTEXT test case
(This used to be commit f4a7a3282a)
2007-10-10 12:59:28 -05:00
Andrew Tridgell
b2f1a29e43 r2710: continue with the new style of providing a parent context whenever
possible to a structure creation routine. This makes for much easier
global cleanup.
(This used to be commit e14ee428ec)
2007-10-10 12:59:25 -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
5b44130afa r2671: we're getting too many errors caused by the talloc_realloc() API not
taking a context (so when you pass a NULL pointer you end up with
memory in a top level context). Fixed it by changing the API to take a
context. The context is only used if the pointer you are reallocing is
NULL.
(This used to be commit 8dc23821c9)
2007-10-10 12:59:20 -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
ec0128ef01 r2649: - used some cpp tricks to make users of talloc() and talloc_realloc()
to get auto-naming of pointers very cheaply.

- fixed a couple of memory leaks found with the new tricks

A typical exit report for smbd is now:

talloc report on 'null_context' (total 811 bytes in 54 blocks)
        auth/auth_sam.c:334            contains     20 bytes in   1 blocks
        struct auth_serversupplied_info contains    498 bytes in  33 blocks
        UNNAMED                        contains      8 bytes in   1 blocks
        lib/data_blob.c:40             contains     16 bytes in   1 blocks
        iconv(CP850,UTF8)              contains     61 bytes in   4 blocks
        iconv(UTF8,CP850)              contains     61 bytes in   4 blocks
        iconv(UTF8,UTF-16LE)           contains     67 bytes in   4 blocks
        iconv(UTF-16LE,UTF8)           contains     67 bytes in   4 blocks
        UNNAMED                        contains     13 bytes in   1 blocks

which is much better than before
(This used to be commit 6e721393d0)
2007-10-10 12:59:16 -05:00
Andrew Tridgell
82b61938ac r2593: don't crash if the server doesn't know that 0 count searches mean 1
(This used to be commit 640ced4530)
2007-10-10 12:59:11 -05:00
Andrew Tridgell
ca60193f24 r2520: - finished implementing the server side of the old style search requests
(This used to be commit 4e4859c06b)
2007-10-10 12:59:01 -05:00
Andrew Tridgell
23ba434b01 r2469: complete overhaul of the old-style RAW_SEARCH_ calls (the OS/2 and
original core level calls). The old code was completely wrong in many respects.

also fixed the EA_SIZE level in the server

extended the RAW-SEARCH test suite to test the new code properly
(This used to be commit 71480271ad)
2007-10-10 12:58:56 -05:00
Andrew Tridgell
6108ead954 r2462: added a test for the error code for no matching filename
(This used to be commit 7bfbbc38ed)
2007-10-10 12:58:55 -05:00
Andrew Tridgell
d78a1ac756 r2457: expanded the RAW-SEARCH test to test for what happens when a directory
is modified while being searched, and whether the server always
returns sorted directory listings.
(This used to be commit e23514c78f)
2007-10-10 12:58:55 -05:00
Jeremy Allison
f0ae80e18c r2217: Ad-hoc tests to allow me to work out the correct error code
for the bad path algorithm.
Jeremy.
(This used to be commit d2d32d8f2b)
2007-10-10 12:58:32 -05:00
Jeremy Allison
ebe1733768 r2151: Added some more ad-hoc tests. Found bugs in Samba3 with these :-).
Jeremy.
(This used to be commit fe6506e190)
2007-10-10 12:58:27 -05:00
Stefan Metzmacher
8aa051c7b2 r2071: - change smbtorture to use the popt_common stuff
this means -U DOM\\user is know allowed

- torture:userdomain is a new smb.conf parameter
  because lp_workgroup is not the domain of the user

- we use torture:userdomain now in the tests instad of lp_workgroup

- for backward compat the userdomain is lp_workgroup() by default and
  not lp_netbios_name(), which my change later to match 'net' and 'smbclient'..

- we now have dublicate options e.g. -N -s ...
  tridge: can we change this?

metze
(This used to be commit 4733dcbf5f)
2007-10-10 12:58:23 -05:00
Stefan Metzmacher
b0856b8ad0 r1996: fix compiler warnings
metze
(This used to be commit dd8d68f3ec)
2007-10-10 12:58:16 -05:00
Andrew Tridgell
b83ba93eae r1983: a completely new implementation of talloc
This version does the following:

  1) talloc_free(), talloc_realloc() and talloc_steal() lose their
     (redundent) first arguments

  2) you can use _any_ talloc pointer as a talloc context to allocate
     more memory. This allows you to create complex data structures
     where the top level structure is the logical parent of the next
     level down, and those are the parents of the level below
     that. Then destroy either the lot with a single talloc_free() or
     destroy any sub-part with a talloc_free() of that part

  3) you can name any pointer. Use talloc_named() which is just like
     talloc() but takes the printf style name argument as well as the
     parent context and the size.

The whole thing ends up being a very simple piece of code, although
some of the pointer walking gets hairy.

So far, I'm just using the new talloc() like the old one. The next
step is to actually take advantage of the new interface
properly. Expect some new commits soon that simplify some common
coding styles in samba4 by using the new talloc().
(This used to be commit e35bb094c5)
2007-10-10 12:58:14 -05:00
Andrew Tridgell
ada86316e5 r1820: added a strcmp_safe() that handles NULL pointers. Needed for the
search torture test, as some servers return really bad entries.
(This used to be commit c900ebb3ac)
2007-10-10 12:57:59 -05:00
Andrew Bartlett
14924a9fe7 r1795: Fix the multiple session setup torture tests.
Andrew Bartlett
(This used to be commit c4036f2189)
2007-10-10 12:57:57 -05:00
Andrew Bartlett
63c5ca7d58 r1769: Add a new torture test to check vuid properties, and SPNEGO/non-SPNEGO games.
Andrew Bartlett
(This used to be commit 90d70a63ee)
2007-10-10 12:57:55 -05:00
Andrew Tridgell
ae274c84d7 r1740: fixed the torture suite for ASCII-only servers
(This used to be commit c3bce90be7)
2007-10-10 12:57:52 -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
44194cc663 r1632: in case of error don't send uninitialised fnums on the wire
(This used to be commit 13cd58efce)
2007-10-10 12:57:45 -05:00
Stefan Metzmacher
d093b7e777 r1547: rename 'enum <bla>_level' -> 'enum smb_<bla>_level'
e.g. we now have 'union smb_mkdir' and 'enum smb_mkdir_level' in sync

we may should also rename 'RAW_MKDIR_*' -> 'SMB_MKDIR_*'

metze
(This used to be commit 0bb50dcf1c)
2007-10-10 12:57:41 -05:00
Jeremy Allison
a8069f5778 r1113: Test for wildcards in chkpath.
Jeremy.
(This used to be commit 14cf961b7f)
2007-10-10 12:56:38 -05:00
Jeremy Allison
02079ccc2e r1098: Extended raw chkpath to catch regressions.
Jeremy.
(This used to be commit 37d1fa1684)
2007-10-10 12:56:38 -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
Jeremy Allison
496220916a r946: Updated attribute only oplock tester to cover more cases.
Jeremy.
(This used to be commit 6c9d32173b)
2007-10-10 12:56:21 -05:00
Stefan Metzmacher
45e93c19ef r943: change samba4 to use 'uint8_t' instead of 'unsigned char'
metze
(This used to be commit b5378803fd)
2007-10-10 12:56:21 -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
579c13da43 r873: converted samba4 to use real 64 bit integers instead of
structures. This was suggested by metze recently.

I checked on the build farm and all the machines we have support 64
bit ints, and support the LL suffix for 64 bit constants. I suspect
some won't support strtoll() and related functions, so we will
probably need replacements for those.
(This used to be commit 9a9244a1c6)
2007-10-10 12:56:14 -05:00
Jeremy Allison
daa890e2c8 r865: Regression test for attribute-only opens not causing an oplock break.
Samba3 server used to get this wrong.
Jeremy.
(This used to be commit 4120b3bdf6)
2007-10-10 12:56:13 -05:00
Jeremy Allison
31b9470996 r741: Test from Volker in RAW-OPEN for truncating a file containing locks.
Also added the same ad-hoc test is LOCK7.
Jeremy.
(This used to be commit 6cb21ccda3)
2007-10-10 12:53:46 -05:00
Andrew Tridgell
b394a4c2ff r336: added a -X command line option to smbtorture to enable dangerous or
possibly destructive tests. Use with care!

Added IDL and test code for samr_Shutdown() and samr_SetDsrmPassword()
(This used to be commit 84de0b7e58)
2007-10-10 12:51:33 -05:00
Jeremy Allison
763c4bc9ac r204: Turns out that the string in the SEARCH unix_info level is that
rare thing, a non-length string (ie. not a WIRE_STRING) but a null
terminated char string. There wasn't a good interface to pull that
out of a blob (all the string interfaces assumed WIRE_STRINGS). Added
a new one, only used for this call. Sucks, I know - but the alternatives
suck more. Added tests for some of the unix info returned.
Jeremy.
(This used to be commit 4d0ed04c54)
2007-10-10 12:51:16 -05:00
Jeremy Allison
6f47ce8b6c r203: Added size and alloc size tests to UNIX info level.
Jeremy.
(This used to be commit 16455c5b34)
2007-10-10 12:51:16 -05:00
Jeremy Allison
b560bf5361 r184: Fix UNIX Search info level. This still needs to be added to the raw
client library before this test can work.
Jeremy.
(This used to be commit 7b2a266543)
2007-10-10 12:51:15 -05:00
Andrew Tridgell
ac193579e7 r152: a quick airport commit ....
added ldbedit, a _really_ useful command

added ldbadd, ldbdel, ldbsearch and ldbmodify to build

solved lots of timezone issues, we now pass the torture tests with
client and server in different zones

fixed several build issues

I know this breaks the no-LDAP build. Wait till I arrive in San Jose for that
fix.
(This used to be commit af34710d4d)
2007-10-10 12:51:11 -05:00
Jeremy Allison
4c12490730 Added one more test for "dirname\."
Jeremy.
(This used to be commit a7ca9620d5)
2004-04-02 18:59:38 +00:00
Andrew Tridgell
f169d83a8b fixed the handling of level II oplocks in samba4, especially when
acting as a cifs redirectory (using the cifs backend)
(This used to be commit 06a8100e6a)
2004-03-25 02:41:19 +00:00
Tim Potter
9a6388179b Convert libcli routines to return NTSTATUS instead of BOOL. Again, the
only users are smbclient and smbtorture.
(This used to be commit 54cb508c78)
2004-02-10 11:33:35 +00:00
Tim Potter
4639eb5a58 Convert libcli routines to use cli_tree instead of cli_state. Port
smbtorture to use the new interface.

Part 2 will be to eliminate cli_state from smbtorture as this is now
the only place where it is used.
(This used to be commit db1cc96af6)
2004-02-08 00:51:07 +00:00
Andrew Tridgell
0593fd96fb cope with a wider range of broken servers in the RAW-QFILEINFO test
(This used to be commit eb6fc29caf)
2004-01-21 03:30:03 +00:00
Andrew Tridgell
926240428c * patch based on work by Jim Myers to unify the ioctl handling to be
more like the other major SMB functions

* added SMBntrename code
(This used to be commit f2d3dc9893)
2003-12-04 02:03:06 +00:00
Andrew Tridgell
60f4bb657a allow qfsinfo to continue with just 10 levels supported in the server
(This used to be commit 9476dd5620)
2003-11-06 05:51:58 +00:00
Andrew Tridgell
4e73a3c0fe fixed snprintf.c for systems that have only some of the *printf() family of functions
cope with servers that return bogus (too large) values in max_xmit

cope with a couple more error conditions in RAW-SFILEINFO

better startup time heuristics in NBENCH
(This used to be commit 89f7261ba5)
2003-10-10 05:40:32 +00:00
Andrew Tridgell
0becf4d683 thanks to ntfsd and some google searches I worked out what the unknown
fields in level 261 and level 262 of directory search are, plus the
names of the levels

the unknown fields are a 64bit unique file id, and match the 64 bit
number from the internal_information qfileinfo level
(This used to be commit b69f54eb02)
2003-09-02 04:37:33 +00:00
Andrew Tridgell
11c5869a45 I think I've finally got the ascii/unicode issues right in trans2 find
first

Also expanded the rename test a little
(This used to be commit 723af7f097)
2003-08-31 03:16:52 +00:00
Andrew Tridgell
a8a5ac2bd2 expanded the RAW-READ test to make it clearer that all locks conflict
in SMBlockread, not just other peoples locks (error in spec)
(This used to be commit a56f6896bf)
2003-08-29 04:35:35 +00:00