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

49 Commits

Author SHA1 Message Date
Jelmer Vernooij
3adffa0217 r128: Another registry update. Changes:
- Start with the LDB backend
- The API is now more windows-like, which should make it easier to use
  in rpc_server
- Added a GTK+ front-end
- Added some more IDL

More updates will follow, especially in the RPC field..
2007-10-10 12:51:09 -05:00
Stefan Metzmacher
975bf13f17 r127: NetWkstaGetInfo level 101
and return WERR_ACCESS_DENIED for level 102, 502 so does my winXP box
for a non-admin user

metze
2007-10-10 12:51:09 -05:00
Stefan Metzmacher
6f213a3494 r126: - add first srvsvc and wkssvc server side stuff
- we know can browse the server via the Windows Explorer

- some little fixes to the winreg server pipe

metze
2007-10-10 12:51:09 -05:00
Andrew Tridgell
af0c21c1e1 r67: added a destroy hook in the policy handle -> wire handle code to allow backends
to cleanup handle data
2007-10-10 12:50:41 -05:00
Jelmer Vernooij
1396db8537 r62: Fix the build 2007-10-10 12:50:41 -05:00
Jelmer Vernooij
ae2b63b6f1 r61: - Implement first call in the winreg rpc server
- Add some initial implementation of the ldb backend
- More checks in the winreg torture test
2007-10-10 12:50:41 -05:00
Gerald Carter
11717ae912 r42: importing .cvsignore files 2007-10-10 12:50:40 -05:00
Jelmer Vernooij
98224f5436 r31: More registry updates. regdiff/regpatch work now. 2007-10-10 12:50:40 -05:00
Jelmer Vernooij
7cab3a00d7 r20: Add the registry library. Still needs a lot of work,
see source/lib/registry/TODO for details.
2007-10-10 12:50:33 -05:00
Gerald (Jerry) Carter
6e50109b66 [GLUE] Sync tree with SVN r17. 2007-10-10 12:39:20 -05:00
Stefan Metzmacher
40abf3c584 - add 'print' to the DCERPC binding strings
e.g.
  ncacn_np:myserver:[samr,sign,print]

  will now enable the packet debugging

  and the debugging is not bound anymore to the debuglevel >= 2
  in the torture tests

- also the dcesrv_remote module now supports debugging of the packets
  use the 'dcerpc_remote:binding' smb.conf parameter.

metze
0001-01-01 00:00:00 +00:00
Stefan Metzmacher
a2beaa0823 const fixes
metze
0001-01-01 00:00:00 +00:00
Stefan Metzmacher
2e57ee884e - we now specify the object files in the subsystems config.m4 file
I plan to convert all objectfile group to use SMB_SUBSYSTEM
  later I'll add a SMB_BINARY() and SMB_LIBRARY(), then there will be no more need
  to touch Makefile.in, because all make rules will be autogenerated by configure

- convert the PROCESS_MODEL subsystem to this new scheme
  and move the pthread test to smbd/process_model.m4

- convert the CHARSET subsystem to this new scheme
  and move the iconv test to lib/iconv.m4
0001-01-01 00:00:00 +00:00
Stefan Metzmacher
5ac4f87868 some DEBUG and comment fixes
metze
0001-01-01 00:00:00 +00:00
Stefan Metzmacher
904ce91ed9 Makefile.in cleanups:
lib/util_smbd.c is not used anymore

reorder the SMB_MODULE() parameters the goal is to autogenerate the
make rules for shared modules:

dnl SMB_MODULE(1:name,2:subsystem,3:default_build,
		4:object_files,5:shared_object,6:libs
		7:whatif-static,8:whatif-shared,9:whatif-not)

and generate <SUBSYSTEM>_LIBS and MODULE_<name>_LIBS with the SMB_MODULE() macro

metze
0001-01-01 00:00:00 +00:00
Stefan Metzmacher
92a3eb83d4 - remove all STFS related stuff
(which were already removed in revision 1.37 and
   readded by mistake in revision 1.39)

- change the SMB_MODULE() macro a bit
  Now we have:

dnl Specify the default build method of this module
dnl SMB_MODULE_DEFAULT(name,default_build)
AC_DEFUN(SMB_MODULE_DEFAULT,...

dnl Mark specified module as shared
dnl SMB_MODULE(name,default_build,static_files,shared_files,subsystem,whatif-static,whatif-shared,whatif-not)

  this let us specify the default build method inside of the included config.m4
  files

metze
0001-01-01 00:00:00 +00:00
Andrew Tridgell
e7c53ad185 dcerpc server output now copes with the client blocking part way
through a read. This happens to also avoid a memcpy on output for
dcerpc over tcp.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
9aab321fb6 avoid a copy of the data being input to the dcerpc server in the most
common case of there being no pending partial data and a full dcerpc
packet being received.

We should use this same model for the smb server. It gives us
efficient memory usage while allowing for completely async socket
operations.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
6ac547fa5f fixed the rpc epmapper server. This fixes rpc over tcp. 0001-01-01 00:00:00 +00:00
Stefan Metzmacher
917e45dafd This patch adds a better dcerpc server infastructure.
1.) We now register endpoint servers add startup via register_backend()
    and later use the smb.conf 'dcerpc endpoint servers' parameter to setup the dcesrv_context

2.) each endpoint server can register at context creation time as much interfaces as it wants
    (multiple interfaces on one endpoint are supported!)
    (NOTE:  there's a difference between 'endpoint server' and 'endpoint'!
	    for details look at rpc_server/dcesrv_server.h)

3.) one endpoint can have a security descriptor registered to it self
    this will be checked in the future when a client wants to connect
    to an smb pipe endpoint.

4.) we now have a 'remote' endpoint server, which works like the ntvfs_cifs module
    it takes this options in the [globals] section:

    dcerpc remote:interfaces = srvsvc, winreg, w32time, epmapper
    dcerpc remote:binding = ...
    dcerpc remote:user = ...
    dcerpc remote:password = ...

5.) we currently have tree endpoint servers: epmapper, rpcecho and remote

    the default for the 'dcerpc endpiont servers = epmapper, rpcecho'

    for testing you can also do
    dcerpc endpoint servers = rpcecho, remote, epmapper
    dcerpc remote:interfaces = srvsvc, samr, netlogon

6,) please notice the the epmapper now only returns NO_ENTRIES
    (but I think we'll find a solution for this too:-)

7.) also there're some other stuff left, but step by step :-)

This patch also includes updates for the
register_subsystem() , ntvfs_init(), and some other funtions
to check for duplicate subsystem registration


metze

(hmmm, my first large commit...I hope it works as supposed :-)
0001-01-01 00:00:00 +00:00
Andrew Tridgell
f740b02ac3 added a bunch of alias functions in samr.idl based on work by Kai. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
44df662960 added a smb.conf flag "rpc big endian" that tells our rpc server to
send packets in bigendian format.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
9b1c76a8e9 it turns out that a wire policy handle isn't a blob either, its a
uint32 followed by a GUID. I needed to fix this to support running in
mixed-mode rpc (where smbtorture is bigendian and w2k3 is
little-endian). Otherwise when you send back a policy handle the
server doesn't recognise it.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
bb1af644a5 a fairly large commit!
This adds support for bigendian rpc in the client. I have installed
SUN pcnetlink locally and am using it to test the samba4 rpc
code. This allows us to easily find places where we have stuffed up
the types (such as 2 uint16 versus a uint32), as testing both
big-endian and little-endian easily shows which is correct. I have now
used this to fix several bugs like that in the samba4 IDL.

In order to make this work I also had to redefine a GUID as a true
structure, not a blob. From the pcnetlink wire it is clear that it is
indeed defined as a structure (the byte order changes). This required
changing lots of Samba code to use a GUID as a structure.

I also had to fix the if_version code in dcerpc syntax IDs, as it
turns out they are a single uint32 not two uint16s.

The big-endian support is a bit ugly at the moment, and breaks the
layering in some places. More work is needed, especially on the server
side.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
f21d6351d0 zero length echo is not an error 0001-01-01 00:00:00 +00:00
Andrew Tridgell
39a7c660f4 fixed the transfer syntax in the dcerpc bind reply 0001-01-01 00:00:00 +00:00
Andrew Tridgell
bd3dcfe582 added auto-generation of the server side boilerplate code for each
pipe.

The server side code gets generated as librpc/gen_ndr/ndr_NAME_s.c and
gets included in the pipe module
0001-01-01 00:00:00 +00:00
Andrew Tridgell
f5df126c25 fixed fragmented signed connections to our rpc server over SMB 0001-01-01 00:00:00 +00:00
Andrew Tridgell
6ee0935afe ntlmssp over rpc over tcp now fully works
I needed to hack the ntlmssp code a little, as the auth code in samba4
is out of date relative to the samba3 auth code. I need to do a merge :)
0001-01-01 00:00:00 +00:00
Andrew Tridgell
2045855601 fixed some memory leaks in the rpc server code 0001-01-01 00:00:00 +00:00
Andrew Tridgell
74041b6a0a fixed a bug handling multiple PDUs being read from a socket at one
time in the rpc server.

started on the framework for the dcerpc authentication server code
0001-01-01 00:00:00 +00:00
Andrew Tridgell
593bc29bbe completed the linkage between the endpoint mapper and the dcerpc
server endpoints. We can now successfully setup listening endpoints on
high ports, then use our endpoint mapper redirect incoming clients to
the right port.

also greatly cleanup the rpc over tcp session handling.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
4f46606af8 make the IO in the dcerpc over TCP server completely async, handling
partial packets on both input and output
0001-01-01 00:00:00 +00:00
Andrew Tridgell
9fb0f03693 dcerpc over tcp in the samba4 server now works to some extent. It
needs quite a bit more work to get it finished. The biggest missing
feature is the lack of NTLMSSP which is needed for basic
authentication over tcp
0001-01-01 00:00:00 +00:00
Andrew Tridgell
097e7ca99d rpcdump.exe now works fine against a Samba4 server
for some reason the epm_Lookup replies can't be parsed by ethereal,
although w2k parses then fine as does the Samba4 NDR code.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
fbdcf9ef54 added the epm_Map() call.
the RPC-EPMAPPER torture test now passes
0001-01-01 00:00:00 +00:00
Andrew Tridgell
3f85f9b782 added a basic dcerpc endpoint mapper to Samba4. Currently only
implements the epm_Lookup() call, I'll add the other important calls
soon. I was rather pleased to find that epm_Lookup() worked first
time, which is particularly surprising given its complexity.

This required quite a bit of new infrastructure:

  * a generic way of handling dcerpc policy handles in the rpc server

  * added type checked varients of talloc. These are much less error
    prone. I'd like to move to using these for nearly all uses of
    talloc.

  * added more dcerpc fault handling code, and translation from
    NTSTATUS to a dcerpc fault code

  * added data_blob_talloc_zero() for allocating an initially zero
    blob

  * added a endpoint enumeration hook in the dcerpc endpoint server
    operations
0001-01-01 00:00:00 +00:00
Andrew Tridgell
30a996b682 after chatting with jeremy I decided to use a separate directory for
each rpc endpoint implementation, so we will have rpc_server/samr/
rpc_server/lsa/ etc.

this should encourage each pipe to be written in a more complete
manner, as it gives easy ways to split the pipe into multiple modules.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
6e7c50bcd9 added support for sending bind_nak replies in the rpc server 0001-01-01 00:00:00 +00:00
Andrew Tridgell
8ad47eff49 added the echo pipe test calls 0001-01-01 00:00:00 +00:00
Andrew Tridgell
4dac951718 we now support pdu fragmentation on both input and output in the rpc
server code
0001-01-01 00:00:00 +00:00
Andrew Tridgell
14005c95d7 added handling of fragmented requests in the rpc server
now we just need to handle fragmented replies ....
0001-01-01 00:00:00 +00:00
Andrew Tridgell
28fa62d63d handle the auto-allocation of [ref] output arrays in pidl. This
can simplify rpc servers a lot.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
46e0a35819 * the RPC-ECHO pipe now works in smbd, as long as the data sizes
don't cause fragmented pdus (I'll add fragments shortly)

 * change data_blob_talloc() to not zero memory when the 2nd argument
   is NULL. The zeroing just masks bugs, and can't even allow a DOS
   attack

 * modified pidl to ensure that [ref] arguments to the out side of
   functions are allocated when parsing the in side. This allows rpc
   backends to assume that [ref] variables are all setup. Doesn't work
   correctly for [ref] arrays yet

 * changed DLIST_ADD_END() to take the type instead of a tmp
   variable. This means you don't need to declare a silly tmp variable in
   the caller
0001-01-01 00:00:00 +00:00
Andrew Tridgell
4929c53bc8 the next step in the dcerpc server code. Added the link between the
IPC IO routines and the dcerpc endpoint servers.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
3706af7a6c initial rpc server side infrastructure 0001-01-01 00:00:00 +00:00
Andrew Tridgell
91aed7c6a6 removed some obsolete .cvsignore files 0001-01-01 00:00:00 +00:00
Andrew Tridgell
874bf4689d removed a bunch of the old rpc code in preparation for replacing it all with auto-generated code 0001-01-01 00:00:00 +00:00
Andrew Tridgell
b0510b5428 first public release of samba4 code 0001-01-01 00:00:00 +00:00