1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

192 Commits

Author SHA1 Message Date
Andrew Tridgell
b3b8958a18 r4364: - added support for testing of chained SMB operations in smbtorture
- added test for chained OpenX/ReadX, simulating the OS/2 workplace shell

- fixed a bug in handling chained fnum in openx and ntcreatex in the server

(yes, I'm on holiday, but this bug was annoying me ....)
2007-10-10 13:07:38 -05:00
Andrew Bartlett
1933cd12fb r4358: At metze's request, the Christmas elves have removed gensec_end in
favor of talloc_free().

Andrew Bartlett
2007-10-10 13:07:37 -05:00
Andrew Bartlett
278bf1a61a r4355: More work from the elves on Christmas eve:
- Update Samba4's kerberos code to match the 'salting' changes in
   Samba3 (and many other cleanups by jra).

 - Move GENSEC into the modern era of talloc destructors.  This avoids
   many of the memory leaks in this code, as we now can't somehow
   'forget' to call the end routine.
  - This required fixing some of the talloc hierarchies.

 - The new krb5 seems more sensitive to getting the service name
   right, so start actually setting the service name on the krb5 context.

Andrew Bartlett
2007-10-10 13:07:37 -05:00
Andrew Tridgell
99b0dac229 r4284: fixed a problem with very large EA lists and OS/2 clients. These
checks on allocations need to go in a lot more places, but at least
this is a start.
2007-10-10 13:07:32 -05:00
Andrew Tridgell
25189b8fbf r4263: added support for the trans2 RAW_SEARCH_EA_LIST information
level. This is quite a strange level that we've never seen before, but
is used by the os2 workplace shell.

note w2k screws up this level when unicode is negotiated, so it only
passes the RAW-SEARCH test when you force non-unicode
2007-10-10 13:07:29 -05:00
Andrew Tridgell
0b76d405a7 r4261: added the RAW_FILEINFO_EA_LIST trans2 qfileinfo and qpathinfo
level. Interestingly, this level did now show up on our trans2 scanner
previously as we didn't have the FLAGS2_EXTENDED_ATTRIBUTES bit set in
the client code. Now that we set that bit, new levels appear in
windows servers.
2007-10-10 13:07:29 -05:00
Andrew Tridgell
b26828bef5 r4243: a sniff from kukks showed that the ea_set interface in trans2 setfileinfo allows
for multiple EAs to be set at once. This fixes all the ea code to allow for that.
2007-10-10 13:07:28 -05:00
Andrew Tridgell
bc0209058b r4232: added server support for multi-part SMBtrans requests, while
maintaining the async nature of the server. This is done with a
SMBtrans request queue for partially completed requests.

The smb signing issues with this get a little tricky, but it now seems
to work fine
2007-10-10 13:07:28 -05:00
Andrew Tridgell
c987125348 r4214: possibly fix the "no-EAs" bug from OS/2 2007-10-10 13:07:27 -05:00
Andrew Tridgell
7d981c29c2 r4182: fixed trans2 mkdir, allowing mkdir with an initial EA list 2007-10-10 13:07:23 -05:00
Andrew Tridgell
a56d95ad89 r4173: - new t2open code, that can cope with "create with EAs". Many thanks
to kukks on #samba-technical for the sniffs that allowed me to work
  this out

- much simpler ntvfs open generic mapping code

- added t2open create with EA torture test to RAW-OPEN test
2007-10-10 13:07:22 -05:00
Andrew Tridgell
13c7794e02 r4159: fixed error return for writebraw 2007-10-10 13:07:20 -05:00
Andrew Tridgell
c232e21218 r4146: an attempted fix for a OS/2 rename problem found by kukks - seems OS/2
is v senstive to SMB flags2 bits
2007-10-10 13:06:30 -05:00
Andrew Tridgell
71e0c7b2eb r4145: make sure we don't set the 32-bit error codes flag unless the client
can handle it, even for success packets (this bug was harmless, but
can be confusing in ethereal with old clients)
2007-10-10 13:06:30 -05:00
Andrew Tridgell
30c58b046d r4109: fixed an uninitialised socket write found by kukks 2007-10-10 13:06:27 -05:00
Andrew Tridgell
49c8df5648 r4101: ignore secondary session requests to cope with a OS/2 bug reported by
Guenter Kukkukk
2007-10-10 13:06:26 -05:00
Tim Potter
24d9f97bd6 r4099: Spelling fixes. 2007-10-10 13:06:26 -05:00
Andrew Tridgell
33e4cee17d r4095: smbsrv_terminate_connection() doesn't exit() in single processor mode, so after we
call it we need to return, and not continue processing packets
2007-10-10 13:06:25 -05:00
Stefan Metzmacher
6f3eb7bc03 r4079: implement the gensec_have_feature() correctly by asking
the backend what is actually in use

metze
2007-10-10 13:06:23 -05:00
Stefan Metzmacher
ab2c2f27e1 r4070: move some defines from asn_1.h to the places they belong to
metze
2007-10-10 13:06:22 -05:00
Andrew Tridgell
eef066175f r4069: better error code for SMBwriteBMPX 2007-10-10 13:06:22 -05:00
Andrew Tridgell
06e48d1276 r4068: added LANMAN2.1 to list of supported protocols (for OS/2) 2007-10-10 13:06: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
eec698254f r4055: fixed more places to use type safe allocation macros 2007-10-10 13:06:20 -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
Stefan Metzmacher
234166606d r3971: fix compiler warnings
metze
2007-10-10 13:06:09 -05:00
Andrew Tridgell
671a864d8f r3916: w2k3 does not check the max_setup count in nttrans requests 2007-10-10 13:06:05 -05:00
Andrew Tridgell
4468018cb6 r3836: - fixed the handling of NT_STATUS_BUFFER_TOO_SMALL in nttrans server
- fixed revision number on default DACL

- fixed DACL_PRESENT bit in acl query

with these fixes cacls.exe and the GUI ACL editor in w2k both work
against pvfs. The GUI editor is slow as it times out looking up the
SID -> name mappings.
2007-10-10 13:05:58 -05:00
Andrew Tridgell
f49c636e10 r3831: added nttrans server code for query/set security descriptor. This
means ACLs now can be set/fetched from the CIFS NTVFS backend.
2007-10-10 13:05:57 -05:00
Andrew Tridgell
f68a6b6b91 r3830: unified the query/set security descriptor code with the rest of the
queryfileinfo/setfileinfo logic, so querying/setting a security
descriptor is treated as just another file query/set operation.

This will allow NTVFS backends to see the query/set security
descriptor operations as RAW_FILEINFO_SEC_DESC and
RAW_SFILEINFO_SEC_DESC operations.
2007-10-10 13:05:57 -05:00
Andrew Tridgell
fcd0922407 r3826: - added testing of ea lists in NTTRANS CREATE
- fixed push/pull of chained ea lists

- fixed a bug in the nttrans wire encoding
2007-10-10 13:05:57 -05:00
Stefan Metzmacher
b620bdd672 r3810: create a LIB_SECURITY subsystem
- move dom_sid, security_descriptor, security_* funtions to one place
  and rename some of them

metze
2007-10-10 13:05:56 -05:00
Andrew Tridgell
8379ad14e3 r3806: added support to smb_server and pvfs for the NTTRANS Create call. This
call has an optional sec_desc and ea_list.
2007-10-10 13:05:56 -05:00
Volker Lendecke
614dbd8fec r3756: Fix netbios session request reply. The buffer should not be a stack-based
variable that is overwritten later.

Samba3 smbclient still does not like Samba4. In ntlmssp samba3 smbclient
expects an mechlistmic that 4 does not send.

Volker
2007-10-10 13:05:51 -05:00
Jelmer Vernooij
64826da834 r3733: More build system fixes/features:
- Use .mk files directly (no need for a SMB_*_MK() macro when adding a new SUBSYSTEM, MODULE or BINARY). This allows addition of new modules and subsystems without running configure
 - Add support for generating .dot files with the Samba4 dependency tree (as used by the graphviz and springgraph utilities)
2007-10-10 13:05:47 -05:00
Andrew Tridgell
a20cbca788 r3720: fixed the pulling of zero length ucs2 strings in smbd. I found this
bug using ifstest.exe, which is a IFS (Installable File System) test
suite. With this fix I was pleasantly surprised to find that Samba4
passes many (maybe even most?) of the tests in ifstest.
2007-10-10 13:05:46 -05:00
Andrew Tridgell
b8ba6793c1 r3593: fixed the trans2 t2open reply to initialise all bytes (bug found by valgrind) 2007-10-10 13:05:36 -05:00
Andrew Tridgell
07596d8721 r3591: to get a bit more useful info from valgrind I'm disabling the
deliberate over-allocation of request structures in smbd and
libcli/raw code for now.
2007-10-10 13:05:36 -05:00
Andrew Tridgell
ed844192d7 r3573: added trans2open support to smbd and pvfs, and fine-tuned the open->generic ntvfs mapping code. 2007-10-10 13:05:33 -05:00
Andrew Tridgell
eded2ad9c9 r3539: much nicer async open delay code.
The previous code didn't handle the case where the file got renamed or
deleted while waiting for the sharing violation delay. To handle this
we need to make the 2nd open a full open call, including the name
resolve call etc. Luckily this simplifies the logic.

I also expanded the RAW-MUX test to include the case where we do
open/open/open/close/close, with the 3rd open async, and that open
gets retried after both the first close and the 2nd close, with the
first retry failing and the 2nd retry working. The tests the "async
reply after a async reply" logic in pvfs_open().
2007-10-10 13:05:29 -05:00
Andrew Tridgell
1d2f0a55c1 r3531: add support for RAW_OPEN_MKNEW, RAW_OPEN_CREATE and RAW_OPEN_CTEMP in pvfs 2007-10-10 13:05:29 -05:00
Andrew Tridgell
201ff734d4 r3529: fixed signing support for SMBntcancel requests (no reply means seq
number rises by 1, not 2)
2007-10-10 13:05:29 -05:00
Andrew Tridgell
3423e2f414 r3528: added support for the SMBntcancel() operation, which cancels any
outstanding async operation (triggering an immediate timeout).

pvfs now passes the RAW-MUX test
2007-10-10 13:05:28 -05:00
Andrew Tridgell
0dc1deabd0 r3518: fixed some includes to be consistent.
- use #include <XXX.h> for operating system includes
 - use includes relative to include/ for things like system/wait.h

also fixed the thread backend to work somewhat. To fix it properly we need to do this:

 - add a configure test for support for thread local storage (the __thread keyword)
 - refuse to do pthreads if tls doesn't work
 - refuse to do pthreads if seteuid() affects process instead of thread
 - defined THREAD_LOCAL as __thread when WITH_PTHREADS
 - add THREAD_LOCAL to all the global data structures that should be
   thread local (there are quite a few)

right now the thread backend falls over when you hit it with several
connections at once, due to the lack of __thread on some critical
structures.
2007-10-10 13:05:27 -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
8fa456afc9 r3500: cleaned up the AS_USER/AS_GUEST stuff in the core smb packet processing 2007-10-10 13:05:22 -05:00
Andrew Tridgell
4aed1b7921 r3493: fixed a bug in readx reply where the client specifies an invalid high
part of the maxcnt. This caused an allocation failure and server exit.

Note: we need to go back over all the places in the core smb_server
that can cause allocation failures based on user input and fix them to
instead produce a SMB error.

Thanks to Susan for finding this bug.
2007-10-10 13:05:21 -05:00
Andrew Tridgell
c6f4865744 r3481: split out client.h and events.h 2007-10-10 13:05:20 -05:00
Andrew Tridgell
7c4e6ebf05 r3466: split out request.h, signing.h, and smb_server.h 2007-10-10 13:05:17 -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