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

6697 Commits

Author SHA1 Message Date
Stefan Metzmacher
f7cd569828 r10768: add a function to create a stream_connection from an already
existing socket connection, that's used for protocols
which switch the client/server roles inside a session

metze
(This used to be commit d4b4d96335)
2007-10-10 13:39:29 -05:00
Stefan Metzmacher
6799fde75d r10766: - make it possible to mark a wrepl_request as send only,
used for WREPL_REPL_INFORM* messsages
- make it possible to close the connection after a request was send
  used for WREPL_ASSOCIATION_STOP
- fix the torture test that tests the assoc context handling
  between connections, you can issue a request and get the reply
  on another connection, I think we should not implement that in our server
  code, as I think it's a security hole, you can cause a windows server
  to send the replies to someone another client, that doesn't wait for data,
  and as there're no massage_id in the protocol the client would be confused
  by a replies that doesn't belong to a query

metze
(This used to be commit dfc95de8fa)
2007-10-10 13:39:28 -05:00
Jelmer Vernooij
093a30d7ed r10765: Actually use VALS() setting for enums
(This used to be commit 6b33e3eedd)
2007-10-10 13:39:28 -05:00
Andrew Bartlett
39daa629ff r10764: To match Win2k3 SP1, we need to set an anonymous user token for
schannel connections.

Test for Win2k3 SP1 behaviour in RPC-SCHANNEL.

Andrew Bartlett
(This used to be commit 1c3911374e)
2007-10-10 13:39:28 -05:00
Andrew Bartlett
8af30ce313 r10763: PROOF of the single, easily understood cause of all of our schannel PAIN!
This test currently passes against Win2k3 SP0, but not SP1.  The
problem was not a convoluted series of changes in policy handles, but
a simple rule that schannel logins would be regarded as ANONYMOUS not
SYSTEM.

Andrew Bartlett
(This used to be commit e843a7fcba)
2007-10-10 13:39:28 -05:00
Stefan Metzmacher
03b634042f r10761: we need to use a pointer to a nbt_name to fix compiler warnings, because we can
only use a pointers to unknown types in proto.h

metze
(This used to be commit 2f46e54e1b)
2007-10-10 13:39:28 -05:00
Stefan Metzmacher
4812a5d3fd r10760: remove only one star from the pointers, and not from the stars that
come from the array nesting

this fixes a compiler warning and but in the eventlog.h,
where the idl uses nstring strings[num_strings]

metze
(This used to be commit c4a252bd46)
2007-10-10 13:39:27 -05:00
Andrew Tridgell
78d0e79c9f r10759: make modules easier to write by allowing modules to only implement the
functions they care about, instead of all functions. This also makes
it more likely that future changes to ldb will not break existing
modules
(This used to be commit 45f0c967b5)
2007-10-10 13:39:27 -05:00
Andrew Tridgell
01e6c56208 r10757: remove the proxy module (it is not complete yet)
(This used to be commit 3c5f3032fc)
2007-10-10 13:39:27 -05:00
Andrew Tridgell
3cb96c8db9 r10756: another fix for the construction of expressions from subtrees for
SUBSTRING searches. This time fix multi-part substring searches.
(This used to be commit bf5cef6f00)
2007-10-10 13:39:27 -05:00
Andrew Tridgell
12399c9b5e r10755: fixed the construction of expressions from subtrees for SUBSTRING searches
(This used to be commit 71c06778d4)
2007-10-10 13:39:26 -05:00
Andrew Tridgell
97e8c5bcec r10754: fixed a valgrind error for unmatched SMB replies
(This used to be commit b714ab64fd)
2007-10-10 13:39:26 -05:00
Andrew Tridgell
5fd031c97d r10753: don't require every ldb module to implement both a search_bytree() and
a search() function, instead each module now only implements the
bytree method, and the expression based search is handled generically
by the modules code. This makes for more consistency and less code
duplication.

fixed the tdb backend to handle BASE searches much more
efficiently. They now always only lookup one record, regardless of the
search expression
(This used to be commit 7e44f9153c)
2007-10-10 13:39:26 -05:00
Andrew Tridgell
92da5aa6b8 r10752: make sure we set the exist status correctly for the tdb tests
(This used to be commit e83635941c)
2007-10-10 13:39:26 -05:00
Jelmer Vernooij
be9af1a4e8 r10742: Support multi-level pointers + ref pointer fixes
(This used to be commit 258b762dc6)
2007-10-10 13:39:26 -05:00
Jelmer Vernooij
765f69ce42 r10739: Reduce number of calls to prs_align_custom()
(This used to be commit ebeeec5406)
2007-10-10 13:39:25 -05:00
Jelmer Vernooij
f72dee9e39 r10737: Fix some alignment issues
(This used to be commit 2b4270a2e9)
2007-10-10 13:39:25 -05:00
Jelmer Vernooij
4bbb584ff0 r10734: Generate ptr, size, offset, and length elements in unions just once.
(This used to be commit 12bfa5d01b)
2007-10-10 13:39:25 -05:00
Jelmer Vernooij
5df3b426ee r10732: Generate _ctr structures for unions
(This used to be commit bd8fcb0500)
2007-10-10 13:39:25 -05:00
Andrew Tridgell
7838e13e91 r10726: fix to talloc_parent() from Michael O'Brien
(This used to be commit f31a2376f3)
2007-10-10 13:39:25 -05:00
Jelmer Vernooij
d220237b19 r10721: Handle allocations and primitive / deferred data correctly. In theory,
the generated output for DFS should work now (it compiles cleanly, but
I haven't tested it yet).

Not supported:
 - subcontexts()
 - relative pointers
 - unions of pointers
 - DATA_BLOB
 - several other things

Also still need to do:
 - Remove some spurious spaces in the output
 - Do range() checking

Example output is still available at http://samba.org/~jelmer/pidl_samba3/
(This used to be commit e2d7e382bb)
2007-10-10 13:39:24 -05:00
Jelmer Vernooij
1e0823d0a5 r10719: Remove __FUNCTION__ macro as it might not be available at all systems
(pointed out by John E. Malmberg)
(This used to be commit 3169bbc157)
2007-10-10 13:39:24 -05:00
Jelmer Vernooij
3d6279402c r10718: Another large set of small improvements. All generated files compile
without warnings now. The only things left to do that are
required for DFS:
 - add allocation of arrays in marshalling phase
 - handling primitive and deferred data in embedded structures / unions.

Example output is again available from http://samba.org/~jelmer/pidl_samba3/
(This used to be commit 9fe724f6fb)
2007-10-10 13:39:24 -05:00
Jelmer Vernooij
9879bc6aa6 r10717: Another bunch of small updates. All generated files except parse_dfs.c
compile now when generated from Samba4's dfs.idl.
(This used to be commit 2b315b1942)
2007-10-10 13:39:24 -05:00
Jelmer Vernooij
eea74cde05 r10716: Use correct Samba3 data types for strings. Also use Samba3 types
for a couple of other types (policy handles, SIDs, times)
(This used to be commit c2527217b4)
2007-10-10 13:39:24 -05:00
Jelmer Vernooij
81c306472a r10715: More Samba3 parser generator improvements:
- Actually generate parsers for unions and structs.
- Support some more builtin types.
- Some more work on supporting arrays.
- Several other small fixes.

I've updated the example output at http://samba.org/~jelmer/
(This used to be commit b229c033eb)
2007-10-10 13:39:23 -05:00
Jelmer Vernooij
55065d27ce r10713: Couple more updates to the Samba3 parser generators.
Unions and enums have been improved, init functions are now generated
properly, some other small improvements.
(This used to be commit 8a60e79175)
2007-10-10 13:39:23 -05:00
Andrew Bartlett
49dd5e4b1d r10712: Use data_blob_talloc, thanks to valgrind for finding the errors.
Andrew Bartlett
(This used to be commit 1f6fec8e6b)
2007-10-10 13:39:23 -05:00
Andrew Bartlett
c690be462d r10711: An error of 'user exists' is not an error, just an indication of how
the join was processed.

Andrew Bartlett
(This used to be commit 0d93f11c89)
2007-10-10 13:39:23 -05:00
Andrew Tridgell
a04f65b1c7 r10709: fixed a crash bug rather similar to the one volker found in the dcerpc
code, where a stream_terminate_connection() while processing a request
can cause a later defererence of the connection structure to die.
(This used to be commit efbcb0f741)
2007-10-10 13:39:23 -05:00
Andrew Tridgell
63d4cb4802 r10708: a bit more error checking in the idap ldb backend
(This used to be commit 63ebaad393)
2007-10-10 13:39:22 -05:00
Andrew Tridgell
7b38c1db1b r10706: split out the irpc server functions in the NBT server, so the mainline
NBT server code remains reabable. Also fixed the copyright header to
include Volker, as he wrote the getdc server function
(This used to be commit a973197d3e)
2007-10-10 13:39:22 -05:00
Andrew Tridgell
3a7e251f27 r10705: fixed a crash bug in the getdcname irpc server for winbind. The
problem was that the return string was declared as:

	[out] astring dcname

which means "this is a non-NULL string". The server code sometimes
returned NULL however (on getdc lookup failure), which caused the NDR
marshalling code to crash. When you declare a non-pointer return value
you are promising that the value can never be NULL.

The trivial fix is to use:

	[out] astring *dcname

which leaves the API alone, but includes a pointer in the wire format,
which in turn means it is valid to send a NULL string as a response.
(This used to be commit e39bac6196)
2007-10-10 13:39:22 -05:00
Andrew Tridgell
2c3e4bdadf r10704: don't try to free the netlogon pipe twice
(This used to be commit 2c3a9f04db)
2007-10-10 13:39:22 -05:00
Andrew Bartlett
c8bec9dd3a r10703: Add a new user account, change the password and test it in the SAMLOGON test.
The semantics for the user account are very odd, the old password is
still valid, but the session keys appear to be blanked out.

Andrew Bartlett
(This used to be commit bbfaf4821d)
2007-10-10 13:39:21 -05:00
Andrew Bartlett
582595c215 r10702: Fix a silly error that caused a rejoin/delete in the torture code to fault...
Andrew Bartlett
(This used to be commit 0fa6d040f2)
2007-10-10 13:39:21 -05:00
Andrew Bartlett
2e3c917957 r10701: Ensure we return the right user handle.
Andrew Bartlett
(This used to be commit 732b247a49)
2007-10-10 13:39:21 -05:00
Andrew Tridgell
6bc8d37c20 r10700: removed volkers temporary timer hack now that freeing the netlogon
pipe is safe while inside a rpc callback
(This used to be commit 5d752a5194)
2007-10-10 13:39:21 -05:00
Andrew Tridgell
a872005c1c r10699: fixed the dcerpc code so that you can shutdown the pipe safely from
within a callback on the pipe. This should fix a problem volker
encountered with winbind. The fix invoolves making the recv_data
handler free the memory for a packet, instead of having the transport
layer free it after calling recv_data. When the transport layer freed
it, it had no way of knowing if the callback had shutdown the pipe, so
it had no way of knowing if it could safely use the pointer.

Also changed the pipe shutdown hook for the smb transport to use an
async SMB close. This ensures that when you shutdown the pipe, you
don't block waiting for the server to ack the close of the pipe fnum.
(This used to be commit c87d7f580e)
2007-10-10 13:39:21 -05:00
Jelmer Vernooij
e0040ff537 r10698: Fix support of enums in switch_type() in the ethereal parser generator
(This used to be commit 9fac8dfeb3)
2007-10-10 13:39:20 -05:00
Andrew Bartlett
099c3d5327 r10697: Change the torture join code to return a credentials structure, as
that is what most of the callers want anyway.

Remove and re-add the account for the torture case, rather than just
modify it.

Test with a user account (needs work to change the password).

Andrew Bartlett
(This used to be commit 38bebef024)
2007-10-10 13:39:20 -05:00
Andrew Bartlett
b7a47635ca r10696: Return the realm to the caller, not NULL...
Also return an indication of if the join was of a new account, or
reworking an existing account.

Andrew Bartlett
(This used to be commit b6e4b36c4f)
2007-10-10 13:39:20 -05:00
Andrew Bartlett
1a36516935 r10695: strupper() of NULL should be NULL, not panic.
Andrew Bartlett
(This used to be commit b1bcc0dc0b)
2007-10-10 13:39:20 -05:00
Jelmer Vernooij
f9a4167434 r10694: Add some work I did this afternoon on getting pidl to output Samba3
RPC parsers. Currently the following files can be generated:

- include/rpc_BASENAME.h
- rpc_server/srv_BASENAME.c
- rpc_server/srv_BASENAME_nt.c (template only, user has to fill in functions)
- rpc_client/cli_BASENAME.c
- rpc_parse/parse_BASENAME.c

So far, I have been working on getting DFS working. Currently still to do
(all in rpc_parse/parse_BASENAME.c):
 - Proper handling of declarations
 - Proper handling of scalar/buffer parts of structs and unions
 - Subcontexts
 - Proper handling of arrays
 - Support for custom (non-scalar) types

I hope to have a somewhat more working version later this week.

Some files as currently generated are available from:
http://samba.org/~jelmer/pidl_samba3/
(This used to be commit 8af8eaeeef)
2007-10-10 13:39:20 -05:00
Volker Lendecke
012893cb42 r10691: This gets half-way to wbinfo -n. It acquires an lsa pipe, and does a
queryinfopolicy. Idea is to get a consistency check between that and our
notion of the domain name and sid, and take the lsa pipe as the holder of the
central smbcli_tree that netlogon and samr use as well.

Volker
(This used to be commit 126c80aefc)
2007-10-10 13:39:19 -05:00
Volker Lendecke
4a34e81ccc r10690: Fix a bug that metze pointed out: Leaving the "rejecting" destructor around
prevents the memory from being freed.

Thanks,

Volker
(This used to be commit df8eeb01f4)
2007-10-10 13:39:19 -05:00
Volker Lendecke
3fece92b9d r10687: Another one...
(This used to be commit d18f7edf92)
2007-10-10 13:39:19 -05:00
Volker Lendecke
788129610b r10686: Fix the build
(This used to be commit a7137fd3ec)
2007-10-10 13:39:19 -05:00
Volker Lendecke
ea262d130b r10685: Why wait 5 seconds...
(This used to be commit 820b4180dd)
2007-10-10 13:39:18 -05:00
Volker Lendecke
faf2ad667a r10684: Add a nasty hack for the failure case of wbinfo -t. Tridge has a proper fix
for it pending.

Also fix a bug with timed events: Don't call the same event recursively in the
handler's inner semi-async event loop.

Volker
(This used to be commit e38e50127a)
2007-10-10 13:39:18 -05:00