1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
Commit Graph

160 Commits

Author SHA1 Message Date
Andrew Tridgell
bf43c9bdcf r5308: trimmed back a lot of the old macros from smb_macros.h 2007-10-10 13:09:40 -05:00
Andrew Tridgell
9db6c79e90 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
2007-10-10 13:09:38 -05:00
Andrew Tridgell
bb1ab11d8e r5294: - added a separate NBT-WINS test for WINS operations (register, refresh, release and query)
- change the iface_n_*() functions to return a "const char *" instead of a "struct ipv4_addr"
  I think that in general we should move towards "const char *" for
  all IP addresses, as this makes IPv6 much easier, and is also easier
  to debug. Andrew, when you get a chance, could you fix some of the
  auth code to use strings for IPs ?

- return a NTSTATUS error on bad name queries and node status instead
  of using rcode. This makes the calling code simpler.

- added low level name release code in libcli/nbt/

- use a real IP in the register and wins nbt torture tests, as w2k3
  WINS server silently rejects some operations that don't come from the
  IP being used (eg. it says "yes" to a release, but does not in fact
  release the name)
2007-10-10 13:09:37 -05:00
Andrew Tridgell
bb1298a2eb r5156: started on test driven development of the nbt server. This adds a
NBT-REGISTER test that tests that a server correctly defends its name
against broadcast name registrations.

Jeremy, you might like to look at this. Samba3 nmbd fails to respond.
2007-10-10 13:09:28 -05:00
Andrew Tridgell
2d23c665ff r5130: added a single NBT name query benchmark. It keeps 10 queries in flight at a time. 2007-10-10 13:09:25 -05:00
Andrew Tridgell
ec32b22ed5 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
2007-10-10 13:09:15 -05:00
Tim Potter
37b4d1a676 r4973: Add a RAP scanner to smbtorture. win2k has call numbers 0-215 although
the cifs tr lists 250-318 also.
2007-10-10 13:09:10 -05:00
Andrew Tridgell
852f1e73b4 r4899: fixed build 2007-10-10 13:09:04 -05:00
Andrew Tridgell
239c310f25 r4891: - added a generic resolve_name() async interface in libcli/resolve/,
which will eventually try all resolution methods setup in smb.conf

 - only resolution backend at the moment is bcast, which does a
   parallel broadcast to all configured network interfaces, and takes
   the first reply that comes in (this nicely demonstrates how to do
   parallel requests using the async APIs)

 - converted all the existing code to use the new resolve_name() api

 - removed all the old nmb code (yay!)
2007-10-10 13:09:03 -05:00
Andrew Tridgell
9f12a45a05 r4831: added udp support to our generic sockets library.
I decided to incorporate the udp support into the socket_ipv4.c
backend (and later in socket_ipv6.c) rather than doing a separate
backend, as so much of the code is shareable. Basically this adds a
socket_sendto() and a socket_recvfrom() call and not much all.

For udp servers, I decided to keep the call as socket_listen(), even
though dgram servers don't actually call listen(). This keeps the API
consistent.

I also added a simple local sockets testsuite in smbtorture,
LOCAL-SOCKET
2007-10-10 13:08:59 -05:00
Andrew Tridgell
71cbe28734 r4758: - added async support to the session request code
- added async support to the negprot client code

- removed two unused parameters from smbcli_full_connection() code

- converted smbclient to use smbcli_full_connection() rather than
  reinventing everything itself
2007-10-10 13:08:50 -05:00
Andrew Tridgell
468f8ebbfd r4757: added the ability of the clisocket level of libcli to handle async
socket connections. This was complicated by a few factors:

 - it meant moving the event context from clitransport to clisocket,
   so lots of structures changed

 - we need to asynchronously handle connection to lists of port
   numbers, not just one port number. The code internally tries each
   port in the list in turn, without ever blocking

 - the man page on how connect() is supposed to work asynchronously
   doesn't work in practice (now why doesn't this surprise me?). The
   getsockopt() for SOL_ERROR is supposed to retrieve the error, but
   in fact the next (unrelated) connect() call on the same socket also
   gets an error, though not the right error. To work around this I
   need to tear down the whole socket between each attempted port. I
   hate posix.

Note that clisocket.c still does a blocking name resolution call in
smbcli_sock_connect_byname(). That will be fixed when we add the async
NBT resolution code.

Also note that I arranged things so that every SMB connection is now
async internally, so using plain smbclient or smbtorture tests all the
async features of this new code.
2007-10-10 13:08:50 -05:00
Andrew Tridgell
516f68fb05 r4700: first attempt at a composite async function, smb_composite_loadfile(),
which combineds ntcreatex, readx and close into a single call that
behaves just like a normal libcli async call.
2007-10-10 13:08:45 -05:00
Andrew Tridgell
0129ec947a r4617: basic alter_context requests now work in our client library. The test
just does a simple LSA/DSSETUP combo, which is what w2k does in the
ACL editor rpc calls that triggered this work
2007-10-10 13:08:34 -05:00
Andrew Tridgell
1a4713bfd0 r4475: fixed smbd to work with the small changes in the ldb API (the most important
change was in the ldb_msg_add_*() routines, which now use the msg as a context,
and thus it needs to be a talloc ptr)
2007-10-10 13:07:55 -05:00
Andrew Tridgell
7aec3dac6f r4451: added initial RPC-DSSETUP torture test. It works for level1 of
ds_RolerGetPrimaryDomainInformation()
2007-10-10 13:07:52 -05:00
Stefan Metzmacher
19482a2245 r4422: make lp_set_cmdline("torture:dangerous", "Yes") a bool parameter
metze
2007-10-10 13:07:47 -05:00
Stefan Metzmacher
26a7f4cf5e r4169: add descriptions about binding and unc strings to the
smbtorture --usage --help output

metze
2007-10-10 13:07:22 -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
80d15fa340 r4052: fixed a bunch of code to use the type safe _p allocation macros 2007-10-10 13:06:18 -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
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
Jelmer Vernooij
98afb504d9 r3898: Work towards local/server DCOM support, start working
on Simple example server side implementation
2007-10-10 13:06:02 -05:00
Jelmer Vernooij
4840eaeed3 r3891: Add rot (Running Object Table) interface 2007-10-10 13:06:02 -05:00
Andrew Tridgell
2ff9816ae0 r3829: added a RAW-ACLS test suite that tests query/set of ACLs on a file 2007-10-10 13:05:57 -05:00
Andrew Tridgell
5ed3d68d20 r3746: added RAW-STREAMS and RAW-EAS tests to smbtorture 2007-10-10 13:05:50 -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 Bartlett
6e6cc6fb98 r3686: The results of some work on the NETLOGON pipe:
Break out the samsync tests from RPC-NETLOGON into a new RPC-SAMSYNC,
that will cross-verify all the values.

Add support for the way netlogon credentials are shared between the
pipe that sets up schannel and the pipe that is encrypted with it.

Test this support, by calling both NETLOGON and SAMR operations in the
RPC-SCHANNEL test.

Move some of the Netlogon NEG flags into the .idl, now we have an idea
what a few of them really are.

Rename the sam_pwd_hash into a name that has meaning (all other crypto
functions were renamed in Samba4 ages ago).

Break out NTLMv2 functionality for operation on the NT hash - I intend
to do NTLMv2 logins in the samsync test in future, and naturally I
only have the hash.

Andrew Bartlett
2007-10-10 13:05:43 -05:00
Andrew Bartlett
3a140a3691 r3677: Seperate the SamLogon tests from the main RPC-NETLOGON test into a
RPC-SAMLOGON of their own.

I have expanded the tests to validate the use of various flags, which
change some of the crypto behaviour.

Andrew Bartlett
2007-10-10 13:05:43 -05:00
Volker Lendecke
02f5205872 r3660: This simulates the logon sequence of a XP login session I'm currently tuning
Samba3/OpenLDAP for. For a concrete situation you have to adapt the domain,
pdcname and usernames/passwords. Sorry, not parametrized yet, but this should
be doable if necessary.

Volker
2007-10-10 13:05:42 -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
Jelmer Vernooij
7a8244761b r3586: Fix some of the issues with the module init functions.
Both subsystems and modules can now have init functions, which can be
specified in .mk files (INIT_FUNCTION = ...)

The build system will define :
 - SUBSYSTEM_init_static_modules that calls the init functions of all statically compiled modules. Failing to load will generate an error which is not fatal
 - BINARY_init_subsystems that calls the init functions (if defined) for the subsystems the binary depends on

This removes the hack with the "static bool Initialised = " and the
"lazy_init" functions
2007-10-10 13:05:36 -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
Jelmer Vernooij
c052f2e1ed r3513: Add (the infrastructure for) DCOM support. Contents:
- Support for sending over the object UUID in DCERPC calls
 - Simple torture test for the DCOM "Simple" object
 - Generate extra argument for "object" interfaces in pidl
 - Some stubs for common DCOM functions
2007-10-10 13:05:23 -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
558de54ec6 r3494: got rid of include/rewrite.h, and split out the dynconfig.h header 2007-10-10 13:05:22 -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
1087ea830e r3461: another place where "open" was used as a structure element 2007-10-10 13:05:16 -05:00
Andrew Tridgell
7b7477ac42 r3453: - split out the auth and popt includes
- tidied up some of the system includes

- moved a few more structures back from misc.idl to netlogon.idl and samr.idl now that pidl
  knows about inter-IDL dependencies
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
8ebd20cf55 r3445: made the gtk tooks use minimal includes. This approximately halves the
total include lines in compiling C files in Samba (the .gch file is
now 5M instead of 12M)

This also gets rid of the silly gtk compile warning for non-gtk code
2007-10-10 13:05:12 -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
Jelmer Vernooij
cabec03422 r3413: RemoteActivation updates and fixes
Add torture test for RemoteActivation
The request is now send correctly and we get back a valid response
from Windows but r->in.Interfaces is set to 0 somewhere while parsing
the response...
2007-10-10 13:05:07 -05:00
Andrew Bartlett
d967569c56 r3394: Give the user a clue why we are blasting them with the usage brick.
Andrew Bartlett
2007-10-10 13:05:05 -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
7067bb9b52 r3324: made the smbtorture code completely warning free 2007-10-10 13:04:55 -05:00