1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

2294 Commits

Author SHA1 Message Date
Stefan Metzmacher
d92eff2328 r3097: - an empty string is a valid DN
- detect in valid DN's

- some error handling fixes

metze
2007-10-10 13:02:20 -05:00
Stefan Metzmacher
c730d7d638 r3096: typo
metze
2007-10-10 13:02:20 -05:00
Stefan Metzmacher
1e7e94fdb1 r3095: - fix a free'ing of msg.dn
- reenable index tests

metze
2007-10-10 13:02:20 -05:00
Stefan Metzmacher
f1d8f4bc5d r3094: import all LDAP error codes from the RFC 2251
metze
2007-10-10 13:02:20 -05:00
Stefan Metzmacher
18552f4786 r3093: - implment ldb_rename() and ldbrename
- add tests for ldbrename

- disable all tests which regenerate the index
  (this is broken for me...the process hangs,
   tridge we need to discuss that)

- link only the needed stuff to the ldb tools

- build ldbtest inside samba

metze
2007-10-10 13:02:20 -05:00
Stefan Metzmacher
f7564bf4d2 r3092: prepare for build inside samba
metze
2007-10-10 13:02:20 -05:00
Stefan Metzmacher
71ccac56c2 r3091: link only the needed stuff
metze
2007-10-10 13:02:19 -05:00
Stefan Metzmacher
52eab8dc17 r3089: fix memleak
metze
2007-10-10 13:01:58 -05:00
Andrew Tridgell
3791b97694 r3087: fixed a typo 2007-10-10 13:01:58 -05:00
Andrew Tridgell
fbc6949e95 r3086: fixed smbpid handling in the cifs backend 2007-10-10 13:01:57 -05:00
Andrew Tridgell
6ea815b6d4 r3085: make the RAW-WRITE tests more robust to errors in previous parts of the test 2007-10-10 13:01:57 -05:00
Andrew Tridgell
e11b000319 r3084: mincnt and maxcnt were the wrong way around in readbraw server code 2007-10-10 13:01:57 -05:00
Andrew Tridgell
76329798ff r3083: fixed a couple of generic mapping errors found with RAW-* and cifs:mapgeneric 2007-10-10 13:01:57 -05:00
Andrew Tridgell
c240c6bca5 r3082: added a "cifs:mapgeneric" option, which tells the cifs backend to use
the ntvfs_generic mapping functions rather than sending the exact
function asked for. This allows the generic mapping functions to be
tested by comparing the behaviour of smbtorture against two cifs
backend shares, one using "cifs:mapgeneric = true" and the other
"cifs:mapgeneric = False"
2007-10-10 13:01:57 -05:00
Andrew Tridgell
3457c1836c r3081: several updates to ntvfs and server side async request handling in
preparation for the full share modes and ntcreatex code that I am
working on.

highlights include:

 - changed the way a backend determines if it is allowed to process a
   request asynchronously. The previous method of looking at the
   send_fn caused problems when an intermediate ntvfs module disabled
   it, and the caller then wanted to finished processing using this
   function. The new method is a REQ_CONTROL_MAY_ASYNC flag in
   req->control_flags, which is also a bit easier to read

 - fixed 2 bugs in the readbraw server code. One related to trying to
   answer a readbraw with smb signing (which can't work, and crashed
   our signing code), the second related to error handling, which
   attempted to send a normal SMB error packet, when readbraw must
   send a 0 read reply (as it has no header)

 - added several more ntvfs_generic.c generic mapping functions. This
   means that backends no longer need to implement such esoteric
   functions as SMBwriteunlock() if they don't want to. The backend
   can just request the mapping layer turn it into a write followed by
   an unlock. This makes the backends considerably simpler as they
   only need to implement one style of each function for lock, read,
   write, open etc, rather than the full host of functions that SMB
   provides. A backend can still choose to implement them
   individually, of course, and the CIFS backend does that.

 - simplified the generic structures to make them identical to the
   principal call for several common SMB calls (such as
   RAW_WRITE_GENERIC now being an alias for RAW_WRITE_WRITEX).

 - started rewriting the pvfs_open() code in preparation for the full
   ntcreatex semantics.

 - in pvfs_open and ipc_open, initially allocate the open file
   structure as a child of the request, so on error we don't need to
   clean up. Then when we are going to succeed the open steal the
   pointer into the long term backend context. This makes for much
   simpler error handling (and fixes some bugs)

 - use a destructor in the ipc backend to make sure that everthing is
   cleaned up on receive error conditions.

 - switched the ipc backend to using idtree for fnum allocation

 - in the ntvfs_generic mapping routines, use a allocated secondary
   structure not a stack structure to ensure the request pointer
   remains valid even if the backend replies async.
2007-10-10 13:01:57 -05:00
Andrew Bartlett
5f2295a5fb r3080: Make the Samba4 SAMR server pass the new, nasty torture test (now that
SAMR_FIELD_PASSWORD has been split up).

Andrew Bartlett
2007-10-10 13:01:57 -05:00
Andrew Bartlett
9c911b361c r3079: make code more pretty :-)
Andrew Bartlett
2007-10-10 13:01:56 -05:00
Andrew Bartlett
2df85686f5 r3078: Allow more things to be set as command line options to provision.
Andrew Bartlett
2007-10-10 13:01:56 -05:00
Andrew Bartlett
51774a9bca r3077: Add initial handling of Account Flags in SAMR user info level 21 and 25.
Andrew Bartlett
2007-10-10 13:01:56 -05:00
Andrew Bartlett
4091fee8e8 r3076: Fix memory leak.
Andrew Bartlett
2007-10-10 13:01:56 -05:00
Andrew Bartlett
173f29a1d8 r3075: Initialise (and check for intialisation) of the private pointer to
ensure we don't segfault on the cleanup from an incomplete schannel
bind.

Andrew Bartlett
2007-10-10 13:01:56 -05:00
Andrew Bartlett
3759128bd3 r3074: Add in a new 'field present' flag samr.idl for the Account Flags
field.  Add torture test for setting this feild - including all the
odd cases (not all the flags 'stick', and not others cannot be
removed).

Seperate the two 'password change' flags, and test them both in the
torture code.

Check that the password did change after every password set call.

Andrew Bartlett
2007-10-10 13:01:56 -05:00
Andrew Bartlett
8b38bffc70 r3073: Fix bug in the handling of null-terminated ASCII strings in RPC.
Because we didn't count the null terminator, we would not move past it
in the packet.

Andrew Bartlett
2007-10-10 13:01:55 -05:00
Andrew Tridgell
834b09929b r3064: - use UINT8_MAX and UINT16_MAX instead of hex values for idr_get_new() limits
- change idr_get_new() to use > instead of >= in the limit check
2007-10-10 13:01:55 -05:00
Andrew Tridgell
55aeb33343 r3063: our default dos charset is CP850, but some systems don't have that, so
as a special case, automatically fall back to ASCII if its not found.
2007-10-10 13:01:55 -05:00
Andrew Tridgell
069305adaf r3062: handle spaces at the start of options in lp_set_cmdline() 2007-10-10 13:01:55 -05:00
Andrew Tridgell
4d2497b7f4 r3061: change a debug to help track down a charset problem 2007-10-10 13:01:55 -05:00
Tim Potter
b572be00b3 r3060: Replace magic number with a C99 constant. 2007-10-10 13:01:55 -05:00
Andrew Tridgell
8856f010e9 r3059: completely get rid of the MAX_CONNECTIONS limit, as a idle tree
connect is very cheap now.
2007-10-10 13:01:55 -05:00
Andrew Tridgell
2b0554b3b5 r3058: we don't use the bitmap code any more, delete it 2007-10-10 13:01:54 -05:00
Andrew Tridgell
4220914179 r3057: - moved the idtree.c code into lib/
- converted the tid handling to use a idtree instead of bitmaps
2007-10-10 13:01:54 -05:00
Andrew Tridgell
16835a0ef9 r3056: added a id -> pointer data structure (a type of radix tree). This is
an extremely efficient way of mapping from an integer handle (such as
an open file handle) to a pointer (such as the structure containing
the open file information). The code is taken from lib/idr.c in the
2.6 Linux kernel, and is very fast and space efficient. By using
talloc it even has auto cleanup.

This commit converts the handling of open file handles and open
directory search handles to use the idtree routines. In combination
with talloc destructors, this simplifies the structure handling in the
pvfs backend a lot. For example, we no longer need to keep a linked
list of open directory searches at all, and we no longer need to do
linear scans of the list of open files on most operations.

The end result is that the pvfs code is now extremely scalable. You
can have 10s of thousands of open files and open searches and the code
still runs very fast.

I have also added a small optimisation into the file close path, to
avoid looking in the byte range locking database if we know that there
are no locks outstanding.
2007-10-10 13:01:54 -05:00
Andrew Tridgell
7bea9afeed r3055: use talloc_zero_p() 2007-10-10 13:01:54 -05:00
Andrew Tridgell
cccd59009d r3054: use talloc_zero_array_p() in a couple of places 2007-10-10 13:01:54 -05:00
Andrew Tridgell
6dea60e3b9 r3053: make the maxfid test use subdirectories, so it doesn't create 64k
files in one directory (running the test was very slow) and can clean
up after itself easily.
2007-10-10 13:01:54 -05:00
Andrew Tridgell
65b7316e9b r3052: added talloc_zero_p() and talloc_zero_array_p() calls, for allocating zeroed memory 2007-10-10 13:01:53 -05:00
Jelmer Vernooij
f6deb3d065 r3047: Always include a \ again before the pipe name we're opening. Without a
backslash works, but is not like Windows does it.
2007-10-10 13:01:53 -05:00
Jelmer Vernooij
7771b5d8fa r3046: \\PIPE\\ is internal (not actually included on the wire) 2007-10-10 13:01:53 -05:00
Jelmer Vernooij
38e9290bcf r3045: Allow object-uuid@... binding strings 2007-10-10 13:01:53 -05:00
Stefan Metzmacher
c79bbe54b4 r3044: resolve the error code for WERR_DS_OBJ_NOT_FOUND to the name
metze
2007-10-10 13:01:53 -05:00
Jelmer Vernooij
f3da7c8b44 r3043: Use binding strings for specifying endpoints. The property for
specifying a endpoint is now also 'endpoint' instead of 'endpoints'. The
default endpoint (if none is specified) is still "ncacn_np:[\\pipe\\ifacename]",
where ifacename is the name of the interface.

Examples:

[
  uuid(60a15ec5-4de8-11d7-a637-005056a20182),
  endpoint("ncacn_np:[\\pipe\\rpcecho]", "ncacn_ip_tcp:")
]
interface rpcecho
{
	void dummy();
}

dcerpc_binding is now converted to ep_description in the server, but I hope to
completely eliminate ep_description later on.

The eventual goal of all these changes is to make it easier to add
 transports as I'm going to add support for
 ncalrpc (local RPC over named pipes) and ncacn_unix_stream (Unix sockets).
2007-10-10 13:01:53 -05:00
Stefan Metzmacher
6656518772 r3041: a start of a README/HOWTO for the samba4 build system.
(still incomplete, but should be a good start...)

can someone look for spelling and grammar mistakes...

metze
2007-10-10 13:00:01 -05:00
Jim McDonough
b1bbf0a431 r3040: Add sleeps between operations to nbench. Submitted by aliguori@us.ibm.com. 2007-10-10 13:00:01 -05:00
Andrew Tridgell
a256e71029 r3039: This solves the problem of async handlers in ntvfs backends not being
in the right state when called. For example, when we use the unixuid
handler in the chain of handlers, and a backend decides to continue a
call asynchronously then we need to ensure that the continuation
happens with the right security context.

The solution is to add a new ntvfs operation ntvfs_async_setup(),
which calls all the way down through the layers, setting up anything
that is required, and takes a private pointer. The backend wanting to
make a async calls can use ntvfs_async_setup() to ensure that the
modules above it are called when doing async processing.
2007-10-10 13:00:01 -05:00
Tim Potter
e080a2483d r3036: Add function to pull an array of structures. Abstracts away the
individual routines in ndr_spoolss_buf.c.
2007-10-10 13:00:01 -05:00
Andrew Tridgell
2894dd0ac0 r3035: if the ntvfs layers prior to us have said that we can't perform an
operation asynchronously (such as the nbench module), then ignore lock
timeouts, as they would make no sense
2007-10-10 13:00:00 -05:00
Andrew Tridgell
5ef80f034d r3034: - fixed a bug in message dispatch, when the dispatch function called messaging_deregister()
- added a pvfs_lock_close_pending() hook to remove pending locks on file close

 - fixed the private ptr argument to messaging_deregister() in pvfs_wait

 - fixed a bug in continuing lock requests after a lock that is blocking a pending lock is removed

 - removed bogus brl_unlock() call in lock continue

 - corrected error code for LOCKING_ANDX_CHANGE_LOCKTYPE

 - expanded the lock cancel test suite to test lock cancel by unlock and by close

 - added a testsuite for LOCKING_ANDX_CHANGE_LOCKTYPE
2007-10-10 13:00:00 -05:00
Jelmer Vernooij
1977932b54 r3033: Use the C struct directly if we can instead of generating a binding
string and parsing that.
2007-10-10 13:00:00 -05:00
Jelmer Vernooij
c15862e778 r3032: Somewhat stricter syntax for binding strings:
[] is now mandatory
 : after the hostname is no longer allowed

examples of allowed binding strings:

ncacn_np:myhost[samr]
ncacn_ip_tcp:10.0.0.1[1045]
ncacn_ip_tcp:2001:7b8:37b:1:210:dcff:fecb:a9e3[1024,sign,seal]
ncacn_np:myhost
ncacn_ip_tcp:192.168.4.2
308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_ip_tcp:192.168.4.2
308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_ip_tcp:192.168.4.2[,print]

Note that the last two lines are not recognized by smbtorture as a binding
 string yet. dcerpc_parse_binding() does accept them though.
2007-10-10 13:00:00 -05:00
Andrew Tridgell
d5bfc910b1 r3031: added support for lock cancelation, which effectively just triggers an early lock timeout
added support for more of the bizarre special lock offset semantics of w2k3
2007-10-10 13:00:00 -05:00