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

87 Commits

Author SHA1 Message Date
Andrew Bartlett
9a9dcc7250 r2552: Character set conversion and string handling updates.
The intial motivation for this commit was to merge in some of the
bugfixes present in Samba3's chrcnv and string handling code into
Samba4.  However, along the way I found a lot of unused functions, and
decided to do a bit more...

The strlen_m code now does not use a fixed buffer, but more work is
needed to finish off other functions in str_util.c.  These fixed
length buffers hav caused very nasty, hard to chase down bugs at some
sites.

The strupper_m() function has a strupper_talloc() to replace it (we
need to go around and fix more uses, but it's a start).  Use of these
new functions will avoid bugs where the upper or lowercase version of
a string is a different length.

I have removed the push_*_allocate functions, which are replaced by
calls to push_*_talloc.  Likewise, pstring and other 'fixed length'
wrappers are removed, where possible.

I have removed the first ('base pointer') argument, used by push_ucs2,
as the Samba4 way of doing things ensures that this is always on an
even boundary anyway.  (It was used in only one place, in any case).
(This used to be commit dfecb01506)
2007-10-10 12:59:05 -05:00
Andrew Tridgell
d3fc90eaa1 r2524: a simple pvfs rename implementation to make testing easier
(This used to be commit 98c1c75076)
2007-10-10 12:59:02 -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
dd7862cb6a r2503: the RAW-SEARCH test now mostly passes against the posix backend
(This used to be commit 9710f24b1f)
2007-10-10 12:58:59 -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
Stefan Metzmacher
7d06a06584 r2447: let the server code use the new lib/socket/ stuff
metze
(This used to be commit 2fd577d241)
2007-10-10 12:58:54 -05:00
Andrew Tridgell
635f5fa942 r2438: compile on systems without O_DIRECTORY (probably won't work, but I'll get to that later)
(This used to be commit 5e2027f8ec)
2007-10-10 12:58:53 -05:00
Andrew Tridgell
8a1c3ddd94 r2436: the second big lump of posix vfs code.
this is still just a skeleton, and many of the functions are just
based on the simple vfs backend, they are there to allow me to run
smbtorture tests against the real parts of the posix backend.
(This used to be commit f2fa7fe565)
2007-10-10 12:58:52 -05:00
Andrew Tridgell
677d1bc487 r2434: separate "attrib" and "ex_attrib" elements for DOS attributes is pointless
(This used to be commit 5fcad57128)
2007-10-10 12:58:52 -05:00
Andrew Tridgell
03cb4367d6 r2404: the first large lump of posix vfs stuff.
this is still very much a skeleton (with many limbs missing too!). I
am committing this early to get some feedback on the approach taken.
(This used to be commit 40d5cae5eb)
2007-10-10 12:58:48 -05:00
Andrew Tridgell
046380c56c r2403: got rid of a unnecessary mem_ctx in the simple backend
(This used to be commit a4dcf005f3)
2007-10-10 12:58:48 -05:00
Stefan Metzmacher
360f125f25 r2326: remove definition and usage of struct socket_context
metze
(This used to be commit 1854907da8)
2007-10-10 12:58:44 -05:00
Stefan Metzmacher
59b0902d08 r2319: let event_merge_contexts() return a pointer to the final context
metze
(This used to be commit 71aa5eeea7)
2007-10-10 12:58:43 -05:00
Andrew Tridgell
0e6799177c r2252: don't register the same name twice
(This used to be commit fdb675bbad)
2007-10-10 12:58:35 -05:00
Andrew Tridgell
2cbbbe3535 r2251: forgot to add vfs_posix.h in my last commit
note that this is just a skeleton so far. More to come soon.
(This used to be commit efc8850b9a)
2007-10-10 12:58:35 -05:00
Andrew Tridgell
893c62d383 r2249: got rid of some more mem_ctx elements in structures
(This used to be commit 21ef338cbb)
2007-10-10 12:58:34 -05:00
Tim Potter
8293df91bc r2247: talloc_destroy -> talloc_free
(This used to be commit 6c1a72c5d6)
2007-10-10 12:58:34 -05:00
Andrew Bartlett
5e869b4eab r2055: Add PRINTF_ATTRIBUTE to many more parts of the code, and a new
--enable-developer warning for when they are missing.

Andrew Bartlett
(This used to be commit 8115e44d47)
2007-10-10 12:58:21 -05:00
Andrew Tridgell
53415ebf8a r2030: quick hack to allow the simple NTVFS backend to handler base directories with mixed case names
(This used to be commit efecc3306e)
2007-10-10 12:58:18 -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
Stefan Metzmacher
ad5acba254 r1916: return a more clear error, we are miss configure in this case
metze
(This used to be commit a908f831cb)
2007-10-10 12:58:11 -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
5ddf678e01 r1578: the first stage of the async client rewrite.
Up to now the client code has had an async API, and operated
asynchronously at the packet level, but was not truly async in that it
assumed that it could always write to the socket and when a partial
packet came in that it could block waiting for the rest of the packet.

This change makes the SMB client library full async, by adding a
separate outgoing packet queue, using non-blocking socket IO and
having a input buffer that can fill asynchonously until the full
packet has arrived.

The main complexity was in dealing with the events structure when
using the CIFS proxy backend. In that case the same events structure
needs to be used in both the client library and the main smbd server,
so that when the client library is waiting for a reply that the main
server keeps processing packets. This required some changes in the
events library code.

Next step is to make the generated rpc client code use these new
capabilities.
(This used to be commit 96bf4da3ed)
2007-10-10 12:57:42 -05:00
Stefan Metzmacher
5779a7da9a 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
(This used to be commit f276378157)
2007-10-10 12:57:36 -05:00
Stefan Metzmacher
45a85bdd35 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
(This used to be commit bbe5e00715)
2007-10-10 12:57:35 -05:00
Volker Lendecke
3a6f761eb0 r1470: Get the smb_trans2 structure out of the rap_cli_call struct.
Initial attempt at RAP server infrastructure. Look at rap_server.c for the
dummy functions that are supposed to implement the core functionality.

ipc_rap.c contains all the data shuffling. _rap_shareenum and _rap_serverenum2
in ipc_rap.c are (I think) regular enough to be auto-generated.

I did not test all the corner cases yet, but nevertheless I would like some
comments on the general style.

Volker

P.S: samba-3 smbclient now doesn't freak out anymore, although the results are
not entirely correct :-)
(This used to be commit 08140cc1a8)
2007-10-10 12:57:33 -05:00
Andrew Bartlett
d9f4a8328e r1355: Add const (I missed this when I changed the function prototype earlier)
Andrew Bartlett
(This used to be commit dbe484a0c2)
2007-10-10 12:56:52 -05:00
Andrew Bartlett
dc9f55dbec r1294: A nice, large, commit...
This implements gensec for Samba's server side, and brings gensec up
to the standards of a full subsystem.

This means that use of the subsystem is by gensec_* functions, not
function pointers in structures (this is internal).  This causes
changes in all the existing gensec users.

Our RPC server no longer contains it's own generalised security
scheme, and now calls gensec directly.

Gensec has also taken over the role of auth/auth_ntlmssp.c

An important part of gensec, is the output of the 'session_info'
struct.  This is now reference counted, so that we can correctly free
it when a pipe is closed, no matter if it was inherited, or created by
per-pipe authentication.

The schannel code is reworked, to be in the same file for client and
server.

ntlm_auth is reworked to use gensec.

The major problem with this code is the way it relies on subsystem
auto-initialisation.  The primary reason for this commit now.is to
allow these problems to be looked at, and fixed.

There are problems with the new code:
- I've tested it with smbtorture, but currently don't have VMware and
  valgrind working (this I'll fix soon).
- The SPNEGO code is client-only at this point.
- We still do not do kerberos.

Andrew Bartlett
(This used to be commit 07fd885fd4)
2007-10-10 12:56:49 -05:00
Stefan Metzmacher
118f3edd27 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
(This used to be commit 60f823f201)
2007-10-10 12:56:49 -05:00
Stefan Metzmacher
b87fa55bdc r1286: rename struct tcon_context to smbsrv_tcon
metze
(This used to be commit a6c0ca9de5)
2007-10-10 12:56:49 -05:00
Stefan Metzmacher
8bf537d119 r1280: rename struct request_context to smbsrv_request
metze
(This used to be commit a85d2db582)
2007-10-10 12:56:48 -05:00
Stefan Metzmacher
4ddb2d347d r1279: rename struct tcon_context to smbsrv_tcon
metze
(This used to be commit 99473fab4b)
2007-10-10 12:56:48 -05:00
Stefan Metzmacher
d4ae6ae74d r1277: rename struct server_context to smbsrv_ontext
because I need server_context fot the generic server infastructure

metze
(This used to be commit 0712f9f307)
2007-10-10 12:56:48 -05:00
Tim Potter
37fcf22364 r1268: varient -> variant
(This used to be commit de5984c956)
2007-10-10 12:56:46 -05:00
Andrew Tridgell
b00103dac1 r1165: fixed handling of SMBtrans replies that should return STATUS_BUFFER_OVERFLOW when more data is present.
(This used to be commit 0e557fe857)
2007-10-10 12:56:42 -05:00
Andrew Bartlett
b1268fc445 r1123: Make all lp_ string functions return 'const char *'.
Fix other 'const' warnings in the torture code.

Andrew Bartlett
(This used to be commit 5d39d7497f)
2007-10-10 12:56:38 -05:00
Stefan Metzmacher
b717b40235 r1078: the dxesrv_crypto_* implementations should now explicit set
the dce_conn->auth_state.session_info
( the ntlmssp one works fine, but the schannel one isn't implemented yet)

this is also set by the ntvfs_ipc backend on the endpoint connect.

metze
(This used to be commit ad3dd1789e)
2007-10-10 12:56:37 -05:00
Andrew Bartlett
0d466258be r1019: Push the auth subsystem away from using typedef, and over to the 'all
goodness and light' struct ;-)

Break apart the auth subsystem's return strucutres, into the parts
that a netlogon call cares about, and the parts that are for a local
session.  This is the 'struct session_info' and it will almost
completly replace the current information stored on a vuid, but be
generic to all login methods (RPC over TCP, for example).

Andrew Bartlett
(This used to be commit d199697014)
2007-10-10 12:56:28 -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
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
Stefan Metzmacher
b744493be5 r862: remove acl and sendfile stuff
it will be readded inside the ntvfs_posix module

metze
(This used to be commit ec624aefa8)
2007-10-10 12:56:13 -05:00
Stefan Metzmacher
cfc2f3c5ab r766: convert ntvfs/* to a config.mk file
metze
(This used to be commit 62d456c144)
2007-10-10 12:53:49 -05:00
Stefan Metzmacher
b340a61cb9 r755: - disallow process_model _thread when we don't have pwread/pwrite
and have to use the nonthreadsafe wrapper
- add pread/pwrite wrapper to ntvfs_simple
- fix const warning in ntvfs_simple

metze
(This used to be commit f0b2e42978)
2007-10-10 12:53:48 -05:00
Stefan Metzmacher
f236700ef6 r665: merge over the new build system from my tmp branch
to the main SAMBA_4_0 tree.

NOTE: that it's not completely ready, but it's functional:-)

metze
(This used to be commit c78a2ddb28)
2007-10-10 12:53:36 -05:00
Andrew Tridgell
0f581e4af9 r623: setUserInfo level 24 (password set) now works in the SAMR server. This includes all
of the password complexity, password history and other password restrictions.
(This used to be commit cb070b9084)
2007-10-10 12:51:55 -05:00
Stefan Metzmacher
8aa6f931d6 r313: add the warning about fileaccess as user 'root'
to a README file and DEBUG(0,()) it on each tree connect

metze
(This used to be commit d52eb75107)
2007-10-10 12:51:20 -05:00
Stefan Metzmacher
ee0588bb6f r312: let ntvfs posix backend return NT_STATUS_ACCESS_DENIED in the connect hook
and print out an error message to the debug log which say:
use 'cifs' or 'simple' as ntvfs handler
this also warns about 'root' fileaccess in the 'simple' module

the 'default' ntvfs handler is now registered by the posix backend

metze
(This used to be commit 84b3589daa)
2007-10-10 12:51:20 -05:00