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

2167 Commits

Author SHA1 Message Date
Andrew Bartlett
5b04ca8080 r1025: Rename (across the samr and netlogon pipes, so far)
pwd -> password
passwd -> password

username -> account_name

Also work on consistant structure feild names between these two pipes,
and fix up some callers to use samr_Password for the netlogon
credential code.

Andrew Bartlett
(This used to be commit 4e35418c27)
2007-10-10 12:56:30 -05:00
Stefan Metzmacher
a851ab6fdb r1022: add the session_info() call to the dcerpc server auth backends
metze
(This used to be commit d1ab26b907)
2007-10-10 12:56:28 -05:00
Andrew Tridgell
1a993b800e r1016: - store the schannel session key after it is established
- move to a centralised way of handling talloc/ldb interaction
(This used to be commit 2b9b752875)
2007-10-10 12:56:27 -05:00
Andrew Tridgell
cd35e12c7f r1015: commit the schannel session key handling code now, so abartlet and
metze can have a look. Not tested yet, as I'm still writing the server
side schannel code.
(This used to be commit 768cc0193a)
2007-10-10 12:56:27 -05:00
Stefan Metzmacher
0413849c3b r1013: WE NEED ALWAYS TO INIT THE OUTPUT VARS!
in rpc server code!

add missing ZERO_STRUCT(r->out.info);
in samr_GetDomPwInfo

metze
(This used to be commit e21f8a3430)
2007-10-10 12:56:26 -05:00
Stefan Metzmacher
2d6207add7 r1010: make the dcesrv_crypto code a bit more generic...
fix type 'cyrpto' -> 'crypto'

metze
(This used to be commit 90f4777dfc)
2007-10-10 12:56:26 -05:00
Andrew Bartlett
9eb6afb00d r1009: Make all users of NT and LM passwords use the samr_Password structure.
This includes the netlogon pipe, for the machine account password
change system.

Andrew Bartlett
(This used to be commit 49d545a820)
2007-10-10 12:56:26 -05:00
Stefan Metzmacher
5165fec02e r1004: continue tridge's work on dcerpc server auth/crypto code
I made it much more generic, and we should be able to add a
module interface to this code, so that other DCERPC_AUTH types can be added
via modules...

metze
(This used to be commit d09abeb686)
2007-10-10 12:56:25 -05:00
Stefan Metzmacher
8f84a98e29 r1001: in samba4 we don't(shouldn't) use typedef's anymore...
metze
(This used to be commit ac5f6f7e51)
2007-10-10 12:56:25 -05:00
Andrew Tridgell
8087d844ef r995: - renamed many of our crypto routines to use the industry standard
names rather than our crazy naming scheme. So DES is now called
  des_crypt() rather than smbhash()

- added the code from the solution of the ADS crypto challenge that
  allows Samba to correctly handle a 128 bit session key in all of the
  netr_ServerAuthenticateX() varients. A huge thanks to Luke Howard
  from PADL for solving this one!

- restructured the server side rpc authentication to allow for other
  than NTLMSSP sign and seal. This commit just adds the structure, the
  next commit will add schannel server side support.

- added 128 bit session key support to our client side code, and
  testing against w2k3 with smbtorture. Works well.
(This used to be commit 729b2f41c9)
2007-10-10 12:56:25 -05:00
Andrew Tridgell
6611f01050 r951: from w2k3 behaviour, the netlogon server is supposed to give back the negotiate flags it can support.
(This used to be commit 7ad56fc4db)
2007-10-10 12:56:21 -05:00
Andrew Tridgell
6a0ce94d02 r950: - added netr_ServerAuthenticate3(). This is used by WinXP clients who try to login to Samba4, as
WinXP sees us as an ADS server.

Unfortunately WinXP also uses a set of negotiate_flags that we don't
support yet. Some crypto work needed.
(This used to be commit 2d740b6570)
2007-10-10 12:56:21 -05:00
Andrew Tridgell
d9538e7412 r937: - added a simple QuerySecurity implementation in samr server
- moved some sec desc defines into misc.idl

 - fixed pw_len field in UserInfo26

 - made some pipes available on TCP

 - added netr_DsrEnumerateDomainTrusts() to netlogon

 - added templates for remaining netlogon IDL calls (from ethereal)

 - added a unistr_noterm vs unistr error detector in ndr basic decoder

 - added torture test for netr_DsrEnumerateDomainTrusts()
(This used to be commit ae5a5113fb)
2007-10-10 12:56:20 -05:00
Andrew Tridgell
7f3d4cc980 r919: - added lsa_QueryInfoPolicy2() to IDL, test suite and server
- added lsa_OpenPolicy2() to server

- added guid handling in samdb

- added a couple more info policy levels in lsa server

- added some DNS info in the provisioning template and script

With the above changes WinXP professional can join a Samba4 domain
(This used to be commit d6dca96352)
2007-10-10 12:56:20 -05:00
Andrew Tridgell
7a6d86fbc9 r918: - dcerpc endpoint name are case insensitive
this fix allows samba3 to join a samba4 domain using "net rpc join"
(This used to be commit 876a6eecc3)
2007-10-10 12:56:19 -05:00
Andrew Tridgell
db3c011977 r917: - added the start of a LSA server to samba4.
- added start of QueryDomainInfo in samr server

"net rpc info" from samba3 now works against a samba4 server. I
suspect join will work fairly soon.
(This used to be commit 0a2c6a1062)
2007-10-10 12:56:19 -05:00
Andrew Tridgell
39a236883e r904: - fixed account expiry testing in auth_sam
- added printf style format attribute checking to samdb varargs fns

- fix nt_time_to_unix() for zero and -1 times
(This used to be commit 41f9b144f9)
2007-10-10 12:56:19 -05:00
Andrew Tridgell
0eb7588cc4 r903: used samdb_result_passwords() in samr_ChangePasswordUser2() and fix the error handling on a bad change.
With this change WinXP can now successfully change the password on a
Samba4 server via SAMR. After the change you can't login because the
handling of much_change_time seems to be broken in the auth code, but
that should be easy to fix.
(This used to be commit 8feeecf303)
2007-10-10 12:56:19 -05:00
Andrew Tridgell
d66c2b477d r901: w2k3 completely ignores the domain name argument to GetDomPwInfo,
always returning the info for the primary domain. I noticed this
because WinXP sends the wrong information in this field (it sends
\\server_name) and gets away with it
(This used to be commit e128bcca56)
2007-10-10 12:56:19 -05:00
Andrew Tridgell
406f345d88 r897: - user/group creation needs to create unique names across both the
Builtin and local domain, as some calls (notably password change
  calls) don't specify a domain name, they just specifiy an account
  name.

- added the remaining password set levels to SetUserInfo in the samr
  server. We now support all of the password set and change levels
  that we know about in SAMR.
(This used to be commit 965748cbee)
2007-10-10 12:56:18 -05:00
Andrew Tridgell
36c4cf24f0 r896: - use andrews samdb_result_passwords() for the remaining password change mechanisms
- added samr_ChangePasswordUser2() (just a subset of samr_ChangePasswordUser3)
(This used to be commit b5324a4b80)
2007-10-10 12:56:18 -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
735e64cff9 r879: fixed a typo in the password fetch wrapper
(This used to be commit c75b763f41)
2007-10-10 12:56:15 -05:00
Andrew Bartlett
5b0ab386cb r874: This patch is a pile of work on NTLMSSP:
Samba's NTLMSSP code is now fully talloc based, which should go a long
way to cleaning up the memory leaks in this code.  This also avoids a
lot of extra copies of data, as we now allocate the 'return' blobs on
a caller-supplied context.

I have also been doing a lot of work towards NTLM2 signing and
sealing.  I have this working for sealing, but not for the verifier
(MD5 integrity check on the stream) which is still incorrect.

(I can aim a rpcecho sinkdata from a Win2k3 box to my server, and the
data arrives intact, but the signature check fails.  It does however
match the test values I have...).

The new torture test is cludged in - when we get a unit test suite
back, I'll happliy put it in the 'right' place....

Andrew Bartlett
(This used to be commit 399e2e2b11)
2007-10-10 12:56:14 -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
Andrew Tridgell
81e8de9ca8 r871: add a comment about how samdb_set_password() works
(This used to be commit 2fdf33c6e5)
2007-10-10 12:56:14 -05:00
Andrew Tridgell
a4939a43ff r870: we should issue a rpc fault OP_RANGE_ERROR not a WERR_NOT_SUPPORTED for
functions we don't implement yet so that we don't put uninitialised
result data on the wire (found with valgrind)
(This used to be commit abe90bc7ba)
2007-10-10 12:56:14 -05:00
Andrew Tridgell
c10c69ba9e r868: we should issue a rpc fault OP_RANGE_ERROR not a WERR_NOT_SUPPORTED for
functions we don't implement yet so that we don't put uninitialised
result data on the wire (found with valgrind)
(This used to be commit 2712e26a5d)
2007-10-10 12:56:14 -05:00
Stefan Metzmacher
766bf57f9d r846: convert DCESRV subsystem to a config.mk file
metze
(This used to be commit 7fffc124e3)
2007-10-10 12:53:54 -05:00
Andrew Tridgell
934f6fda20 r839: password set/change in the samr server is complex enough that it
deserves its own C module
(This used to be commit 2ba7ff824c)
2007-10-10 12:53:54 -05:00
Andrew Bartlett
93076cb9bc r816: - Make use of tridge's new samdb_result_sid_prefix() helper function.
- Remove legacy sid_to_string (which contained a memleak)

 - Remove some unused parts of lib/util_sid.c

Andrew Bartlett
(This used to be commit 7c69a85984)
2007-10-10 12:53:52 -05:00
Andrew Tridgell
32de597981 r812: added a new samdb_replace() call that simplifies the code in the main samr server a bit.
(This used to be commit 255d6e77e7)
2007-10-10 12:53:51 -05:00
Andrew Tridgell
95c52e11a1 r796: fixed samr_OemChangePasswordUser2() to replace attributes, not add
(This used to be commit 24bbf9f1bc)
2007-10-10 12:53:51 -05:00
Andrew Tridgell
acda755f54 r793: - don't make templates members of any class that would make them show
up in searches like "objectclass=user"

 - auto-add the computer objectclass for computer accounts on create

 - added two types of password change call in samr server

 - reset last_fault_code before each dcerpc call
(This used to be commit c1a65f83f6)
2007-10-10 12:53:51 -05:00
Simo Sorce
6ebd4a9d64 r789: we return wrong number of entries
(This used to be commit c0c1596dbd)
2007-10-10 12:53:50 -05:00
Stefan Metzmacher
c2fcb0737d r758: just move the util file to the additional object file list
metze
(This used to be commit 4bfecf337b)
2007-10-10 12:53:49 -05:00
Andrew Bartlett
92dd542aa0 r754: Implement the SetPassword operation on the netlogon pipe.
This involves allowing the password set code in samdb to take an
already hashed password, and some fixes to our torture code.

Andrew Bartlett
(This used to be commit f9f581b580)
2007-10-10 12:53:48 -05:00
Andrew Bartlett
82306753e2 r745: Move netr_ServerPasswordSet up with the other secure channel
management functions, and make sure to include the fault until this is
no longer a stub.

Andrew Bartlett
(This used to be commit b886cb65f8)
2007-10-10 12:53:46 -05:00
Andrew Bartlett
064e7447be r743: Start on a NETLOGON server in Samba4.
Currently this only authentiates the machine, not real users.

As a consequence of running the Samba4 NETLOGON test against Samba4, I
found a number of issues in the SAMR server, which I have addressed.
There are more templates in the provison.ldif for this reason.

I also added some debug to our credentials code, and fixed some bugs
in the auth_sam module.

The static buffer in generate_random_string() bit me badly, so I
removed it in favor of a talloc based system.

Andrew Bartlett
(This used to be commit 94624e519b)
2007-10-10 12:53:46 -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
Stefan Metzmacher
b5edc0fc05 r649: return unknown interface when the client not yet
binds succesful to an interface

metze
(This used to be commit c39e450702)
2007-10-10 12:51:56 -05:00
Stefan Metzmacher
28cfc3c7d7 r626: make the code a bit more readable
metze
(This used to be commit 81b94718e4)
2007-10-10 12:51:56 -05:00
Andrew Tridgell
5afbecdc2e r625: - handle passwords longer than length 14 (thanks to abartlet for pointing out the bug)
- delete unicodePwd if not storing a plaintext password
(This used to be commit 6c3f22a685)
2007-10-10 12:51:56 -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
Volker Lendecke
16f7b35a0a r615: Implement samr_OpenGroup, samr_QueryGroupInfo, samr_SetGroupInfo,
samr_DeleteDomainGroup.

I've added the hidden attribute numMembers that must be maintained by
Add/DelGroupMember for the GroupInfoAll query.

Volker
(This used to be commit 945d747860)
2007-10-10 12:51:52 -05:00
Andrew Tridgell
a765d3692f r608: - a couple of very minor fixes to the CreateGroup code
- added samr_GetUserPwInfo() samr server call
(This used to be commit 0250f5d6aa)
2007-10-10 12:51:51 -05:00
Volker Lendecke
9652ed4de8 r605: Implement CreateDomainGroup, essentially cut&paste from CreateUser2.
Volker
(This used to be commit 59241c0c9a)
2007-10-10 12:51:50 -05:00
Andrew Tridgell
54a695f7ed r601: added the server code for all the samr_SetUserInfo and samr_QueryUserInfo levels except for the password
set levels.

This means that a large part of the RPC-SAMR torture test now runs correctly against Samba4
(This used to be commit ec0a51898f)
2007-10-10 12:51:50 -05:00
Andrew Tridgell
0ea5d1fde7 r596: log all ldb searches at level 4 in samdb
(This used to be commit defaf0d817)
2007-10-10 12:51:49 -05:00
Andrew Tridgell
1d5c2c364e r595: nicer handling on max_size multiplier
(This used to be commit 994baba7eb)
2007-10-10 12:51:49 -05:00
Andrew Tridgell
35ffc46454 r587: added server code for samr_EnumDomainUsers, and started adding
samr_SetUserInfo and samr_QueryUserInfo
(This used to be commit e0db9659a8)
2007-10-10 12:51:48 -05:00
Andrew Tridgell
0ed08d9398 r578: initial server side implementation of samr_CreateUser(),
samr_CreateUser2(), samr_LookupNames(), samr_OpenUser(),
and samr_DeleteUser()

this uses a user template in the SAM db, of objectclass "userTemplate"
and dn CN=TemplateUser,CN=Templates,$BASEDN. Using a template allows
an admin to add any default user attributes that they might want to
the user template and all new users will receive those attributes.
(This used to be commit 10b6e0011b)
2007-10-10 12:51:48 -05:00
Andrew Tridgell
998aab3d29 r514: added a context pointer to the samdb interface, as suggested by
metze. Also added a reference count so that a client can close the
connection handle and still used a derived domain handle.
(This used to be commit b1cd98188d)
2007-10-10 12:51:46 -05:00
Andrew Tridgell
68293565de r513: added a generic ldb debug system to allow the Samba debug functions to
be cleanly interfaced to ldb
(This used to be commit 74b89d5f96)
2007-10-10 12:51:46 -05:00
Andrew Tridgell
51803f76c8 r510: converted the samdb code to give ldb a talloc context rather than letting ldb use malloc
(This used to be commit a3edd4bca8)
2007-10-10 12:51:46 -05:00
Andrew Tridgell
1b3bbc7d44 r466: implemented samr_OpenDomain() and samr_GetDomPwInfo() server side calls
if you take a look at samr_GetDomPwInfo() then you will get a fairly good idea
of what I am planning for the database oriented SAMR server implementation.
(This used to be commit bba0044a51)
2007-10-10 12:51:44 -05:00
Andrew Tridgell
d2ea763761 r465: we need common.h in two more rpc server pipes
(This used to be commit d96b68169a)
2007-10-10 12:51:44 -05:00
Andrew Tridgell
21e6b1531b r464: a big improvement to the API for writing server-side RPC
servers. Previously the server pipe code needed to return the RPC
level status (nearly always "OK") and separately set the function call
return using r->out.result. All the programmers writing servers
(metze, jelmer and me) were often getting this wrong, by doing things
like "return NT_STATUS_NO_MEMORY" which was really quite meaningless
as there is no code like that at the dcerpc level.

I have now modified pidl to generate the necessary boilerplate so that
just returning the status you want from the function will work. So for
a NTSTATUS function you return NT_STATUS_XXX and from a WERROR
function you return WERR_XXX. If you really want to generate a DCERPC
level fault rather than just a return value in your function then you
should use the DCESRV_FAULT() macro which will correctly generate a
fault for you.

As a side effect, this also adds automatic type checking of all of our
server side rpc functions, which was impossible with the old API. When
I changed the API I found and fixed quite a few functions with the
wrong type information, so this is definately useful.

I have also changed the server side template generation to generate a
DCERPC "operation range error" by default when you have not yet filled
in a server side function. This allows us to correctly implement
functions in any order in our rpc pipe servers and give the client the
right information about the fault.
(This used to be commit a4df5c7cf8)
2007-10-10 12:51:44 -05:00
Andrew Tridgell
8db18a0775 r458: this is the (very primitive) beginnings of a SAMR server for
Samba4. I'm committing this now so I can get comments on the approach.

Note that you need to do something like this to initialise the SAM db:

 edit script/provision.pl
 script/provision.pl > provision.ldif.out
 bin/ldbadd /path/to/private/sam.ldb provision.ldif.out
(This used to be commit e2002e40a5)
2007-10-10 12:51:44 -05:00
Andrew Tridgell
cac54feea8 r445: fixed the bind_nak code
(This used to be commit f3799e7720)
2007-10-10 12:51:42 -05:00
Andrew Tridgell
9c92ac995d r441: added an example of how to use the remote rpc interface
(This used to be commit 62f59d1180)
2007-10-10 12:51:42 -05:00
Stefan Metzmacher
f517d6b7ae r424: let this code compile on every machine hopefully
metze
(This used to be commit 3e911db7c2)
2007-10-10 12:51:37 -05:00
Andrew Tridgell
6cc392bff3 r374: allow for a policy_handle fetch using a handle type of
DCESRV_HANDLE_ANY. This is needed for operations like samr_Close()
that take any handle type.
(This used to be commit 6fbbfc4462)
2007-10-10 12:51:35 -05:00
Tim Potter
f3d3b3c809 r355: Fix a bunch of compiler warnings in the registry code.
(This used to be commit 0be7a866dc)
2007-10-10 12:51:34 -05:00
Stefan Metzmacher
55da6e7f90 r286: use talloc_array_p() instead of talloc()
add some more WERR_NOT_SUPPORTED stubs to pass our torture tests
(wkssvc and srvsvc)

metze
(This used to be commit f8605b39ab)
2007-10-10 12:51:19 -05:00
Stefan Metzmacher
fdcafdef0e r138: fix typo
metze
(This used to be commit 7e42465192)
2007-10-10 12:51:10 -05:00
Jelmer Vernooij
aebfb3b9f4 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..
(This used to be commit 3adffa0217)
2007-10-10 12:51:09 -05:00
Stefan Metzmacher
d907dcf383 r127: NetWkstaGetInfo level 101
and return WERR_ACCESS_DENIED for level 102, 502 so does my winXP box
for a non-admin user

metze
(This used to be commit 975bf13f17)
2007-10-10 12:51:09 -05:00
Stefan Metzmacher
8709182fd3 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
(This used to be commit 6f213a3494)
2007-10-10 12:51:09 -05:00
Andrew Tridgell
1c5de896bc r67: added a destroy hook in the policy handle -> wire handle code to allow backends
to cleanup handle data
(This used to be commit af0c21c1e1)
2007-10-10 12:50:41 -05:00
Jelmer Vernooij
f9235e0964 r62: Fix the build
(This used to be commit 1396db8537)
2007-10-10 12:50:41 -05:00
Jelmer Vernooij
b96025eb15 r61: - Implement first call in the winreg rpc server
- Add some initial implementation of the ldb backend
- More checks in the winreg torture test
(This used to be commit ae2b63b6f1)
2007-10-10 12:50:41 -05:00
Gerald Carter
381a903d00 r42: importing .cvsignore files
(This used to be commit 11717ae912)
2007-10-10 12:50:40 -05:00
Jelmer Vernooij
69c19afb62 r31: More registry updates. regdiff/regpatch work now.
(This used to be commit 98224f5436)
2007-10-10 12:50:40 -05:00
Jelmer Vernooij
c424c2b857 r20: Add the registry library. Still needs a lot of work,
see source/lib/registry/TODO for details.
(This used to be commit 7cab3a00d7)
2007-10-10 12:50:33 -05:00
Gerald (Jerry) Carter
3855ee0164 [GLUE] Sync tree with SVN r17.
(This used to be commit 6e50109b66)
2007-10-10 12:39:20 -05:00
Stefan Metzmacher
0b4da9d7e0 - 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
(This used to be commit 40abf3c584)
2004-02-03 14:56:07 +00:00
Stefan Metzmacher
b884eba104 const fixes
metze
(This used to be commit a2beaa0823)
2004-02-02 14:46:25 +00:00
Stefan Metzmacher
c61089219b - 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
(This used to be commit 2e57ee884e)
2004-02-02 13:43:03 +00:00
Stefan Metzmacher
894e02f80c some DEBUG and comment fixes
metze
(This used to be commit 5ac4f87868)
2004-02-02 13:28:29 +00:00
Stefan Metzmacher
9b736c3d9e 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
(This used to be commit 904ce91ed9)
2004-02-01 12:16:26 +00:00
Stefan Metzmacher
7de61be924 - 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
(This used to be commit 92a3eb83d4)
2004-01-28 15:43:18 +00:00
Andrew Tridgell
7a4da9654e 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.
(This used to be commit e7c53ad185)
2004-01-20 05:54:17 +00:00
Andrew Tridgell
4d39861f99 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.
(This used to be commit 9aab321fb6)
2004-01-20 04:32:17 +00:00
Andrew Tridgell
8fb8c40d3b fixed the rpc epmapper server. This fixes rpc over tcp.
(This used to be commit 6ac547fa5f)
2004-01-09 02:43:23 +00:00
Stefan Metzmacher
7e6cf43756 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 :-)
(This used to be commit 917e45dafd)
2004-01-08 22:55:27 +00:00
Andrew Tridgell
db22c0c5f9 added a bunch of alias functions in samr.idl based on work by Kai.
(This used to be commit f740b02ac3)
2003-12-19 03:59:27 +00:00
Andrew Tridgell
7efa19cd22 added a smb.conf flag "rpc big endian" that tells our rpc server to
send packets in bigendian format.
(This used to be commit 44df662960)
2003-12-17 02:06:44 +00:00
Andrew Tridgell
6f12e4ace1 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.
(This used to be commit 9b1c76a8e9)
2003-12-16 09:50:49 +00:00
Andrew Tridgell
24c22aef90 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.
(This used to be commit bb1af644a5)
2003-12-16 09:02:58 +00:00
Andrew Tridgell
a22917260c zero length echo is not an error
(This used to be commit f21d6351d0)
2003-12-15 01:06:01 +00:00
Andrew Tridgell
79990c727c fixed the transfer syntax in the dcerpc bind reply
(This used to be commit 39a7c660f4)
2003-12-15 00:40:57 +00:00
Andrew Tridgell
f6eb8342cb 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
(This used to be commit bd3dcfe582)
2003-12-14 13:22:12 +00:00
Andrew Tridgell
a05882b34b fixed fragmented signed connections to our rpc server over SMB
(This used to be commit f5df126c25)
2003-12-14 12:21:21 +00:00
Andrew Tridgell
d009dc61f9 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 :)
(This used to be commit 6ee0935afe)
2003-12-14 10:45:50 +00:00
Andrew Tridgell
089ae5e435 fixed some memory leaks in the rpc server code
(This used to be commit 2045855601)
2003-12-14 03:51:48 +00:00
Andrew Tridgell
8f6b3eb1a9 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
(This used to be commit 74041b6a0a)
2003-12-14 01:09:10 +00:00
Andrew Tridgell
d262b8c3c7 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.
(This used to be commit 593bc29bbe)
2003-12-13 23:25:15 +00:00
Andrew Tridgell
8d79eb52f1 make the IO in the dcerpc over TCP server completely async, handling
partial packets on both input and output
(This used to be commit 4f46606af8)
2003-12-13 11:44:28 +00:00
Andrew Tridgell
d4705378ce 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
(This used to be commit 9fb0f03693)
2003-12-13 10:58:48 +00:00
Andrew Tridgell
8faa77f177 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.
(This used to be commit 097e7ca99d)
2003-12-13 04:46:50 +00:00
Andrew Tridgell
da86d3af31 added the epm_Map() call.
the RPC-EPMAPPER torture test now passes
(This used to be commit fbdcf9ef54)
2003-12-13 03:23:41 +00:00
Andrew Tridgell
340d9b71f9 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
(This used to be commit 3f85f9b782)
2003-12-13 02:20:40 +00:00
Andrew Tridgell
f7065cc0a5 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.
(This used to be commit 30a996b682)
2003-12-12 22:48:57 +00:00
Andrew Tridgell
fece5b7aba added support for sending bind_nak replies in the rpc server
(This used to be commit 6e7c50bcd9)
2003-12-12 06:12:41 +00:00
Andrew Tridgell
fcd86aa59e added the echo pipe test calls
(This used to be commit 8ad47eff49)
2003-12-12 05:40:26 +00:00
Andrew Tridgell
9d8ef74eac we now support pdu fragmentation on both input and output in the rpc
server code
(This used to be commit 4dac951718)
2003-12-12 05:30:00 +00:00
Andrew Tridgell
dab0deae83 added handling of fragmented requests in the rpc server
now we just need to handle fragmented replies ....
(This used to be commit 14005c95d7)
2003-12-12 05:01:41 +00:00
Andrew Tridgell
869df3adbd handle the auto-allocation of [ref] output arrays in pidl. This
can simplify rpc servers a lot.
(This used to be commit 28fa62d63d)
2003-12-12 04:18:21 +00:00
Andrew Tridgell
16309de71d * 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
(This used to be commit 46e0a35819)
2003-12-12 03:59:09 +00:00
Andrew Tridgell
fcc4efd1ea the next step in the dcerpc server code. Added the link between the
IPC IO routines and the dcerpc endpoint servers.
(This used to be commit 4929c53bc8)
2003-12-11 09:07:45 +00:00
Andrew Tridgell
188b2054a8 initial rpc server side infrastructure
(This used to be commit 3706af7a6c)
2003-12-10 22:21:04 +00:00
Andrew Tridgell
679520ac73 removed some obsolete .cvsignore files
(This used to be commit 91aed7c6a6)
2003-11-13 10:17:20 +00:00
Andrew Tridgell
062670f00c removed a bunch of the old rpc code in preparation for replacing it all with auto-generated code
(This used to be commit 874bf4689d)
2003-11-13 10:15:48 +00:00
Andrew Tridgell
ef2e26c91b first public release of samba4 code
(This used to be commit b0510b5428)
2003-08-13 01:53:07 +00:00