1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

27 Commits

Author SHA1 Message Date
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
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
Stefan Metzmacher
3ff03b5cb2 r2751: this is a new ntvfs design which tries to solve:
- the stacking of modules
- finding the modules private data
- hide the ntvfs details from the calling layer
- I set NTVFS_INTERFACE_VERSION 0 till we are closer to release
  (because we need to solve some async problems with the module stacking)

metze
2007-10-10 12:59:30 -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
3f7741f178 r2618: before we had refererence counts in talloc I added a hack in the
server side request structure to prevent a structing being freed in
some circumstances. This change replaces this with the much more
robust mechanism of talloc_increase_ref_count().
2007-10-10 12:59:12 -05:00
Andrew Bartlett
cd2f97530b r2541: Add a TODO: This is one place we can grab the remote netbios name.
Andrew Bartlett
2007-10-10 12:59:04 -05:00
Andrew Tridgell
71480271ad 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
2007-10-10 12:58:56 -05:00
Andrew Tridgell
9a708e2281 r2460: fixed the spnego code that I recently broke 2007-10-10 12:58:55 -05:00
Andrew Tridgell
93d444e6fd r2455: don't use the uninitialised sess structure when auth fails 2007-10-10 12:58:54 -05:00
Andrew Tridgell
21ef338cbb r2249: got rid of some more mem_ctx elements in structures 2007-10-10 12:58:34 -05:00
Andrew Bartlett
66c54fe7eb r1727: SPNEGO session setup replies need to include the blob, even on error
cases, so don't shorten them back to 0 byte data length.

Andrew Bartlett
2007-10-10 12:57:50 -05:00
Stefan Metzmacher
f276378157 r1499: combine struct user_struct and struct smbsrv_user
to a struct smbsrv_session that the same as cli_session for the client

we need a gensec_security pointer there
(spnego support will follow)

prefix some related functions with smbsrv_

metze
2007-10-10 12:57:36 -05:00
Stefan Metzmacher
bbe5e00715 r1486: commit the start of the generic server infastructure
the idea is to have services as modules (smb, dcerpc, swat, ...)

the process_model don't know about the service it self anymore.

TODO:
- the smbsrv should use the smbsrv_send function
- the service subsystem init should be done like for other modules
- we need to have a generic socket subsystem, which handle stream, datagram,
  and virtuell other sockets( e.g. for the ntvfs_ipc module to connect to the dcerpc server
  , or for smb or dcerpc or whatever to connect to a server wide auth service)
- and other fixes...

NOTE: process model pthread seems to be broken( but also before this patch!)

metze
2007-10-10 12:57:35 -05:00
Stefan Metzmacher
2758c26ac9 r1479: print out domain too 2007-10-10 12:57:34 -05:00
Stefan Metzmacher
60f823f201 r1291: rename struct smbsrv_context to smbsrv_connection
because this is the connection state per transport layer (tcp)
connection

I also moved the substructs directly into smbsrv_connection,
because they don't need a struct name and we should allway pass the complete
smbsrv_connection struct into functions

metze
2007-10-10 12:56:49 -05:00
Stefan Metzmacher
a85d2db582 r1280: rename struct request_context to smbsrv_request
metze
2007-10-10 12:56:48 -05:00
Stefan Metzmacher
99473fab4b r1279: rename struct tcon_context to smbsrv_tcon
metze
2007-10-10 12:56:48 -05:00
Stefan Metzmacher
0712f9f307 r1277: rename struct server_context to smbsrv_ontext
because I need server_context fot the generic server infastructure

metze
2007-10-10 12:56:48 -05:00
Tim Potter
de5984c956 r1268: varient -> variant 2007-10-10 12:56:46 -05:00
Stefan Metzmacher
2986c5f08c r890: convert samba4 to use [u]int8_t instead of [u]int8
metze
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
af6f1f8a01 r889: convert samba4 to use [u]int16_t instead of [u]int16
metze
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
0e5517d937 r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
2007-10-10 12:56:15 -05:00
Andrew Tridgell
9a9244a1c6 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.
2007-10-10 12:56:14 -05:00
Andrew Tridgell
8e5ddf5e8e r818: added server side SMB signing to Samba4 2007-10-10 12:53:52 -05:00
Andrew Tridgell
af34710d4d 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.
2007-10-10 12:51:11 -05:00
Andrew Tridgell
ad42c8432b readx reply packets can be over-sized -
Stefan Metzmacher
956d212c83 - move all SMB server stuff to smb_server/*
and create the SMB server subsystem

- remove unused XML and MYSQL configure tests

metze
-